From 2a6a6a6b0541ead63f3823a05d88c22c5e5b2d4b Mon Sep 17 00:00:00 2001 From: Trey Bastian Date: Thu, 29 Jan 2026 14:40:08 +0000 Subject: caved and brought mason back to my config --- README.md | 15 +++------------ lua/config/java.lua | 1 - lua/config/lsp.lua | 5 +++++ lua/config/neotest.lua | 2 +- nvim-pack-lock.json | 22 +++++++++++++++------- 5 files changed, 24 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 1087587..d2e8363 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,10 @@ # Trey's Neovim Config ## LSP Installation -- bash - `npm install -g bash-language-server` -- lua - `brew install lua-language-server` -- swift - no install needed -- typescript - `npm install -g typescript-language-server` -- css - `npm install -g vscode-css-languuageservice` -- emmet - `npm install -g @olrtg/emmet-language-server` -- svelte - `npm install -g svelte-language-server` -- astro - `npm install -g @astrojs/language-server` -- cobol - download https://github.com/eclipse-che4z/che-che4z-lsp-for-cobol/releases extract from vsix file for target platform -- java - `brew install jdtls` -- xml - download https://github.com/redhat-developer/vscode-xml/releases/ extract from zip for target platform +Install the LSP's you want to use with `:Mason` + +I caved, I did it myself, mason just makes it too easy, some of the LSPs like gradle became annoying to setup. -Yes, I could make this a script... ## On First Run If developing with Java and you want to use neotest, make sure you run `:NetotestJava setup` diff --git a/lua/config/java.lua b/lua/config/java.lua index 7e0caca..819a09e 100644 --- a/lua/config/java.lua +++ b/lua/config/java.lua @@ -4,4 +4,3 @@ vim.pack.add({ }) require("java").setup() -vim.lsp.enable("jdtls") diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua index dc5ddbd..51ed5ec 100644 --- a/lua/config/lsp.lua +++ b/lua/config/lsp.lua @@ -2,8 +2,13 @@ vim.pack.add({ { src = "https://github.com/saghen/blink.cmp", version = vim.version.range("*") }, "https://github.com/neovim/nvim-lspconfig", "https://github.com/rafamadriz/friendly-snippets", + "https://github.com/mason-org/mason-lspconfig.nvim", + "https://github.com/mason-org/mason.nvim", }) +require("mason").setup() +require("mason-lspconfig").setup() + vim.lsp.enable({ "bashls", "lua_ls", diff --git a/lua/config/neotest.lua b/lua/config/neotest.lua index 1315250..2df2409 100644 --- a/lua/config/neotest.lua +++ b/lua/config/neotest.lua @@ -21,7 +21,7 @@ vim.keymap.set("n", "ts", function() require("neotest").run.run({ suite = true }) end) -vim.keymap.set("n", "tv", function() +vim.keymap.set("n", "tf", function() require("neotest").run.run(vim.fn.expand("%")) end) diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json index eca6312..d148d75 100644 --- a/nvim-pack-lock.json +++ b/nvim-pack-lock.json @@ -18,19 +18,27 @@ "src": "https://github.com/stevearc/conform.nvim" }, "friendly-snippets": { - "rev": "572f566", + "rev": "6cd7280adead7f586db6fccbd15d2cac7e2188b9", "src": "https://github.com/rafamadriz/friendly-snippets" }, "gruvbox.nvim": { "rev": "a472496e1a4465a2dd574389dcf6cdb29af9bf1b", "src": "https://github.com/ellisonleao/gruvbox.nvim" }, + "mason-lspconfig.nvim": { + "rev": "3d89e7c92fbd96c5e10e0298fc2b006f21cf9428", + "src": "https://github.com/mason-org/mason-lspconfig.nvim" + }, + "mason.nvim": { + "rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65", + "src": "https://github.com/mason-org/mason.nvim" + }, "neotest": { "rev": "deadfb1af5ce458742671ad3a013acb9a6b41178", "src": "https://github.com/nvim-neotest/neotest" }, "neotest-java": { - "rev": "b9a261a3b98b81ffd5249144c1345cc55ae05bdd", + "rev": "9f5cf2ecef2375044103c7d3487abeada637a5cc", "src": "https://github.com/rcasia/neotest-java" }, "neotest-vitest": { @@ -42,15 +50,15 @@ "src": "https://github.com/MunifTanjim/nui.nvim" }, "nvim-autopairs": { - "rev": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4", + "rev": "007047febaa3681a8d2f3dd5126fdb9c6e81f393", "src": "https://github.com/windwp/nvim-autopairs" }, "nvim-dap": { - "rev": "b9639ca05dd692647594733554640377ec6b1ab9", + "rev": "e47878dcf1ccc30136b30d19ab19fe76946d61cd", "src": "https://codeberg.org/mfussenegger/nvim-dap" }, "nvim-dap-view": { - "rev": "bd667e3a2d44a2ad6de2ba416247fc5072438bff", + "rev": "bd67e84de295455a5cd994b8f227438e8c696ea9", "src": "https://github.com/igorlfs/nvim-dap-view" }, "nvim-jack-in": { @@ -62,7 +70,7 @@ "src": "https://github.com/nvim-java/nvim-java" }, "nvim-lspconfig": { - "rev": "419b082102fa813739588dd82e19a8b6b2442855", + "rev": "5fef3b4a5f1057553b78d048322782c3a9ae69c6", "src": "https://github.com/neovim/nvim-lspconfig" }, "nvim-nio": { @@ -106,7 +114,7 @@ "src": "https://github.com/JavaHello/spring-boot.nvim" }, "telescope.nvim": { - "rev": "0d8b6eaa0b5ae6bb3d9785f7a3ba4a4c6c1b1af2", + "rev": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc", "src": "https://github.com/nvim-telescope/telescope.nvim" }, "todo-comments.nvim": { -- cgit v1.2.3