mirror of
https://github.com/mattn/vim-lsp-settings.git
synced 2025-12-22 12:14:21 +01:00
Support b:asyncomplete_refresh_pattern
This commit is contained in:
@@ -325,6 +325,19 @@ function! s:vim_lsp_suggest_plugin() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:vim_lsp_load_or_suggest(ft) abort
|
function! s:vim_lsp_load_or_suggest(ft) abort
|
||||||
|
if !has_key(s:settings, a:ft)
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
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
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endif
|
||||||
|
|
||||||
if get(s:ftmap, a:ft, 0)
|
if get(s:ftmap, a:ft, 0)
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|||||||
60
schema.json
60
schema.json
@@ -1,24 +1,17 @@
|
|||||||
{
|
{
|
||||||
"$schema": "http://json-schema.org/draft-04/schema",
|
"$schema": "http://json-schema.org/draft-04/schema",
|
||||||
"type": "object",
|
|
||||||
"title": "vim-lsp-settings",
|
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"patternProperties": {
|
"patternProperties": {
|
||||||
"^\\$schema$": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"^([a-z0-9_-]+)+$": {
|
"^([a-z0-9_-]+)+$": {
|
||||||
"type": "array",
|
|
||||||
"description": "filetype name",
|
"description": "filetype name",
|
||||||
"items": {
|
"items": {
|
||||||
"description": "define command description",
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": [
|
"description": "define command description",
|
||||||
"command",
|
|
||||||
"requires"
|
|
||||||
],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"asyncomplete-refresh-pattern": {
|
||||||
|
"description": "define refresh pattern for asyncomplete",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"command": {
|
"command": {
|
||||||
"description": "define name of language server",
|
"description": "define name of language server",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -29,32 +22,43 @@
|
|||||||
},
|
},
|
||||||
"requires": {
|
"requires": {
|
||||||
"description": "define commands to install this language server",
|
"description": "define commands to install this language server",
|
||||||
"type": "array",
|
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string",
|
"description": "executable command name",
|
||||||
"description": "executable command name"
|
"type": "string"
|
||||||
}
|
},
|
||||||
|
"type": "array"
|
||||||
},
|
},
|
||||||
"vim-plugin": {
|
"vim-plugin": {
|
||||||
"description": "define suggestion for vim-plugin",
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
"description": "define suggestion for vim-plugin",
|
||||||
"properties": {
|
"properties": {
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"type": "array",
|
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string",
|
"description": "file extensions",
|
||||||
"description": "file extensions"
|
"type": "string"
|
||||||
}
|
},
|
||||||
|
"type": "array"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"description": "plugin identify user/repo",
|
||||||
"description": "plugin identify user/repo"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"type": "object"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
"required": [
|
||||||
|
"command",
|
||||||
|
"requires"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
"^\\$schema$": {
|
||||||
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"title": "vim-lsp-settings",
|
||||||
|
"type": "object"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -344,6 +344,7 @@
|
|||||||
],
|
],
|
||||||
"ps1": [
|
"ps1": [
|
||||||
{
|
{
|
||||||
|
"asyncomplete-refresh-pattern": "\\(\\$\\k*$\\|\\k\\+$\\)",
|
||||||
"command": "powershell-languageserver",
|
"command": "powershell-languageserver",
|
||||||
"requires": [
|
"requires": [
|
||||||
"pwsh"
|
"pwsh"
|
||||||
|
|||||||
Reference in New Issue
Block a user