]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Don't setup completion for servers that doesn't support it
authorAndreas Louv <andreas@louv.dk>
Fri, 7 Apr 2023 21:42:56 +0000 (23:42 +0200)
committerAndreas Louv <andreas@louv.dk>
Fri, 7 Apr 2023 21:42:56 +0000 (23:42 +0200)
autoload/lsp/completion.vim

index ca20e0d9145f132aabf20538db1680ea44ed67eb..dddacacfb38b9f2de90a8e5089d222f6994d7077 100644 (file)
@@ -479,6 +479,10 @@ enddef
 
 # Initialize buffer-local completion options and autocmds
 export def BufferInit(lspserver: dict<any>, bnr: number, ftype: string)
+  if !lspserver.isCompletionProvider
+    # no support for completion
+    return
+  endif
 
   # buffer-local autocmds for completion
   var acmds: list<dict<any>> = []