diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-01-23 22:58:06 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-01-23 22:58:06 +0900 |
commit | 4eccf3e86c7399be892d6e25bf253e33fa28a9e5 (patch) | |
tree | 0c98ddd762c3fbbd4a6ce5aa0501de40f40ce683 | |
parent | 5e39101766a0a6fcc771077b5f6b0a21abfbdc01 (diff) | |
download | vim-lsp-settings-4eccf3e86c7399be892d6e25bf253e33fa28a9e5.tar.gz vim-lsp-settings-4eccf3e86c7399be892d6e25bf253e33fa28a9e5.tar.bz2 vim-lsp-settings-4eccf3e86c7399be892d6e25bf253e33fa28a9e5.zip |
Add some LSP but work in progress.
-rw-r--r-- | plugin/lsp_settings.vim | 4 | ||||
-rw-r--r-- | settings.json | 12 | ||||
-rw-r--r-- | settings/monastery.vim | 13 | ||||
-rw-r--r-- | settings/perl-languageserver.vim | 13 | ||||
-rw-r--r-- | settings/slp.vim | 13 |
5 files changed, 55 insertions, 0 deletions
diff --git a/plugin/lsp_settings.vim b/plugin/lsp_settings.vim index 344d95e..264aa1f 100644 --- a/plugin/lsp_settings.vim +++ b/plugin/lsp_settings.vim @@ -204,6 +204,10 @@ function! s:vimlsp_load_or_suggest(ft) abort if s:vimlsp_settings_get(l:server.command, 'disabled', 0) continue endif + let l:default = get(g:, 'lsp_settings_' . a:ft, '') + if !empty(l:default) && l:default != l:server.command + continue + endif let l:command = s:vimlsp_settings_get(l:server.command, 'cmd', l:server.command) if type(l:command) == type([]) let l:command = l:command[0] diff --git a/settings.json b/settings.json index bae706a..a4d781f 100644 --- a/settings.json +++ b/settings.json @@ -428,6 +428,18 @@ ], "perl": [ { + "command": "slp", + "requires": [ + "cpanm" + ] + }, + { + "command": "monastery", + "requires": [ + "cpanm" + ] + }, + { "command": "perl-languageserver", "requires": [ "cpanm" diff --git a/settings/monastery.vim b/settings/monastery.vim new file mode 100644 index 0000000..0f03371 --- /dev/null +++ b/settings/monastery.vim @@ -0,0 +1,13 @@ +augroup vimlsp_settings_monastery + au! + LspRegisterServer { + \ 'name': 'monastery', + \ 'cmd': {server_info->lsp_settings#get('monastery', 'cmd', [lsp_settings#exec_path('monastery')])}, + \ 'root_uri':{server_info->lsp_settings#get('monastery', 'root_uri', lsp_settings#root_uri(['.git/']))}, + \ 'initialization_options': lsp_settings#get('monastery', 'initialization_options', v:null), + \ 'whitelist': lsp_settings#get('monastery', 'whitelist', ['perl']), + \ 'blacklist': lsp_settings#get('monastery', 'blacklist', []), + \ 'config': lsp_settings#get('monastery', 'config', {}), + \ 'workspace_config': lsp_settings#get('monastery', 'workspace_config', {}), + \ } +augroup END diff --git a/settings/perl-languageserver.vim b/settings/perl-languageserver.vim new file mode 100644 index 0000000..f43c624 --- /dev/null +++ b/settings/perl-languageserver.vim @@ -0,0 +1,13 @@ +augroup vimlsp_settings_perl_languageserver + au! + LspRegisterServer { + \ 'name': 'perl-languageserver', + \ 'cmd': {server_info->lsp_settings#get('perl-languageserver', 'cmd', [lsp_settings#exec_path('perl-languageserver')])}, + \ 'root_uri':{server_info->lsp_settings#get('perl-languageserver', 'root_uri', lsp_settings#root_uri(['.git/']))}, + \ 'initialization_options': lsp_settings#get('perl-languageserver', 'initialization_options', v:null), + \ 'whitelist': lsp_settings#get('perl-languageserver', 'whitelist', ['perl']), + \ 'blacklist': lsp_settings#get('perl-languageserver', 'blacklist', []), + \ 'config': lsp_settings#get('perl-languageserver', 'config', {}), + \ 'workspace_config': lsp_settings#get('perl-languageserver', 'workspace_config', {}), + \ } +augroup END diff --git a/settings/slp.vim b/settings/slp.vim new file mode 100644 index 0000000..380bdf4 --- /dev/null +++ b/settings/slp.vim @@ -0,0 +1,13 @@ +augroup vimlsp_settings_slp + au! + LspRegisterServer { + \ 'name': 'slp', + \ 'cmd': {server_info->lsp_settings#get('slp', 'cmd', [lsp_settings#exec_path('slp')])}, + \ 'root_uri':{server_info->lsp_settings#get('slp', 'root_uri', lsp_settings#root_uri(['.git/']))}, + \ 'initialization_options': lsp_settings#get('slp', 'initialization_options', v:null), + \ 'whitelist': lsp_settings#get('slp', 'whitelist', ['perl']), + \ 'blacklist': lsp_settings#get('slp', 'blacklist', []), + \ 'config': lsp_settings#get('slp', 'config', {}), + \ 'workspace_config': lsp_settings#get('slp', 'workspace_config', {}), + \ } +augroup END |