From: Enno Date: Mon, 20 Nov 2023 08:24:31 +0000 (+0100) Subject: update default options X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=97dc5a05b0daa4ba65ee15865a1ca7004bb3a4b7;p=vim-lsp.git update default options the documentation no longer reflected autoload/lsp/options.vim (lines 9-162): export var lspOptions: dict = { # Enable ale diagnostics support. # If true, diagnostics will be sent to ale, which will be responsible for # showing them. aleSupport: false, # In insert mode, complete the current symbol automatically # Otherwise, use omni-completion autoComplete: true, # In normal mode, highlight the current symbol automatically autoHighlight: false, # Automatically highlight diagnostics messages from LSP server autoHighlightDiags: true, # Automatically populate the location list with new diagnostics autoPopulateDiags: false, # icase | fuzzy | case match for language servers that replies with a full # list of completion items completionMatcher: 'case', # Due to a bug in the earlier versions of Vim, cannot use the # COMPLETIONMATCHER_CASE constant here for initialization. completionMatcherValue: 1, # diagnostics signs options diagSignErrorText: 'E>', diagSignHintText: 'H>', diagSignInfoText: 'I>', diagSignWarningText: 'W>', # In insert mode, echo the current symbol signature in the status line # instead of showing it in a popup echoSignature: false, # hide disabled code actions hideDisabledCodeActions: false, # Highlight diagnostics inline highlightDiagInline: true, # Show the symbol documentation in the preview window instead of in a popup hoverInPreview: false, # Don't print message when a configured language server is missing. ignoreMissingServer: false, # Focus on the location list window after ":LspDiag show" keepFocusInDiags: true, # Focus on the location list window after LspShowReferences keepFocusInReferences: true, # 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. completionTextEdit: true, # Alignment of virtual diagnostic text, when showDiagWithVirtualText is true # Allowed values: 'above' | 'below' | 'after' (default is 'above') diagVirtualTextAlign: 'above', # Suppress adding a new line on completion selection with noNewlineInCompletion: false, # Omni-completion support. To keep backward compatibility, this option is # set to null by default instead of false. omniComplete: null, # Open outline window on right side outlineOnRight: false, # Outline window size outlineWinSize: 20, # Show diagnostic text in a balloon when the mouse is over the diagnostic showDiagInBalloon: true, # Make diagnostics show in a popup instead of echoing showDiagInPopup: true, # Suppress diagnostic hover from appearing when the mouse is over the line # Show a diagnostic message on a status line showDiagOnStatusLine: false, # Show a diagnostic messages using signs showDiagWithSign: true, # Show a diagnostic messages with virtual text showDiagWithVirtualText: false, # enable inlay hints showInlayHints: false, # In insert mode, show the current symbol signature automatically showSignature: true, # enable snippet completion support snippetSupport: false, # enable SirVer/ultisnips completion support ultisnipsSupport: false, # add to autocomplition list current buffer words useBufferCompletion: false, # Use a floating menu to show the code action menu instead of asking for # input usePopupInCodeAction: false, # ShowReferences in a quickfix list instead of a location list` useQuickfixForLocations: false, # enable hrsh7th/vim-vsnip completion support vsnipSupport: false, # Limit the time autocompletion searches for words in current buffer (in # milliseconds) bufferCompletionTimeout: 100, # Enable support for custom completion kinds customCompletionKinds: false, # A dictionary with all completion kinds that you want to customize completionKinds: {} } # set the LSP plugin options from the user provided option values export def OptionsSet(opts: dict) lspOptions->extend(opts) if !has('patch-9.0.0178') lspOptions.showInlayHints = false endif if !has('patch-9.0.1157') lspOptions.showDiagWithVirtualText = false endif # For faster comparison, convert the 'completionMatcher' option value from a # string to a number. if lspOptions.completionMatcher == 'icase' lspOptions.completionMatcherValue = COMPLETIONMATCHER_ICASE elseif lspOptions.completionMatcher == 'fuzzy' lspOptions.completionMatcherValue = COMPLETIONMATCHER_FUZZY else lspOptions.completionMatcherValue = COMPLETIONMATCHER_CASE endif # Apply the changed options if exists('#LspCmds#User#LspOptionsChanged') :doautocmd LspCmds User LspOptionsChanged endif enddef --- diff --git a/README.md b/README.md index 25aa380..ec63932 100644 --- a/README.md +++ b/README.md @@ -110,41 +110,46 @@ Some of the LSP plugin features can be enabled or disabled by using the LspOptio Here is an example of configuration with default values: ```viml call LspOptionsSet(#{ - \ aleSupport: v:false, - \ autoComplete: v:true, - \ autoHighlight: v:false, - \ autoHighlightDiags: v:true, - \ autoPopulateDiags: v:false, - \ completionMatcher: 'case', - \ completionTextEdit: v:true, - \ completionKinds: {}, - \ customCompletionKinds: v:false, - \ diagSignErrorText: 'E>', - \ diagSignInfoText: 'I>', - \ diagSignHintText: 'H>', - \ diagSignWarningText: 'W>', - \ diagVirtualTextAlign: 'above', - \ echoSignature: v:false, - \ hideDisabledCodeActions: v:false, - \ highlightDiagInline: v:true, - \ hoverInPreview: v:false, - \ ignoreMissingServer: v:false, - \ keepFocusInReferences: v:false, - \ noNewlineInCompletion: v:false, - \ outlineOnRight: v:false, - \ outlineWinSize: 20, - \ showDiagInBalloon: v:true, - \ showDiagInPopup: v:true, - \ showDiagOnStatusLine: v:false, - \ showDiagWithSign: v:true, - \ showDiagWithVirtualText: v:false, - \ showInlayHints: v:false, - \ showSignature: v:true, - \ snippetSupport: v:false, - \ ultisnipsSupport: v:false, - \ usePopupInCodeAction: v:false, - \ useQuickfixForLocations: v:false, - \ useBufferCompletion: v:false, + \ aleSupport: false, + \ autoComplete: true, + \ autoHighlight: false, + \ autoHighlightDiags: true, + \ autoPopulateDiags: false, + \ completionMatcher: 'case', + \ completionMatcherValue: 1, + \ diagSignErrorText: 'E>', + \ diagSignHintText: 'H>', + \ diagSignInfoText: 'I>', + \ diagSignWarningText: 'W>', + \ echoSignature: false, + \ hideDisabledCodeActions: false, + \ highlightDiagInline: true, + \ hoverInPreview: false, + \ ignoreMissingServer: false, + \ keepFocusInDiags: true, + \ keepFocusInReferences: true, + \ completionTextEdit: true, + \ diagVirtualTextAlign: 'above', + \ noNewlineInCompletion: false, + \ omniComplete: null, + \ outlineOnRight: false, + \ outlineWinSize: 20, + \ showDiagInBalloon: true, + \ showDiagInPopup: true, + \ showDiagOnStatusLine: false, + \ showDiagWithSign: true, + \ showDiagWithVirtualText: false, + \ showInlayHints: false, + \ showSignature: true, + \ snippetSupport: false, + \ ultisnipsSupport: false, + \ useBufferCompletion: false, + \ usePopupInCodeAction: false, + \ useQuickfixForLocations: false, + \ vsnipSupport: false, + \ bufferCompletionTimeout: 100, + \ customCompletionKinds: false, + \ completionKinds: {} \ }) ```