vim-lsp-settings
vim-lsp-settings copied to clipboard
Disable specific server for specific filetype
Hello,
I'm using vim-lsp
+ vim-lsp-settings
to edit Vue files. I've instructed vim-lsp-settings
to just use vls
as LSP provider in my .vimrc:
let g:lsp_settings_filetype_vue = 'vls'
In *.vue
files with TypeScript vim-lsp
nevertheless uses both, vls
and typescript-language-server
. If I run :LspSettingsStatus
, I get the following:
vls: running
If I run :LspStatus
I get:
vls: running
typescript-language-server: running
What is starting typescript-language-server
and how can I disable it just for *.vue
files (but not for *.ts
files)?
:LspSettingsEditLocal
on your project root.
{
"typescript-language-server": {
"enabled": false
}
}
But does typescript-language-server
then still works for TypeScript files in the same project?
Sorry for not reporting back. @mattn your solution disables typescript-language-server
for the whole project. I want to disable it just for vue
files. Both language servers, vls
and typescript-language-server
are running at the moment for Vue files.
When I put
let g:lsp_settings_filetype_vue = ['vls']
into my .vim/after/ftplugin/vue.vim
, unfortunately nothing changes.
One issue that I recognized is, that when I open the vue file directly, eg. with vim path/to/component.vue
, the typescript-language-server
is disabled, but when I start vim without a file and open the file from within vim, eg. with :e path/to/component.vue
the typescript-language-server
is started.
I'm using the combination of vim-lsp
, vim-lsp-settings
and vim-lsp-ale
, so I don't know who is causing the troubles.
Thanks for any help! :-)