Sfoglia il codice sorgente

fix: bring back NlspConfig completion (#1682)

Abouzar Parvan 3 anni fa
parent
commit
8fb404f7d6
1 ha cambiato i file con 10 aggiunte e 20 eliminazioni
  1. 10 20
      lua/lsp/providers/jsonls.lua

+ 10 - 20
lua/lsp/providers/jsonls.lua

@@ -129,10 +129,6 @@ local schemas = {
     },
     url = "https://json.schemastore.org/golangci-lint.json",
   },
-  {
-    description = "JSON Schema for Grafana 5.x Dashboards",
-    url = "https://json.schemastore.org/grafana-dashboard-5.x.json",
-  },
   {
     description = "JSON schema for the JSON Feed format",
     fileMatch = {
@@ -158,10 +154,6 @@ local schemas = {
     },
     url = "https://json.schemastore.org/package.json",
   },
-  {
-    description = "Traefik v2 Dynamic Configuration File Provider",
-    url = "https://json.schemastore.org/traefik-v2-file-provider.json",
-  },
   {
     description = "JSON schema for Visual Studio component configuration files",
     fileMatch = {
@@ -186,18 +178,16 @@ end
 local extended_schemas = extend(schemas, default_schemas)
 
 local opts = {
-  setup = {
-    settings = {
-      json = {
-        schemas = extended_schemas,
-      },
-    },
-    commands = {
-      Format = {
-        function()
-          vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 })
-        end,
-      },
+  settings = {
+    json = {
+      schemas = extended_schemas,
+    },
+  },
+  commands = {
+    Format = {
+      function()
+        vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 })
+      end,
     },
   },
 }