case - case sensitive matching (default).
fuzzy - fuzzy match completion items.
icase - ignore case when matching items.
+ *lsp-opt-noAdditionalTextEdits*
+completionTextEdit |Boolean| option. If true, apply the LSP server
+ supplied text edits after a completion. If a snippet
+ plugin is going to apply the text edits, then set
+ this to false to avoid applying the text edits twice.
+ By default this is set to true.
+ *lsp-opt-completionKinds*
+completionKinds |Dictionary| option. See |lsp-custom-kinds| for all
+ completion kind names.
+ *lsp-opt-customCompletionKinds*
+customCompletionKinds |Boolean| option. If you set this to true, you can set
+ custom completion kinds using the option completionKinds.
*lsp-opt-diagSignErrorText*
diagSignErrorText |String| option. Change diag sign text for errors
By default 'E>'
keepFocusInReferences |Boolean| option. Focus on the location list window
after LspShowReferences.
By default this is set to false.
- *lsp-opt-noAdditionalTextEdits*
-completionTextEdit |Boolean| option. If true, apply the LSP server
- supplied text edits after a completion. If a snippet
- plugin is going to apply the text edits, then set
- this to false to avoid applying the text edits twice.
- By default this is set to true.
*lsp-opt-noDiagHoverOnLine*
noDiagHoverOnLine |Boolean| option. Suppress diagnostic hover from
appearing when the mouse is over the line instead of
command to display the code action for the current
line, use a popup menu instead of echoing.
By default this is set to false.
- *lsp-opt-customCompletionKinds*
-customCompletionKinds |Boolean| option. If you set this to true, you can set
- custom completion kinds using the option completionKinds.
- *lsp-opt-completionKinds*
-completionKinds |Dictionary| option. See |lsp-custom-kinds| for all
- completion kind names.
For example, to disable the automatic placement of signs for the LSP
diagnostic messages, you can add the following line to your .vimrc file: >
documentation in the preview window instead of in a
popup set >
- call LspOptionsSet({'hoverInPreview': v:true})
+ call LspOptionsSet({'hoverInPreview': v:true})
<
Default is false.
It is useful to create a visual map to use this
command. Example: >
- xnoremap <silent> <Leader>e <Cmd>LspSelectionExpand<CR>
+ xnoremap <silent> <Leader>e <Cmd>LspSelectionExpand<CR>
<
With the above map, you can press "\e" in visual mode
successively to expand the current symbol visual
is useful to create a visual map to use this command.
Example: >
- xnoremap <silent> <Leader>s <Cmd>LspSelectionShrink<CR>
+ xnoremap <silent> <Leader>s <Cmd>LspSelectionShrink<CR>
<
With the above map, you can press "\s" in visual mode
successively to shrink the current symbol visual
references in a quickfix list instead of in a location
list set >
- call LspOptionsSet({'useQuickfixForLocations': v:true})
+ call LspOptionsSet({'useQuickfixForLocations': v:true})
<
*:LspShowSignature*
:LspShowSignature Displays the signature of the symbol (e.g. a function
this, you can set the showSignature option to false in
your .vimrc file: >
- call LspOptionsSet({'showSignature': v:false})
+ call LspOptionsSet({'showSignature': v:false})
<
Default is true.
You can get the function signature echoed in cmdline
rather than displayed in popup if you use >
- call LspOptionsSet({'echoSignature': v:true})
+ call LspOptionsSet({'echoSignature': v:true})
<
Default is false.
a language server that only supports a subset of features at first and then
define the general purpose language server after it: >
- vim9script
- g:LspAddServer([
- # This language server reports that it only supports
- # textDocument/documentFormatting, so it will be used
- # for :LspFormat but nothing else.
- {
- filetype: ['html'],
- path: 'html-pretty-lsp',
- args: ['--stdio']
- },
- # This language server also supports
- # textDocument/documentFormatting, but since it's been
- # defined later, the one above will be used instead.
- # However this server also supports
- # textDocument/definition, textDocument/declaration,
- # etc, so it will be used for :LspGotoDefinition,
- # :LspGotoDeclaration, etc
- {
- filetype: ['html'],
- path: 'html-language-server',
- args: ['--stdio']
- }
- ])
+ vim9script
+
+ g:LspAddServer([
+ # This language server reports that it only supports
+ # textDocument/documentFormatting, so it will be used
+ # for :LspFormat but nothing else.
+ {
+ filetype: ['html'],
+ path: 'html-pretty-lsp',
+ args: ['--stdio']
+ },
+ # This language server also supports
+ # textDocument/documentFormatting, but since it's been
+ # defined later, the one above will be used instead.
+ # However this server also supports
+ # textDocument/definition, textDocument/declaration,
+ # etc, so it will be used for :LspGotoDefinition,
+ # :LspGotoDeclaration, etc
+ {
+ filetype: ['html'],
+ path: 'html-language-server',
+ args: ['--stdio']
+ }
+ ])
<
By proving the configuration |lsp-cfg-features| it's possible specify which
-servers should be used for a given method. The following flags are supported
->
-#{
- completion: true,
- definition: true,
- declaration: true,
- typeDefinition: true,
- implementation: true,
- hover: true,
- references: true,
- documentHighlight: true,
- documentFormatting: true,
- rename: true,
- codeAction: true,
- codeLens: true,
- selectionRange: true,
- foldingRange: true
-}
+servers should be used for a given method. The following flags are supported: >
+
+ #{
+ completion: true,
+ definition: true,
+ declaration: true,
+ typeDefinition: true,
+ implementation: true,
+ hover: true,
+ references: true,
+ documentHighlight: true,
+ documentFormatting: true,
+ rename: true,
+ codeAction: true,
+ codeLens: true,
+ selectionRange: true,
+ foldingRange: true
+ }
<
-
As shown above the order of when the language servers are being defined is taken
into account for a given method. However sometimes the language server that you
want to use for formatting also reports that it supports other features, in such
language server should be used for a given method.
For example, if you want to use the efm-langserver for formatting, but the
-typescript-language-server for everything else:
+typescript-language-server for everything else: >
vim9script
}
])
<
+
vim:tw=78:ts=8:noet:ft=help:norl: