]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
up
authorOleksiy Hryshchenko <greeschenko@gmail.com>
Wed, 29 Mar 2023 18:39:17 +0000 (21:39 +0300)
committerOleksiy Hryshchenko <greeschenko@gmail.com>
Wed, 29 Mar 2023 18:39:17 +0000 (21:39 +0300)
autoload/lsp/diag.vim
autoload/lsp/options.vim
doc/lsp.txt

index 18c247b36bc8cabc7d619b7fd8b76ba99a44ee52..5b20f4f3967de17dbd89f7028aa7707fbed57a89 100644 (file)
@@ -13,26 +13,26 @@ export def InitOnce()
   sign_define([
         {
             name: 'LspDiagError',
-            text: opt.lspOptions.diagSignOpts.error.text,
-            texthl: opt.lspOptions.diagSignOpts.error.texthl,
+            text: opt.lspOptions.diagSignErrorText,
+            texthl: opt.lspOptions.diagSignErrorTexthl,
                    linehl: lineHL
         },
                {
             name: 'LspDiagWarning',
-            text: opt.lspOptions.diagSignOpts.warning.text,
-            texthl: opt.lspOptions.diagSignOpts.warning.texthl,
+            text: opt.lspOptions.diagSignWarningText,
+            texthl: opt.lspOptions.diagSignWarningTexthl,
             linehl: lineHL
         },
                {
             name: 'LspDiagInfo',
-            text: opt.lspOptions.diagSignOpts.info.text,
-            texthl: opt.lspOptions.diagSignOpts.info.texthl,
+            text: opt.lspOptions.diagSignInfoText,
+            texthl: opt.lspOptions.diagSignInfoTexthl,
             linehl: lineHL
         },
                {
             name: 'LspDiagHint',
-            text: opt.lspOptions.diagSignOpts.hint.text,
-            texthl: opt.lspOptions.diagSignOpts.hint.texthl,
+            text: opt.lspOptions.diagSignHintText,
+            texthl: opt.lspOptions.diagSignHintTexthl,
             linehl: lineHL
         }
   ])
index f8e648e9fe3d638b68b10950633a7d9085a92d0f..d99f759a8cff0763a64b5efb9a1000e0d65148cf 100644 (file)
@@ -54,24 +54,14 @@ export var lspOptions: dict<any> = {
   # list of completion items
   completionMatcher: 'case',
   # diagnostics signs options
-  diagSignOpts: {
-      error: {
-          text: 'E>',
-          texthl: 'ErrorMsg',
-      },
-      warning: {
-          text: 'W>',
-          texthl: 'Search',
-      },
-      info: {
-          text: 'I>',
-          texthl: 'Pmenu',
-      },
-      hint: {
-          text: 'H>',
-          texthl: 'Question',
-      },
-  },
+  diagSignErrorText: 'E>',
+  diagSignErrorTexthl: 'ErrorMsg',
+  diagSignWarningText: 'W>',
+  diagSignWarningTexthl: 'Search',
+  diagSignInfoText: 'I>',
+  diagSignInfoTexthl: 'Pmenu',
+  diagSignHintText: 'H>',
+  diagSignHintTexthl: 'Question',
 }
 
 # set the LSP plugin options from the user provided option values
index 10e353da9291d5d2ac9c93a67f84fe5523e811d9..92ebf3e69da64ffc015e314ca6c2ccf7ccb67595 100644 (file)
@@ -351,27 +351,22 @@ usePopupInCodeAction    |Boolean| option.  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.
-diagSignOpts |dict<any>| option. Options that allow you to change diagnostic
-            sings text and highlight
-            default settings
-              diagSignOpts: {
-                  error: {
-                      text: 'E>',
-                      texthl: 'ErrorMsg',
-                  },
-                  warning: {
-                      text: 'W>',
-                      texthl: 'Search',
-                  },
-                  info: {
-                      text: 'I>',
-                      texthl: 'Pmenu',
-                  },
-                  hint: {
-                      text: 'H>',
-                      texthl: 'Question',
-                  },
-              },
+diagSignErrorText       |String| option. Change diag sign text for errors
+                        By default 'E>'
+diagSignErrorTexthl     |String| option. Change diag sign highlight for errors
+                        By default 'ErrorMsg',
+diagSignWarningText     |String| option. Change diag sign text for warnings
+                        By default 'W>',
+diagSignWarningTexthl   |String| option. Change diag sign highlight for warnings
+                        By default 'Search',
+diagSignInfoText        |String| option. Change diag sign text for info
+                        By default 'I>',
+diagSignInfoTexthl      |String| option. Change diag sign text highlight info
+                        By default 'Pmenu',
+diagSignHintText        |String| option. Change diag sign text for hints
+                        By default 'H>',
+diagSignHintTexthl      |String| option. Change diag sign highlight for hints
+                        By default 'Question',
 
 
 For example, to disable the automatic placement of signs for the LSP