Adds configuration and packages for lsp
This commit is contained in:
parent
e80172efaf
commit
89eab258b0
9 changed files with 224 additions and 4 deletions
17
home/modules/nvim/config/lsp/jsonls.lua
Normal file
17
home/modules/nvim/config/lsp/jsonls.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
return {
|
||||
cmd = { 'vscode-json-language-server', '--stdio' },
|
||||
filetypes = { 'json', 'jsonc' },
|
||||
init_options = {
|
||||
provideFormatter = true,
|
||||
},
|
||||
root_dir = function(fname)
|
||||
return vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
|
||||
end,
|
||||
single_file_support = true,
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require("schemastore").json.schemas(),
|
||||
validate = { enable = true }
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue