nvim-config/fnl/setup-mason.fnl

23 lines
784 B
Plaintext
Raw Normal View History

2023-07-28 14:26:18 +00:00
(let
[neodev (require :neodev)
mason (require :mason)
mason-lspconfig (require :mason-lspconfig)
{: language-servers : lsp-attach} (require :personalize)
]
(neodev.setup)
(mason.setup)
(mason-lspconfig.setup {:ensure_installed (vim.tbl_keys language-servers)})
(mason-lspconfig.setup_handlers
[(fn [server_name] (let
[server (. (require :lspconfig) server_name)
cmp-nvim-lsp (require :cmp_nvim_lsp)
settings (. language-servers server_name)
]
(server.setup
{:capabilities (cmp-nvim-lsp.default_capabilities (vim.lsp.protocol.make_client_capabilities))
:on_attach lsp-attach
:settings settings
:filetypes (or settings.filetypes [])})))
]))