diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-07-22 18:18:10 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-07-22 18:18:10 +0300 |
| commit | 565e57c0155e31235eb3d2ef0a83fe36d058530a (patch) | |
| tree | 790d210b24c08427e1990e66342658bbecbc7944 /.config/nvim/lua/custom/configs/mason.lua | |
| parent | 191e0471aa22ca1e70c7692d19149b47df10f439 (diff) | |
feat(neovim): major lsp refactor and some more lazy loading
Diffstat (limited to '.config/nvim/lua/custom/configs/mason.lua')
| -rw-r--r-- | .config/nvim/lua/custom/configs/mason.lua | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/.config/nvim/lua/custom/configs/mason.lua b/.config/nvim/lua/custom/configs/mason.lua new file mode 100644 index 0000000..d7a537b --- /dev/null +++ b/.config/nvim/lua/custom/configs/mason.lua @@ -0,0 +1,33 @@ +-- NOTE: Not language servers but still make sure mason installs them +local ensure_installed = { + stylua = true, -- lua formatting +} +local servers = require('custom.configs.language-servers') + +require('mason').setup({ + ui = { + icons = { + package_installed = '✓', + package_pending = '➜', + package_uninstalled = '✗', + }, + }, +}) + +local servers_to_install = vim.tbl_filter(function(key) + local server = servers[key] + if type(server) == 'table' then + return true + else + return server + end +end, vim.tbl_keys(servers)) + +vim.list_extend(ensure_installed, servers_to_install) +require('mason-lspconfig').setup({ ensure_installed = servers_to_install }) + +require('mason-tool-installer').setup({ + ensure_installed = { + 'stylua', -- lua formatter + }, +}) |
