summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/_lsp/json-ls.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/_lsp/json-ls.lua')
-rw-r--r--.config/nvim/lua/_lsp/json-ls.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/nvim/lua/_lsp/json-ls.lua b/.config/nvim/lua/_lsp/json-ls.lua
new file mode 100644
index 0000000..d13fed3
--- /dev/null
+++ b/.config/nvim/lua/_lsp/json-ls.lua
@@ -0,0 +1,10 @@
+-- npm install -g vscode-json-languageserver
+require'lspconfig'.jsonls.setup {
+ commands = {
+ Format = {
+ function()
+ vim.lsp.buf.range_formatting({},{0,0},{vim.fn.line("$"),0})
+ end
+ }
+ }
+}