Archived
0
0
Fork 0
This repository has been archived on 2024-02-06. You can view files and clone it, but cannot push or open issues or pull requests.
neovim-config/lua/plugins/configs/lsp/mason.lua
Daryl Ronningen 69181599a5 rewrite config from scratch (#1)
Makes all the plugins lazyload, remove plugins with duplicate uses and just general nit picks and improvements

Reviewed-on: Relms/neovim-config#1
2022-09-02 17:42:32 +00:00

29 lines
717 B
Lua

local mason = require("mason")
local lspconfig = require("lspconfig")
local mason_lspconfig = require("mason-lspconfig")
mason.setup()
mason_lspconfig.setup()
lspconfig.util.default_config = vim.tbl_extend("force", lspconfig.util.default_config, {
on_attach = require("plugins.configs.lsp.handlers").on_attach,
capabilities = require("plugins.configs.lsp.handlers").capabilities,
})
mason_lspconfig.setup_handlers({
function(server_name)
lspconfig[server_name].setup({})
end,
["jsonls"] = function()
local schemastore = require("schemastore")
lspconfig.jsonls.setup({
settings = {
json = {
schemas = schemastore.json.schemas(),
validate = { enable = true },
},
},
})
end,
})