Procházet zdrojové kódy

add @usage to fields

Chris před 4 roky
rodič
revize
dae4864d45
2 změnil soubory, kde provedl 14 přidání a 4 odebrání
  1. 12 4
      lua/nv-globals.lua
  2. 2 0
      nv-settings.lua

+ 12 - 4
lua/nv-globals.lua

@@ -4,6 +4,7 @@ O = {
     colorscheme = 'nvcode',
     python = {
         linter = '',
+        -- @usage can be 'yapf'
         formatter = '',
         autoformat = false,
         isort = false,
@@ -11,26 +12,33 @@ O = {
     },
 
     lua = {
-
-        -- @usage can be lua-format
+        -- @usage can be 'lua-format'
         formatter = '',
-
         autoformat = false,
         diagnostics = {virtual_text = true, signs = true, underline = true}
     },
     sh = {
+        -- @usage can be 'shellcheck'
         linter = '',
+        -- @usage can be 'shfmt'
         formatter = '',
         autoformat = false,
         diagnostics = {virtual_text = true, signs = true, underline = true}
     },
     tsserver = {
+        -- @usage can be 'eslint'
         linter = '',
+        -- @usage can be 'prettier'
         formatter = '',
         autoformat = false,
         diagnostics = {virtual_text = true, signs = true, underline = true}
     },
-    json = {formatter = '', autoformat = false, diagnostics = {virtual_text = true, signs = true, underline = true}}
+    json = {
+        -- @usage can be 'prettier'
+        formatter = '',
+        autoformat = false,
+        diagnostics = {virtual_text = true, signs = true, underline = true}
+    }
     -- css = {formatter = '', autoformat = false, virtual_text = true},
     -- json = {formatter = '', autoformat = false, virtual_text = true}
 }

+ 2 - 0
nv-settings.lua

@@ -34,3 +34,5 @@ O.tsserver.autoformat = true
 
 -- json
 O.json.autoformat = true
+
+-- create custom autocommand field (This would be easy with lua)