2021-09-16 01:13:17 +00:00
|
|
|
-- luacheck: globals packer_plugins
|
2021-12-08 00:07:57 +00:00
|
|
|
local M = {}
|
2021-09-30 17:57:37 +00:00
|
|
|
local utils = require("utils")
|
|
|
|
|
2021-12-10 20:04:13 +00:00
|
|
|
function M.config_lsp_ui()
|
2021-12-09 17:20:06 +00:00
|
|
|
local border = {
|
2021-12-15 17:37:51 +00:00
|
|
|
{ "┌", "FloatBorder" },
|
|
|
|
{ "─", "FloatBorder" },
|
|
|
|
{ "┐", "FloatBorder" },
|
|
|
|
{ "│", "FloatBorder" },
|
|
|
|
{ "┘", "FloatBorder" },
|
|
|
|
{ "─", "FloatBorder" },
|
|
|
|
{ "└", "FloatBorder" },
|
|
|
|
{ "│", "FloatBorder" },
|
2021-12-09 17:20:06 +00:00
|
|
|
}
|
|
|
|
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
|
|
|
|
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
|
|
|
|
opts = opts or {}
|
|
|
|
opts.border = opts.border or border
|
|
|
|
return orig_util_open_floating_preview(contents, syntax, opts, ...)
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Diagnostics signs
|
2022-11-03 00:04:48 +00:00
|
|
|
for type, icon in pairs(utils.diagnostic_signs) do
|
2021-12-09 17:20:06 +00:00
|
|
|
local hl = "DiagnosticSign" .. type
|
|
|
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
|
|
|
end
|
|
|
|
|
2021-12-16 22:39:34 +00:00
|
|
|
utils.try_require("trouble", function(trouble)
|
|
|
|
trouble.setup({
|
2021-12-11 01:10:28 +00:00
|
|
|
fold_open = "▼",
|
|
|
|
fold_closed = "▶",
|
2022-01-01 01:31:46 +00:00
|
|
|
icons = false,
|
|
|
|
use_diagnostic_signs = true,
|
2021-12-15 17:37:51 +00:00
|
|
|
})
|
2021-12-16 22:39:34 +00:00
|
|
|
end)
|
2021-12-09 17:20:06 +00:00
|
|
|
end
|
|
|
|
|
2022-11-02 23:57:18 +00:00
|
|
|
local function get_server_capabilities(client)
|
|
|
|
-- HACK: Support for <0.8
|
|
|
|
if client.server_capabilities ~= nil then
|
|
|
|
return client.server_capabilities
|
|
|
|
end
|
|
|
|
|
|
|
|
local capabilities = client.resolved_capabilities
|
|
|
|
if capabilities.documentSymbolProvider == nil then
|
|
|
|
capabilities.documentSymbolProvider = capabilities.goto_definition
|
|
|
|
end
|
|
|
|
if capabilities.documentFormattingProvider == nil then
|
|
|
|
capabilities.documentFormattingProvider = capabilities.document_formatting
|
|
|
|
end
|
|
|
|
if capabilities.documentRangeFormattingProvider == nil then
|
|
|
|
capabilities.documentRangeFormattingProvider = capabilities.document_range_formatting
|
|
|
|
end
|
|
|
|
if capabilities.documentHighlightProvider == nil then
|
|
|
|
capabilities.documentHighlightProvider = capabilities.document_highlight
|
|
|
|
end
|
|
|
|
if capabilities.workspaceSymbolProvider == nil then
|
|
|
|
-- Not sure what the legacy version of this is
|
|
|
|
capabilities.workspaceSymbolProvider = capabilities.goto_definition
|
|
|
|
end
|
|
|
|
|
|
|
|
return capabilities
|
|
|
|
end
|
|
|
|
|
2022-01-12 17:21:57 +00:00
|
|
|
local function get_default_attach(override_capabilities)
|
|
|
|
return function(client, bufnr)
|
|
|
|
-- Allow overriding capabilities to avoid duplicate lsps with capabilities
|
2022-11-02 23:57:18 +00:00
|
|
|
|
|
|
|
-- Using custom method to extract for <0.8 support
|
|
|
|
local server_capabilities = get_server_capabilities(client)
|
2022-01-12 17:21:57 +00:00
|
|
|
if override_capabilities ~= nil then
|
2022-11-02 23:57:18 +00:00
|
|
|
server_capabilities = vim.tbl_extend("force", server_capabilities, override_capabilities or {})
|
2022-01-12 17:21:57 +00:00
|
|
|
end
|
2022-01-10 18:47:51 +00:00
|
|
|
|
2022-01-12 17:21:57 +00:00
|
|
|
local function buf_set_option(...)
|
|
|
|
vim.api.nvim_buf_set_option(bufnr, ...)
|
|
|
|
end
|
2022-01-10 18:47:51 +00:00
|
|
|
|
2022-11-02 23:57:18 +00:00
|
|
|
-- Set built in features to use lsp functions (automatic in nvim-0.8)
|
|
|
|
-- HACK: Support for <0.8
|
2022-11-03 00:04:48 +00:00
|
|
|
if vim.fn.has("nvim-0.8") ~= 1 then
|
2022-11-02 23:57:18 +00:00
|
|
|
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
|
|
|
|
if server_capabilities.documentSymbolProvider then
|
|
|
|
buf_set_option("tagfunc", "v:lua.vim.lsp.tagfunc")
|
|
|
|
end
|
|
|
|
if server_capabilities.documentFormattingProvider then
|
|
|
|
buf_set_option("formatexpr", "v:lua.vim.lsp.formatexpr()")
|
|
|
|
end
|
2022-01-12 17:21:57 +00:00
|
|
|
end
|
2021-08-24 17:38:14 +00:00
|
|
|
|
2022-01-12 17:21:57 +00:00
|
|
|
-- Mappings
|
2023-06-09 19:10:55 +00:00
|
|
|
-- TODO: use functions instead of strings when dropping 0.6
|
|
|
|
local lsp_keymap = utils.curry_keymap("n", "<leader>l", { buffer = bufnr })
|
2023-06-13 23:48:07 +00:00
|
|
|
lsp_keymap("h", function()
|
|
|
|
vim.lsp.buf.hover()
|
|
|
|
end, { desc = "Display hover" })
|
|
|
|
lsp_keymap("rn", function()
|
|
|
|
vim.lsp.buf.rename()
|
|
|
|
end, { desc = "Refactor rename" })
|
|
|
|
lsp_keymap("e", function()
|
|
|
|
vim.diagnostic.open_float()
|
|
|
|
end, { desc = "Open float dialog" })
|
|
|
|
lsp_keymap("D", function()
|
|
|
|
vim.lsp.buf.declaration()
|
|
|
|
end, { desc = "Go to declaration" })
|
|
|
|
lsp_keymap("d", function()
|
|
|
|
vim.lsp.buf.definition()
|
|
|
|
end, { desc = "Go to definition" })
|
|
|
|
lsp_keymap("t", function()
|
|
|
|
vim.lsp.buf.type_definition()
|
|
|
|
end, { desc = "Go to type definition" })
|
|
|
|
lsp_keymap("i", function()
|
|
|
|
vim.lsp.buf.implementation()
|
|
|
|
end, { desc = "Show implementations" })
|
|
|
|
lsp_keymap("s", function()
|
|
|
|
vim.lsp.buf.signature_help()
|
|
|
|
end, { desc = "Show signature help" })
|
|
|
|
lsp_keymap("wa", function()
|
|
|
|
vim.lsp.buf.add_workspace_folder()
|
|
|
|
end, { desc = "Workspace: Add folder" })
|
|
|
|
lsp_keymap("wr", function()
|
|
|
|
vim.lsp.buf.remove_workspace_folder()
|
|
|
|
end, { desc = "Workspace: Remove folder" })
|
|
|
|
lsp_keymap("wl", function()
|
|
|
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
|
|
|
end, { desc = "Workspace: List folders" })
|
|
|
|
lsp_keymap("r", function()
|
|
|
|
vim.lsp.buf.references()
|
|
|
|
end, { desc = "References" })
|
|
|
|
lsp_keymap("p", function()
|
|
|
|
vim.lsp.diagnostic.goto_prev()
|
|
|
|
end, { desc = "Diagnostics: Go to previous" })
|
|
|
|
lsp_keymap("n", function()
|
|
|
|
vim.lsp.diagnostic.goto_next()
|
|
|
|
end, { desc = "Diagnostics: Go to next" })
|
2022-01-12 17:21:57 +00:00
|
|
|
|
2022-03-01 20:27:15 +00:00
|
|
|
-- Set insert keymap for signature help
|
2023-06-13 23:48:07 +00:00
|
|
|
utils.keymap_set("i", "<C-k>", function()
|
|
|
|
vim.lsp.buf.signature_help()
|
|
|
|
end, { buffer = bufnr, desc = "Show signature help" })
|
2022-03-01 20:27:15 +00:00
|
|
|
|
2022-01-12 17:59:29 +00:00
|
|
|
-- Older keymaps
|
2023-06-09 19:10:55 +00:00
|
|
|
--[[
|
2022-01-12 17:21:57 +00:00
|
|
|
buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
|
|
|
buf_set_keymap("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
|
|
|
buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
|
|
|
buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
|
|
|
buf_set_keymap("n", "<leader>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
|
|
|
|
buf_set_keymap("n", "<leader>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts)
|
|
|
|
buf_set_keymap("n", "<leader>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", opts)
|
|
|
|
buf_set_keymap("n", "<leader>D", "<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
|
|
|
|
buf_set_keymap("n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
|
|
|
|
buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
2022-03-01 20:28:25 +00:00
|
|
|
buf_set_keymap("n", "<leader>e", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
|
2022-01-12 17:21:57 +00:00
|
|
|
buf_set_keymap("n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
|
|
|
|
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
|
|
|
|
buf_set_keymap("n", "<leader>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
|
2023-06-09 19:10:55 +00:00
|
|
|
--]]
|
2022-01-12 17:21:57 +00:00
|
|
|
|
|
|
|
-- Open diagnostic on hold
|
|
|
|
if vim["diagnostic"] ~= nil then
|
2023-06-09 19:10:55 +00:00
|
|
|
-- TODO: When dropping 0.6, use lua aucommand api
|
2022-03-01 20:28:25 +00:00
|
|
|
vim.cmd([[autocmd CursorHold * lua vim.diagnostic.open_float(nil, {focus=false, scope="cursor"})]])
|
2022-01-12 17:21:57 +00:00
|
|
|
end
|
2021-12-10 20:04:13 +00:00
|
|
|
|
2022-06-07 16:52:22 +00:00
|
|
|
-- Use IncRename if available
|
|
|
|
if utils.try_require("inc_rename") ~= nil then
|
2023-06-09 19:10:55 +00:00
|
|
|
-- TODO: Should I be using this for calling lua functions from keymaps?
|
2022-11-02 23:57:18 +00:00
|
|
|
vim.keymap.set("n", "<leader>rn", function()
|
|
|
|
return ":IncRename " .. vim.fn.expand("<cword>")
|
|
|
|
end, { expr = true, buffer = true, desc = "Rename current symbol" })
|
2022-06-07 16:52:22 +00:00
|
|
|
end
|
|
|
|
|
2022-01-12 17:21:57 +00:00
|
|
|
-- Set some keybinds conditional on server capabilities
|
2022-11-03 00:04:48 +00:00
|
|
|
if vim.fn.has("nvim-0.8") == 1 then
|
2023-06-13 23:48:07 +00:00
|
|
|
lsp_keymap("f", function()
|
|
|
|
vim.lsp.buf.format({ async = true })
|
|
|
|
end, { desc = "Format code" })
|
|
|
|
lsp_keymap("f", function()
|
|
|
|
vim.lsp.buf.format({ async = true })
|
|
|
|
end, { mode = "v", desc = "Format selected code" })
|
2022-11-02 23:57:18 +00:00
|
|
|
if server_capabilities.documentFormattingProvider then
|
2023-06-09 19:10:55 +00:00
|
|
|
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
|
|
|
pattern = { "*.rs", "*.go", "*.sh", "*.lua" },
|
|
|
|
callback = function()
|
|
|
|
vim.lsp.buf.format({ async = false, timeout_ms = 1000 })
|
|
|
|
end,
|
|
|
|
group = vim.api.nvim_create_augroup("lsp_format", { clear = true }),
|
|
|
|
desc = "Auto format code on save",
|
|
|
|
})
|
2022-11-02 23:57:18 +00:00
|
|
|
end
|
|
|
|
else
|
2023-06-02 00:11:50 +00:00
|
|
|
-- HACK: Support for <0.8
|
2023-06-13 23:48:07 +00:00
|
|
|
lsp_keymap("f", function()
|
|
|
|
vim.lsp.buf.formatting()
|
|
|
|
end, { desc = "Format code" })
|
|
|
|
lsp_keymap("f", function()
|
|
|
|
vim.lsp.buf.range_formatting()
|
|
|
|
end, { mode = "v", desc = "Format selected code" })
|
2022-11-02 23:57:18 +00:00
|
|
|
if server_capabilities.documentFormattingProvider then
|
2023-06-13 23:48:07 +00:00
|
|
|
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
|
|
|
pattern = { "*.rs", "*.go", "*.sh", "*.lua" },
|
|
|
|
callback = function()
|
|
|
|
vim.lsp.buf.formatting_sync(nil, 1000)
|
|
|
|
end,
|
|
|
|
group = vim.api.nvim_create_augroup("lsp_format", { clear = true }),
|
|
|
|
desc = "Auto format code on save",
|
|
|
|
})
|
2022-11-02 23:57:18 +00:00
|
|
|
end
|
2022-01-12 17:21:57 +00:00
|
|
|
end
|
2021-08-24 17:38:14 +00:00
|
|
|
|
2022-01-12 17:21:57 +00:00
|
|
|
-- Set autocommands conditional on server_capabilities
|
2022-11-02 23:57:18 +00:00
|
|
|
if server_capabilities.documentHighlightProvider then
|
2023-06-13 23:48:07 +00:00
|
|
|
local lsp_document_highlight = vim.api.nvim_create_augroup("lsp_document_highlight", { clear = true })
|
|
|
|
vim.api.nvim_create_autocmd({ "CursorHold" }, {
|
|
|
|
buffer = bufnr,
|
|
|
|
callback = function()
|
|
|
|
vim.lsp.buf.document_highlight()
|
|
|
|
end,
|
|
|
|
group = lsp_document_highlight,
|
|
|
|
})
|
|
|
|
vim.api.nvim_create_autocmd({ "CursorMoved" }, {
|
|
|
|
buffer = bufnr,
|
|
|
|
callback = function()
|
|
|
|
vim.lsp.buf.clear_references()
|
|
|
|
end,
|
|
|
|
group = lsp_document_highlight,
|
|
|
|
})
|
2022-01-12 17:21:57 +00:00
|
|
|
end
|
2021-08-24 17:38:14 +00:00
|
|
|
|
2022-01-12 17:21:57 +00:00
|
|
|
-- Some override some fuzzy finder bindings to use lsp sources
|
2022-01-12 17:59:29 +00:00
|
|
|
if utils.try_require("telescope") ~= nil then
|
|
|
|
-- Replace some Telescope bindings with LSP versions
|
2023-06-09 19:10:55 +00:00
|
|
|
local telescope_keymap = utils.curry_keymap("n", "<leader>f", { buffer = bufnr })
|
2022-11-02 23:57:18 +00:00
|
|
|
if server_capabilities.documentSymbolProvider then
|
2023-06-09 19:10:55 +00:00
|
|
|
telescope_keymap("t", "<cmd>Telescope lsp_document_symbols<CR>", { desc = "Find buffer tags" })
|
2022-11-02 23:57:18 +00:00
|
|
|
end
|
|
|
|
if server_capabilities.workspaceSymbolProvider then
|
2023-06-09 19:10:55 +00:00
|
|
|
telescope_keymap("T", "<cmd>Telescope lsp_dynamic_workspace_symbols<CR>", { desc = "Find tags" })
|
2022-01-24 23:39:02 +00:00
|
|
|
end
|
2022-01-12 17:59:29 +00:00
|
|
|
|
|
|
|
-- Replace some LSP bindings with Telescope ones
|
2022-11-02 23:57:18 +00:00
|
|
|
if server_capabilities.definitionProvider then
|
2023-06-09 19:10:55 +00:00
|
|
|
lsp_keymap("d", "<cmd>Telescope lsp_definitions<CR>", { desc = "Find definition" })
|
2022-11-02 23:57:18 +00:00
|
|
|
end
|
|
|
|
if server_capabilities.typeDefinitionProvider then
|
2023-06-09 19:10:55 +00:00
|
|
|
lsp_keymap("t", "<cmd>Telescope lsp_type_definition<CR>", { desc = "Find type definition" })
|
2022-01-24 23:39:02 +00:00
|
|
|
end
|
2023-06-09 19:10:55 +00:00
|
|
|
lsp_keymap("i", "<cmd>Telescope lsp_implementations<CR>", { desc = "Find implementations" })
|
|
|
|
lsp_keymap("r", "<cmd>Telescope lsp_references<CR>", { desc = "Find references" })
|
|
|
|
lsp_keymap("A", "<cmd>Telescope lsp_code_actions<CR>", { desc = "Select code actions" })
|
|
|
|
lsp_keymap("A", "<cmd>Telescope lsp_range_code_actions<CR>", { mode = "v", desc = "Select code actions" })
|
2022-01-12 17:21:57 +00:00
|
|
|
end
|
2023-06-02 00:11:50 +00:00
|
|
|
|
|
|
|
-- Attach navic for statusline location
|
|
|
|
if server_capabilities.documentSymbolProvider then
|
|
|
|
utils.try_require("nvim-navic", function(navic)
|
|
|
|
navic.attach(client, bufnr)
|
|
|
|
end)
|
|
|
|
end
|
2021-12-08 00:07:57 +00:00
|
|
|
end
|
2021-08-24 17:38:14 +00:00
|
|
|
end
|
|
|
|
|
2021-12-16 22:40:04 +00:00
|
|
|
local function merged_capabilities()
|
2021-09-30 17:58:22 +00:00
|
|
|
-- Maybe update capabilities
|
2022-11-02 23:57:18 +00:00
|
|
|
local capabilities = nil
|
2021-12-16 22:40:04 +00:00
|
|
|
utils.try_require("cmp-nvim-lsp", function(cmp_nvim_lsp)
|
2022-11-02 23:57:18 +00:00
|
|
|
capabilities = cmp_nvim_lsp.default_capabilities()
|
2021-12-16 22:40:04 +00:00
|
|
|
end)
|
2022-11-02 23:57:18 +00:00
|
|
|
|
2021-12-16 22:40:04 +00:00
|
|
|
return capabilities
|
|
|
|
end
|
|
|
|
|
|
|
|
function M.config_lsp()
|
2021-12-17 04:51:46 +00:00
|
|
|
utils.try_require("lspconfig", function(lsp_config)
|
|
|
|
local capabilities = merged_capabilities()
|
2022-09-08 19:23:41 +00:00
|
|
|
local default_attach = get_default_attach()
|
|
|
|
local default_setup = { capabilities = capabilities, on_attach = default_attach }
|
2021-12-17 04:51:46 +00:00
|
|
|
|
|
|
|
-- Configure each server
|
2022-09-08 19:23:41 +00:00
|
|
|
lsp_config.bashls.setup(default_setup)
|
|
|
|
lsp_config.gopls.setup(default_setup)
|
|
|
|
lsp_config.pyright.setup(default_setup)
|
2023-06-13 21:59:37 +00:00
|
|
|
|
|
|
|
-- Set up rust analyzer (preferred) or rls
|
|
|
|
-- TODO: Remove rls and all configuration for it when all machines are up to date
|
|
|
|
if vim.fn.executable("rust-analyzer") == 1 then
|
|
|
|
-- Prefer rust-tools, if present
|
|
|
|
utils.try_require("rust-tools", function(rust_tools)
|
|
|
|
rust_tools.setup({
|
|
|
|
capabilities = capabilities,
|
|
|
|
on_attach = function(client, bufnr)
|
|
|
|
default_attach(client, bufnr)
|
|
|
|
-- TODO: override some bindings from rust-tools
|
|
|
|
-- Eg. rust_tools.hover_actions.hover_actions or rt.code_action_group.code_action_group
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
end, function()
|
|
|
|
lsp_config.rust_analyzer.setup({
|
|
|
|
capabilities = capabilities,
|
|
|
|
on_attach = default_attach,
|
|
|
|
settings = {
|
|
|
|
["rust-analyzer"] = {
|
|
|
|
cargo = {
|
|
|
|
features = "all",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end)
|
|
|
|
else
|
|
|
|
lsp_config.rls.setup({
|
|
|
|
capabilities = capabilities,
|
|
|
|
on_attach = default_attach,
|
|
|
|
})
|
|
|
|
end
|
2022-10-14 21:53:03 +00:00
|
|
|
|
|
|
|
-- Configure neovim dev for when sumneko_lua is installed
|
|
|
|
utils.try_require("neodev", function(neodev)
|
|
|
|
neodev.setup({})
|
|
|
|
end)
|
2022-09-08 19:23:41 +00:00
|
|
|
|
|
|
|
-- Auto setup mason installed servers
|
|
|
|
utils.try_require("mason-lspconfig", function(mason_lspconfig)
|
|
|
|
-- Get list of servers that are installed but not set up
|
2023-06-02 00:11:50 +00:00
|
|
|
local already_setup
|
|
|
|
if lsp_config["util"] and lsp_config.util["available_servers"] then
|
|
|
|
already_setup = lsp_config.util.available_servers()
|
|
|
|
else
|
|
|
|
-- HACK: For lspconfig versions lower than 0.1.4
|
|
|
|
already_setup = lsp_config.available_servers()
|
|
|
|
end
|
2022-09-08 19:23:41 +00:00
|
|
|
local needs_setup = vim.tbl_filter(function(server)
|
|
|
|
return not vim.tbl_contains(already_setup, server)
|
|
|
|
end, mason_lspconfig.get_installed_servers())
|
|
|
|
|
|
|
|
-- Setup each server with default config
|
|
|
|
vim.tbl_map(function(server)
|
|
|
|
lsp_config[server].setup(default_setup)
|
|
|
|
end, needs_setup)
|
|
|
|
end)
|
2022-01-12 22:35:07 +00:00
|
|
|
|
|
|
|
-- Config null-ls after lsps so we can disable for languages that have language servers
|
2022-09-08 19:23:41 +00:00
|
|
|
require("plugins.null-ls").configure(default_setup)
|
2021-12-17 04:51:46 +00:00
|
|
|
end)
|
2021-08-24 17:38:14 +00:00
|
|
|
end
|
|
|
|
|
2022-01-01 01:32:33 +00:00
|
|
|
function M.config_lsp_intaller()
|
2022-09-08 19:23:41 +00:00
|
|
|
utils.try_require("mason", function(mason)
|
|
|
|
mason.setup()
|
|
|
|
end)
|
|
|
|
utils.try_require("mason-lspconfig", function(mason_lspconfig)
|
|
|
|
mason_lspconfig.setup()
|
2022-01-01 01:32:33 +00:00
|
|
|
end)
|
|
|
|
end
|
|
|
|
|
2021-12-08 00:07:57 +00:00
|
|
|
return M
|