From 1db8c12b3e8d5dab05360e3d472f6e97484dce49 Mon Sep 17 00:00:00 2001 From: Mikkel Svartveit Date: Thu, 29 May 2025 09:52:19 +0200 Subject: [PATCH] Add Mason for easier LSP management --- nvim/lazy-lock.json | 2 ++ nvim/lua/plugins.lua | 30 +++++++++++------------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index fe390fb..e72c3c5 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -5,6 +5,8 @@ "code_runner.nvim": { "branch": "main", "commit": "386bcaa8aa7ae8703281afce4465ecfdb7c44e65" }, "gitsigns.nvim": { "branch": "main", "commit": "8b729e489f1475615dc6c9737da917b3bc163605" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "67da97f8c2fd12d05427bb485ce07ee6418e0a51" }, + "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, "neoscroll.nvim": { "branch": "master", "commit": "f957373912e88579e26fdaea4735450ff2ef5c9c" }, "nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" }, "nvim-lspconfig": { "branch": "master", "commit": "b8e7957bde4cbb3cb25a13a62548f7c273b026e9" }, diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 341275f..8768864 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -32,19 +32,7 @@ require("lazy").setup({ build = ":TSUpdate", config = function() require("nvim-treesitter.configs").setup { - ensure_installed = { - "javascript", - "typescript", - "tsx", - "css", - "html", - "svelte", - "json", - "yaml", - "markdown", - "toml", - "lua", - }, + auto_install = true, highlight = { enable = true, additional_vim_regex_highlighting = false, @@ -58,12 +46,6 @@ require("lazy").setup({ { "neovim/nvim-lspconfig", config = function() - -- pnpm install -g typescript typescript-language-server - vim.lsp.enable("ts_ls") - - -- pnpm install -g svelte-language-server - vim.lsp.enable("svelte") - vim.api.nvim_create_autocmd('LspAttach', { callback = function(event) local opts = {buffer = event.buf} @@ -75,6 +57,16 @@ require("lazy").setup({ end, }, + { + "mason-org/mason.nvim", + opts = {} + }, + + { + "mason-org/mason-lspconfig.nvim", + opts = {}, + }, + -- Easy commenting/uncommenting { "numToStr/Comment.nvim",