diff --git a/init.lua b/init.lua index a2e8fc7b..fcdfa2a3 100644 --- a/init.lua +++ b/init.lua @@ -641,26 +641,6 @@ require('lazy').setup({ Lua = {}, }, }, - - -- my customizations - clangd = {}, - gopls = {}, - pyright = { - settings = { - pyright = { - -- Using Ruff's import organizer - disableOrganizeImports = true, - }, - python = { - analysis = { - -- Ignore all files for analysis to exclusively use Ruff for linting - ignore = { '*' }, - }, - }, - }, - }, - ts_ls = {}, - ruff = {}, } -- Ensure the servers and tools above are installed @@ -673,13 +653,6 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { -- You can add other tools here that you want Mason to install - - -- my customizations - 'markdownlint', - 'mypy', - 'jq', - 'prettier', - 'codelldb', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } diff --git a/lua/custom/plugins/lsp.lua b/lua/custom/plugins/lsp.lua new file mode 100644 index 00000000..562766ac --- /dev/null +++ b/lua/custom/plugins/lsp.lua @@ -0,0 +1,16 @@ +vim.lsp.config('pyright', { + settings = { + pyright = { disableOrganizeImports = true }, + python = { analysis = { ignore = { '*' } } }, + }, +}) + +return { + { + 'mason-org/mason-lspconfig.nvim', + opts = { + ensure_installed = { 'clangd', 'gopls', 'pyright', 'ts_ls', 'ruff' }, + automatic_enable = true, + }, + }, +} diff --git a/lua/custom/plugins/mason-extras.lua b/lua/custom/plugins/mason-extras.lua new file mode 100644 index 00000000..0b34986f --- /dev/null +++ b/lua/custom/plugins/mason-extras.lua @@ -0,0 +1,12 @@ +vim.api.nvim_create_autocmd('User', { + pattern = 'VeryLazy', once = true, + callback = function() + local mr = require 'mason-registry' + mr.refresh(function() + local p = mr.get_package 'codelldb' + if not p:is_installed() then p:install() end + end) + end, +}) + +return {}