diff options
author | aktersnurra <grydholm@kth.se> | 2021-04-19 21:45:03 +0200 |
---|---|---|
committer | aktersnurra <grydholm@kth.se> | 2021-04-19 21:45:03 +0200 |
commit | 69347ce034f8966579e72dc969ec808363fdfaeb (patch) | |
tree | 3be9e1b1547a0871826b6112a0d88406572b02ba /.config/nvim/lua/lsp/json-ls.lua | |
parent | 23b895222a16925d39d04d45dedbedec9db0c752 (diff) |
Add missing files of nvim conf
Diffstat (limited to '.config/nvim/lua/lsp/json-ls.lua')
-rw-r--r-- | .config/nvim/lua/lsp/json-ls.lua | 16 |
1 files changed, 16 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..952673a --- /dev/null +++ b/.config/nvim/lua/lsp/json-ls.lua @@ -0,0 +1,16 @@ +-- npm install -g vscode-json-languageserver +require'lspconfig'.jsonls.setup { + cmd = { + "node", DATA_PATH .. "/lspinstall/json/vscode-json/json-language-features/server/dist/node/jsonServerMain.js", + "--stdio" + }, + on_attach = require'lsp'.common_on_attach, + + commands = { + Format = { + function() + vim.lsp.buf.range_formatting({}, {0, 0}, {vim.fn.line("$"), 0}) + end + } + } +} |