mirror of
https://github.com/halfdan/dotfiles.git
synced 2025-09-11 04:06:23 +00:00
Migrate neovim config to lua
This commit is contained in:
16
.config/nvim/lua/lsp/json-ls.lua
Normal file
16
.config/nvim/lua/lsp/json-ls.lua
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user