Explorar el Código

fix: move jsonls commands under setup (#1685)

Abouzar Parvan hace 3 años
padre
commit
5fef931d87
Se han modificado 1 ficheros con 7 adiciones y 5 borrados
  1. 7 5
      lua/lsp/providers/jsonls.lua

+ 7 - 5
lua/lsp/providers/jsonls.lua

@@ -183,11 +183,13 @@ local opts = {
       schemas = extended_schemas,
     },
   },
-  commands = {
-    Format = {
-      function()
-        vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 })
-      end,
+  setup = {
+    commands = {
+      Format = {
+        function()
+          vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 })
+        end,
+      },
     },
   },
 }