]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Created a option to use popup menu in code action
authorD4yvid <kkd4yv1d@gmail.com>
Thu, 27 Oct 2022 00:18:32 +0000 (21:18 -0300)
committerD4yvid <kkd4yv1d@gmail.com>
Thu, 27 Oct 2022 00:18:32 +0000 (21:18 -0300)
autoload/lsp/options.vim
doc/lsp.txt

index a067a543ef517de2e9eb5d4bfcd63b3f19a54655..5308e83c0482d7754f34c2bcf62da0dd1a193599 100644 (file)
@@ -36,49 +36,10 @@ export var lspOptions: dict<any> = {
   showDiagInPopup: true,
   # Don't print message when a configured language server is missing.
   ignoreMissingServer: false,
-  # Customize all LSP kinds from the completion popup
-  lspKinds: {},
   # Use a floating menu to show the code action menu instead of asking for input
   usePopupInCodeAction: false
 }
 
-export var defaultLspKinds: dict<string> = {
-  text: 't',
-  method: 'm',
-  function: 'f',
-  constructor: 'C',
-  field: 'F',
-  variable: 'v',
-  class: 'c',
-  interface: 'i',
-  module: 'M',
-  property: 'p',
-  unit: 'u',
-  value: 'V',
-  enum: 'e',
-  keyword: 'k',
-  snippet: 'S',
-  color: 'C',
-  file: 'f',
-  reference: 'r',
-  folder: 'F',
-  enumMember: 'E',
-  constant: 'd',
-  struct: 's',
-  event: 'E',
-  operator: 'o',
-  typeParameter: 'T'
-}
-
-# get a custom LSP kind to use in the completion
-export def GetLspKind(name: string): string
-  if has_key(lspOptions.lspKinds, name)
-    return lspOptions.lspKinds[name]
-  endif
-
-  return defaultLspKinds[name]
-enddef
-
 # set LSP options from user provided options
 export def OptionsSet(opts: dict<any>)
   for key in opts->keys()
index 78874bc3970c9f5c37352b394f1b4acbacca95af..d885cc02a72ff28dc328687829d173d5edfdafb0 100644 (file)
@@ -267,6 +267,10 @@ showDiagInPopup            When using the |:LspDiagCurrent| command to display
                        popup window to display the message instead of
                        echoing in the status area.  By default this is set to
                        true.
+usePopupInCodeAction    When using the |:LspCodeAction| command to display the
+                       code action for the current line, use a popup menu
+                       instead of echoing.
+                       By default this is set to false.
 ignoreMissingServer    Do not print a missing language server executable.
                        By default this is set to false.