diff options
-rw-r--r-- | autoload/lsp_settings.vim | 6 | ||||
-rw-r--r-- | schema.json | 4 | ||||
-rw-r--r-- | settings.json | 5 | ||||
-rw-r--r-- | settings/css-languageserver.vim | 2 | ||||
-rw-r--r-- | settings/html-languageserver.vim | 2 | ||||
-rw-r--r-- | settings/metals.vim | 2 | ||||
-rw-r--r-- | settings/powershell-languageserver.vim | 2 | ||||
-rw-r--r-- | settings/solargraph.vim | 2 |
8 files changed, 12 insertions, 13 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim index e0160de..fcbcc98 100644 --- a/autoload/lsp_settings.vim +++ b/autoload/lsp_settings.vim @@ -331,9 +331,9 @@ function! s:vim_lsp_load_or_suggest(ft) abort if get(g:, 'lsp_loaded', 0) for l:server in s:settings[a:ft] - let l:pattern = get(l:server, 'asyncomplete-refresh-pattern', '') - if !empty(l:pattern) - let b:asyncomplete_refresh_pattern = l:pattern + let l:refresh_pattern = get(l:server, 'refresh_pattern', '') + if !empty(l:refresh_pattern) + let b:asyncomplete_refresh_pattern = l:refresh_pattern endif endfor endif diff --git a/schema.json b/schema.json index 38c11d6..95cd0f7 100644 --- a/schema.json +++ b/schema.json @@ -8,8 +8,8 @@ "additionalProperties": false, "description": "define command description", "properties": { - "asyncomplete-refresh-pattern": { - "description": "define refresh pattern for asyncomplete", + "refresh_pattern": { + "description": "loop left and find the start of the word or trigger chars and set it as the startcol for the source instead of refresh_pattern", "type": "string" }, "command": { diff --git a/settings.json b/settings.json index 4fd9e96..dacbf79 100644 --- a/settings.json +++ b/settings.json @@ -63,7 +63,7 @@ ], "css": [ { - "asyncomplete-refresh-pattern": "\\(-\\?[a-zA-Z_]\\+[_a-zA-Z0-9-]*$\\|\\k\\+$\\)", + "refresh_pattern": "\\([a-zA-Z0-9_-]\\+\\)$", "command": "css-languageserver", "requires": [ "npm" @@ -366,7 +366,7 @@ ], "ps1": [ { - "asyncomplete-refresh-pattern": "\\(\\$\\k*$\\|\\k\\+$\\)", + "refresh_pattern": "\\(\\$[a-zA-Z0-9_:]*\\|\\k\\+\\)$", "command": "powershell-languageserver", "requires": [ "pwsh" @@ -422,7 +422,6 @@ ], "ruby": [ { - "asyncomplete-refresh-pattern": "\\(\\$\\k*$\\|\\k\\+$\\)", "command": "solargraph", "requires": [ "gem" diff --git a/settings/css-languageserver.vim b/settings/css-languageserver.vim index b3d33a4..de414c2 100644 --- a/settings/css-languageserver.vim +++ b/settings/css-languageserver.vim @@ -7,7 +7,7 @@ augroup vimlsp_settings_css_languageserver \ 'initialization_options': lsp_settings#get('css-languageserver', 'initialization_options', v:null), \ 'whitelist': lsp_settings#get('css-languageserver', 'whitelist', ['css', 'less', 'sass']), \ 'blacklist': lsp_settings#get('css-languageserver', 'blacklist', []), - \ 'config': lsp_settings#get('css-languageserver', 'config', {'typed_pattern': '-\?[a-zA-Z_]\+[_a-zA-Z0-9-]*$\|\k\+$'}), + \ 'config': lsp_settings#get('css-languageserver', 'config', {'typed_pattern': '-\?[a-zA-Z_]\+[_a-zA-Z0-9-]\+$'}), \ 'workspace_config': lsp_settings#get('css-languageserver', 'workspace_config', { \ 'css': {'lint': {'validProperties': []}}, \ 'less': {'lint': {'validProperties': []}}, diff --git a/settings/html-languageserver.vim b/settings/html-languageserver.vim index 7855505..edecd24 100644 --- a/settings/html-languageserver.vim +++ b/settings/html-languageserver.vim @@ -7,7 +7,7 @@ augroup vimlsp_settings_html_languageserver \ 'initialization_options': lsp_settings#get('html-languageserver', 'initialization_options', {'embeddedLanguages': {'css': v:true, 'javascript': v:true}}), \ 'whitelist': lsp_settings#get('html-languageserver', 'whitelist', ['html']), \ 'blacklist': lsp_settings#get('html-languageserver', 'blacklist', []), - \ 'config': lsp_settings#get('html-languageserver', 'config', {}), + \ 'config': lsp_settings#get('html-languageserver', 'config', {'typed_pattern': '\(/\|k\+\)$'}), \ 'workspace_config': lsp_settings#get('html-languageserver', 'workspace_config', {}), \ } augroup END diff --git a/settings/metals.vim b/settings/metals.vim index 376d5f5..d0cdd53 100644 --- a/settings/metals.vim +++ b/settings/metals.vim @@ -7,7 +7,7 @@ augroup vimlsp_settings_metals \ 'initialization_options': lsp_settings#get('metals', 'initialization_options', v:null), \ 'whitelist': lsp_settings#get('metals', 'whitelist', ['scala', 'sbt']), \ 'blacklist': lsp_settings#get('metals', 'blacklist', []), - \ 'config': lsp_settings#get('metals', 'config', {}), + \ 'config': lsp_settings#get('metals', 'config', {'typed_pattern': '\k\zs'}), \ 'workspace_config': lsp_settings#get('metals', 'workspace_config', {}), \ } augroup END diff --git a/settings/powershell-languageserver.vim b/settings/powershell-languageserver.vim index 380a7ba..105cd19 100644 --- a/settings/powershell-languageserver.vim +++ b/settings/powershell-languageserver.vim @@ -7,7 +7,7 @@ augroup vimlsp_settings_powershell_languageserver \ 'initialization_options': lsp_settings#get('powershell-languageserver', 'initialization_options', v:null), \ 'whitelist': lsp_settings#get('powershell-languageserver', 'whitelist', ['ps1']), \ 'blacklist': lsp_settings#get('powershell-languageserver', 'blacklist', []), - \ 'config': lsp_settings#get('powershell-languageserver', 'config', {}), + \ 'config': lsp_settings#get('solargraph', 'config', {'typed_pattern': '\(\$[a-zA-Z0-9_:]*\|\k\+\)$'}), \ 'workspace_config': lsp_settings#get('powershell-languageserver', 'workspace_config', {}), \ } augroup END diff --git a/settings/solargraph.vim b/settings/solargraph.vim index 9373975..3fc17e8 100644 --- a/settings/solargraph.vim +++ b/settings/solargraph.vim @@ -7,7 +7,7 @@ augroup vimlsp_settings_solargraph \ 'initialization_options': lsp_settings#get('solargraph', 'initialization_options', {"diagnostics": "true"}), \ 'whitelist': lsp_settings#get('solargraph', 'whitelist', ['ruby']), \ 'blacklist': lsp_settings#get('solargraph', 'blacklist', []), - \ 'config': lsp_settings#get('solargraph', 'config', {}), + \ 'config': lsp_settings#get('solargraph', 'config', {'typed_pattern': '\([$@]\k*\|\k\+\)$'}), \ 'workspace_config': lsp_settings#get('solargraph', 'workspace_config', {}), \ } augroup END |