enddef
var SupportedCheckFns = {
+ callHierarchy: (lspserver) => lspserver.isCallHierarchyProvider,
codeAction: (lspserver) => lspserver.isCodeActionProvider,
codeLens: (lspserver) => lspserver.isCodeLensProvider,
completion: (lspserver) => lspserver.isCompletionProvider,
definition: (lspserver) => lspserver.isDefinitionProvider,
documentFormatting: (lspserver) => lspserver.isDocumentFormattingProvider,
documentHighlight: (lspserver) => lspserver.isDocumentHighlightProvider,
+ documentSymbol: (lspserver) => lspserver.isDocumentSymbolProvider,
foldingRange: (lspserver) => lspserver.isFoldingRangeProvider,
hover: (lspserver) => lspserver.isHoverProvider,
implementation: (lspserver) => lspserver.isImplementationProvider,
+ inlayHint: (lspserver) => lspserver.isInlayHintProvider,
references: (lspserver) => lspserver.isReferencesProvider,
rename: (lspserver) => lspserver.isRenameProvider,
selectionRange: (lspserver) => lspserver.isSelectionRangeProvider,
+ signatureHelp: (lspserver) => lspserver.isSignatureHelpProvider,
typeDefinition: (lspserver) => lspserver.isTypeDefinitionProvider,
+ typeHierarchy: (lspserver) => lspserver.isTypeHierarchyProvider,
+ workspaceSymbol: (lspserver) => lspserver.isWorkspaceSymbolProvider
}
# Returns the LSP server for the buffer "bnr". If "feature" is specified,
b:LspInlayHintsTimer = -1
endif
- var lspserver: dict<any> = buf.CurbufGetServerChecked()
+ var lspserver: dict<any> = buf.CurbufGetServerChecked('inlayHint')
if lspserver->empty()
return
endif
# Show the signature using "textDocument/signatureHelp" LSP method
# Invoked from an insert-mode mapping, so return an empty string.
def g:LspShowSignature(): string
- var lspserver: dict<any> = buf.CurbufGetServerChecked()
+ var lspserver: dict<any> = buf.CurbufGetServerChecked('signatureHelp')
if lspserver->empty()
return ''
endif
return
endif
- var lspserver: dict<any> = buf.CurbufGetServer()
+ var lspserver: dict<any> = buf.CurbufGetServer('documentSymbol')
if lspserver->empty() || !lspserver.running || !lspserver.ready
return
endif
return
endif
- var lspserver: dict<any> = buf.CurbufGetServer()
+ var lspserver: dict<any> = buf.CurbufGetServer('documentSymbol')
if lspserver->empty() || !lspserver.running || !lspserver.ready
return
endif
# Display all the locations where the current symbol is called from.
# Uses LSP "callHierarchy/incomingCalls" request
export def IncomingCalls()
- var lspserver: dict<any> = buf.CurbufGetServerChecked()
+ var lspserver: dict<any> = buf.CurbufGetServerChecked('callHierarchy')
if lspserver->empty()
return
endif
# Display all the symbols used by the current symbol.
# Uses LSP "callHierarchy/outgoingCalls" request
export def OutgoingCalls()
- var lspserver: dict<any> = buf.CurbufGetServerChecked()
+ var lspserver: dict<any> = buf.CurbufGetServerChecked('callHierarchy')
if lspserver->empty()
return
endif
# Display the type hierarchy for the current symbol. Direction is 0 for
# sub types and 1 for super types.
export def TypeHierarchy(direction: number)
- var lspserver: dict<any> = buf.CurbufGetServerChecked()
+ var lspserver: dict<any> = buf.CurbufGetServerChecked('typeHierarchy')
if lspserver->empty()
return
endif
# Perform a workspace wide symbol lookup
# Uses LSP "workspace/symbol" request
export def SymbolSearch(queryArg: string, cmdmods: string)
- var lspserver: dict<any> = buf.CurbufGetServerChecked()
+ var lspserver: dict<any> = buf.CurbufGetServerChecked('workspaceSymbol')
if lspserver->empty()
return
endif
# Support the clangd version of type hierarchy retrieval method.
# The method described in the LSP 3.17.0 standard is not supported as clangd
# doesn't support that method.
-def TypeHiearchy(lspserver: dict<any>, direction: number)
+def TypeHierarchy(lspserver: dict<any>, direction: number)
# Check whether LSP server supports type hierarchy
if !lspserver.isTypeHierarchyProvider
util.ErrMsg('LSP server does not support type hierarchy')
outgoingCalls: function(OutgoingCalls, [lspserver]),
getOutgoingCalls: function(GetOutgoingCalls, [lspserver]),
inlayHintsShow: function(InlayHintsShow, [lspserver]),
- typeHierarchy: function(TypeHiearchy, [lspserver]),
+ typeHierarchy: function(TypeHierarchy, [lspserver]),
renameSymbol: function(RenameSymbol, [lspserver]),
codeAction: function(CodeAction, [lspserver]),
codeLens: function(CodeLens, [lspserver]),
Author: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
For Vim version 9.0 and above
-Last change: June 18, 2023
+Last change: June 25, 2023
==============================================================================
CONTENTS *lsp-contents*
==============================================================================
17. Language Server Features *lsp-features*
-By providing the configuration |lsp-cfg-features| it's possible to specify
-which servers should be used for a given method. The following feature flags
-are supported: See |lsp-multiple-servers| for examples.
+When using multiple language servers for a given file type, by providing the
+configuration |lsp-cfg-features| it is possible to specify which language
+server should be used for a given method/functionality. The following feature
+flags are supported: See |lsp-multiple-servers| for examples.
+ *lsp-features-callHierarchy*
+callHierarchy Used by the|:LspIncomingCalls| and the
+ |:LspOutgoingCalls| commands.
*lsp-features-codeAction*
-codeAction Used by |:LspCodeAction|
+codeAction Used by the |:LspCodeAction| command.
*lsp-features-codeLens*
-codeLens Used by |:LspCodeLens|
+codeLens Used by the |:LspCodeLens| command.
*lsp-features-completion*
completion Used by 24/7 Completion and 'omnifunc'
*lsp-features-declaration*
-declaration Used by |:LspGotoDeclaration|, and
- |:LspPeekDeclaration|
+declaration Used by the |:LspGotoDeclaration|, and
+ the |:LspPeekDeclaration| commands.
*lsp-features-definition*
-definition Used by |:LspGotoDefinition|, and
- |:LspPeekDefinition|
+definition Used by the|:LspGotoDefinition|, and
+ the |:LspPeekDefinition| commands.
*lsp-features-diagnostics*
diagnostics Used to disable diagnostics for a single
language server, by default diagnostics are
this to |false| you can ignore diagnostics
from a specific server.
*lsp-features-documentFormatting*
-documentFormatting Used by |:LspFormat|, and 'formatexpr'
+documentFormatting Used by the |:LspFormat| command, and
+ 'formatexpr'
*lsp-features-documentHighlight*
documentHighlight Used by the |:LspHighlight| and the
|:LspHighlightClear| commands.
+ *lsp-features-documentSymbol*
+documentSymbol Used by the |:LspDocumentSymbol| and the
+ |:LspOutline| commands.
*lsp-features-foldingRange*
-foldingRange Used by |:LspFold|
+foldingRange Used by the|:LspFold| command.
*lsp-features-hover*
-hover Used by |:LspHover|
+hover Used by the |:LspHover| command.
*lsp-features-implementation*
-implementation Used by |:LspGotoImpl|, and |:LspPeekImpl|
+implementation Used by the |:LspGotoImpl| and the
+ |:LspPeekImpl| commands.
+ *lsp-features-inlayHint*
+inlayHint Used to show the inlay hints for
+ function/method arguments.
*lsp-features-references*
-references Used by |:LspShowReferences|
+references Used by the |:LspShowReferences| command.
*lsp-features-rename*
-rename Used by |:LspRename|
+rename Used by the |:LspRename| command.
*lsp-features-selectionRange*
selectionRange Used by the |:LspSelectionExpand| and the
|:LspSelectionShrink| commands.
+ *lsp-features-signatureHelp*
+signatureHelp Used by the |:LspShowSignature| command.
*lsp-features-typeDefinition*
typeDefinition Used by the |:LspGotoTypeDef| and the
|:LspPeekTypeDef| commands.
+typeHierarchy Used by the |:LspSubTypeHierarchy| and the
+ |:LspSuperTypeHiearchy| commands.
+workspaceSymbol Used by the |:LspSymbolSearch| command.
==============================================================================
*lsp-license*