diff options
author | kylo252 <[email protected]> | 2021-10-03 16:13:46 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-10-03 16:13:46 +0200 |
commit | d01ba08eaec1640ac2d038893525b3ba0af25813 (patch) | |
tree | 5edf2f5a12cedacb32f0c5d45ec2d999dacb99cd /lua/lsp/providers/jsonls.lua | |
parent | 3e1cd1ec235404ae96ed2d0756729cf44ae48f3e (diff) |
refactor: auto-generate language configuration (#1584)
Refactor the monolithic `lvim.lang` design into a more modular approach.
IMPORTANT: run `:LvimUpdate` in order to generate the new ftplugin template files.
Diffstat (limited to 'lua/lsp/providers/jsonls.lua')
-rw-r--r-- | lua/lsp/providers/jsonls.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lua/lsp/providers/jsonls.lua b/lua/lsp/providers/jsonls.lua new file mode 100644 index 00000000..55bc1ea2 --- /dev/null +++ b/lua/lsp/providers/jsonls.lua @@ -0,0 +1,30 @@ +local schemas = nil +local status_ok, jsonls_settings = pcall(require, "nlspsettings.jsonls") +if status_ok then + schemas = jsonls_settings.get_default_schemas() +end + +local opts = { + setup = { + settings = { + json = { + schemas = schemas, + -- = { + -- { + -- fileMatch = { "package.json" }, + -- url = "https://json.schemastore.org/package.json", + -- }, + -- }, + }, + }, + commands = { + Format = { + function() + vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 }) + end, + }, + }, + }, +} + +return opts |