Skip to content

Commit 45f9d75

Browse files
Tehnixprabirshrestha
authored andcommitted
Add not_supported in scope for get_hover_under_cursor (#190)
Currently calling hover on a filetype without support throws an error, stating that 'Unknown function: <SNR>274_not_supported'. This adds the `not_supported` function into the scripts' scope.
1 parent 2e59370 commit 45f9d75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

autoload/lsp/ui/vim/hover.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
function! s:not_supported(what) abort
2+
return lsp#utils#error(a:what.' not supported for '.&filetype)
3+
endfunction
4+
15
function! lsp#ui#vim#hover#get_hover_under_cursor() abort
26
let l:servers = filter(lsp#get_whitelisted_servers(), 'lsp#capabilities#has_hover_provider(v:val)')
37

0 commit comments

Comments
 (0)