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

30 lines
717 B
Lua
Raw Permalink Normal View History

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,
})