Skip to content

Commit

Permalink
feat(nvim): jsonls and yamlls with SchemaStore
Browse files Browse the repository at this point in the history
  • Loading branch information
radoslawgrochowski committed Oct 1, 2024
1 parent 0753feb commit 54c534e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 25 additions & 1 deletion modules/nvim/plugins/lsp/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,36 @@ lspconfig.efm.setup {
},
}

require('lspconfig').ltex.setup {
lspconfig.ltex.setup {
capabilities = capabilities,
on_attach = function(client, bufnr)
lspformat.on_attach(client, bufnr)
require('ltex_extra').setup {}
end,
settings = { ltex = {} },
}

local schemastore = require 'schemastore'
capabilities.textDocument.completion.completionItem.snippetSupport = true
lspconfig.jsonls.setup {
capabilities = capabilities,
settings = {
json = {
schemas = schemastore.json.schemas(),
validate = { enable = true },
},
},
}
require('lspconfig').yamlls.setup {
settings = {
yaml = {
schemaStore = {
enable = false,
url = '',
},
schemas = schemastore.json.schemas(),
},
},
}

require('fidget').setup {}
2 changes: 2 additions & 0 deletions modules/nvim/plugins/lsp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
lsp-format-nvim
ltex_extra-nvim
pkgs.localVimPlugins.vtsls-nvim
SchemaStore-nvim
];
extraPackages = with pkgs; [
efm-langserver
Expand All @@ -16,6 +17,7 @@
nodePackages.prettier
nodePackages.typescript
nodePackages.typescript-language-server
nodePackages.yaml-language-server
localNodePackages."@vtsls/language-server"
localNodePackages.vscode-langservers-extracted
nixpkgs-fmt
Expand Down

0 comments on commit 54c534e

Please sign in to comment.