diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-09-12 08:39:30 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-09-12 08:39:30 +0200 |
| commit | c9e9d9a2096f40c12de4482a6d36f4ac00ac1519 (patch) | |
| tree | 80b6693db0d565a30e8f32f6b3c122463bb6b0f2 | |
| parent | f3545609968daeb78c9131c4db11b021af4f6938 (diff) | |
| download | nvim-conf-c9e9d9a2096f40c12de4482a6d36f4ac00ac1519.tar.gz nvim-conf-c9e9d9a2096f40c12de4482a6d36f4ac00ac1519.zip | |
Add mason tool installer to have a defined list
| -rw-r--r-- | after/plugin/lsp_lines.lua | 19 | ||||
| -rw-r--r-- | after/plugin/mason.lua | 42 | ||||
| -rw-r--r-- | after/plugin/null-ls.lua | 1 | ||||
| -rw-r--r-- | lua/alpha/plugins.lua | 7 |
4 files changed, 47 insertions, 22 deletions
diff --git a/after/plugin/lsp_lines.lua b/after/plugin/lsp_lines.lua deleted file mode 100644 index 5cb97b5..0000000 --- a/after/plugin/lsp_lines.lua +++ /dev/null @@ -1,19 +0,0 @@ -local ok, lsp_lines = pcall(require, "lsp_lines") -if not ok then - return -end - -vim.diagnostic.config({ - virtual_text = false, -}) - -vim.diagnostic.config({ virtual_lines = { only_current_line = true } }) - -lsp_lines.setup() - -vim.keymap.set( - "", - "<Leader>l", - require("lsp_lines").toggle, - { desc = "Toggle lsp_lines" } -) diff --git a/after/plugin/mason.lua b/after/plugin/mason.lua index d757d62..d12f3f0 100644 --- a/after/plugin/mason.lua +++ b/after/plugin/mason.lua @@ -18,3 +18,45 @@ mason.setup({ mason_lspconfig.setup({ automatic_installation = true, }) + +require('mason-tool-installer').setup { + + -- a list of all tools you want to ensure are installed upon + -- start; they should be the names Mason uses for each tool + ensure_installed = { + "blade-formatter", + "codespell", + "dockerfile-language-server", + "emmet-ls", + "go-debug-adapter", + "golangci-lint", + "gopls", + "html-lsp", + "intelephense", + "json-lsp", + "lua-language-server", + "php-debug-adapter", + "rust-analyzer", + "stylua", + "typescript-language-server", + "vue-language-server", + }, + + -- if set to true this will check each tool for updates. If updates + -- are available the tool will be updated. This setting does not + -- affect :MasonToolsUpdate or :MasonToolsInstall. + -- Default: false + auto_update = false, + + -- automatically install / update on startup. If set to false nothing + -- will happen on startup. You can use :MasonToolsInstall or + -- :MasonToolsUpdate to install tools and check for updates. + -- Default: true + run_on_start = true, + + -- set a delay (in ms) before the installation starts. This is only + -- effective if run_on_start is set to true. + -- e.g.: 5000 = 5 second delay, 10000 = 10 second delay, etc... + -- Default: 0 + start_delay = 3000, -- 3 second delay +} diff --git a/after/plugin/null-ls.lua b/after/plugin/null-ls.lua index a5371f4..f6a1c5b 100644 --- a/after/plugin/null-ls.lua +++ b/after/plugin/null-ls.lua @@ -13,6 +13,7 @@ local sources = { -- null_ls.builtins.formatting.phpcsfixer, -- null_ls.builtins.formatting.pint, null_ls.builtins.diagnostics.golangci_lint, + null_ls.builtins.diagnostics.codespell, -- null_ls.builtins.formatting.goimports, null_ls.builtins.formatting.jq, null_ls.builtins.code_actions.gitrebase, diff --git a/lua/alpha/plugins.lua b/lua/alpha/plugins.lua index b0f9f60..bd964bb 100644 --- a/lua/alpha/plugins.lua +++ b/lua/alpha/plugins.lua @@ -68,7 +68,7 @@ return require("packer").startup(function(use) end, }) - -- Completition + -- Completion use({ "hrsh7th/nvim-cmp", requires = { @@ -93,10 +93,11 @@ return require("packer").startup(function(use) "jose-elias-alvarez/null-ls.nvim", }) - -- Instalation of LSP/Debuggers/Other + -- Installation of LSP/Debuggers/Other use({ "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim", + "WhoIsSethDaniel/mason-tool-installer.nvim", }) use({ @@ -175,7 +176,7 @@ return require("packer").startup(function(use) use("tpope/vim-repeat") -- use("tpope/vim-obsession") - -- usefull for unix functions + -- useful for unix functions use("tpope/vim-eunuch") use("tpope/vim-commentary") use("tpope/vim-tbone") |