-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable capabilities of individual language servers #1505
Comments
Added an additional option in the fork here https://github.com/sullivan-sean/vim-lsp to override the It returns an object that is internal to Here is what I have in my function! s:get_server_capabilities(server_name) abort
let l:capabilities = deepcopy(lsp#default_get_server_capabilities(a:server_name))
" Disable links for pyright langserver to avoid duplicate entries
if a:server_name ==# 'pyright-langserver'
for l:key in ['definitionProvider', 'declarationProvider', 'referencesProvider']
if has_key(l:capabilities, l:key)
call remove(l:capabilities, l:key)
endif
endfor
endif
return l:capabilities
endfunction
let g:lsp_get_server_capabilities = [function('s:get_server_capabilities')] |
Very happy to upstream some variation of this if you'd like to support this kind of functionality @prabirshrestha |
Thank you for working on this! I will try later to see if this fits my needs. |
You can handle them capabilities like below (without any modifications).
|
Even better! thanks |
Thank you and even without changes! |
@mattn I just tried your proposed solution like this:
However, I still get diagnostics from pylsp. I tried to put the solution you proposed at different position in the config but this did not help. What did I get wrong? |
Hi, would it be possible to add an option for each language server to disable certain capabilities? This would be helpful if one uses multiple language servers for one language. This is supported by neovim and an example of an application can be found here, which is exactly the problem I have atm.
The text was updated successfully, but these errors were encountered: