Compare commits

...

2 commits

Author SHA1 Message Date
kalmenn d4ffb9a874
feat(rust): Migrate to rustacean.nvim 2024-12-16 15:37:31 +01:00
kalmenn ad98de9170
feat(languages): Configure java 2024-12-16 15:36:33 +01:00
3 changed files with 51 additions and 26 deletions

View file

@ -2,33 +2,34 @@
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"crates.nvim": { "branch": "main", "commit": "1c924d5a9ea3496c4e1a02d0d51388ba809f8468" },
"fd": { "branch": "master", "commit": "4d957d3a630c53fc610b4c835a1ff992f98fa49d" },
"fd": { "branch": "master", "commit": "331daf10b8b929aef39158e91892afe28d6fb816" },
"feline.nvim": { "branch": "main", "commit": "9f1313f61a75ec5ebe805fedd46bdc130c420963" },
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
"haskell-tools.nvim": { "branch": "master", "commit": "cbfee33efb3d7252453e454d61c6b939539ea35f" },
"idris2-nvim": { "branch": "main", "commit": "8bff02984a33264437e70fd9fff4359679d910da" },
"lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" },
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"neo-tree-diagnostics.nvim": { "branch": "main", "commit": "e00434c3cf8637bcaf70f65c2b9d82b0cc9bd7dc" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
"none-ls.nvim": { "branch": "main", "commit": "96ec99437a80a9aae1634d0a20151529a67a0977" },
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
"none-ls.nvim": { "branch": "main", "commit": "c279e541f73a2deea9deb5231b9c037678dd6353" },
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
"nvim": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
"nvim-cmp": { "branch": "main", "commit": "ca4d3330d386e76967e53b85953c170658255ecb" },
"nvim-lspconfig": { "branch": "master", "commit": "1aa9f36b6d542dafc0b4a38c48969d036003b00a" },
"nvim-metals": { "branch": "main", "commit": "f861db9fda55939797ac1b05238c49b0dcdc3bdb" },
"nvim-treesitter": { "branch": "master", "commit": "69170c93149ddb71a22bd954514806395c430c02" },
"nvim-web-devicons": { "branch": "master", "commit": "203da76ecfbb4b192cf830665b03eb651b635c94" },
"nvim-cmp": { "branch": "main", "commit": "3403e2e9391ed0a28c3afddd8612701b647c8e26" },
"nvim-jdtls": { "branch": "master", "commit": "ece818f909c6414cbad4e1fb240d87e003e10fda" },
"nvim-lspconfig": { "branch": "master", "commit": "ae8a01bb40848490548e5d07b97ed972ed43c2f9" },
"nvim-metals": { "branch": "main", "commit": "6d4b3c3a6159dc3caad6fb10ab0473315d8397f5" },
"nvim-treesitter": { "branch": "master", "commit": "1d0a8b91d02511a7f4d7aa74b2db0e19d6e780be" },
"nvim-web-devicons": { "branch": "master", "commit": "0eb18da56e2ba6ba24de7130a12bcc4e31ad11cb" },
"overseer.nvim": { "branch": "master", "commit": "10ee48ff96c8d1049efb278ea4c8cf9f3b0e4326" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"ripgrep": { "branch": "master", "commit": "79cbe89deb1151e703f4d91b19af9cdcc128b765" },
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
"rustaceanvim": { "branch": "master", "commit": "25aab238aad3e58f864274449456bdc339981750" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
"vim-fugitive": { "branch": "master", "commit": "320b18fba2a4f2fe3c8225c778c687e0d2620384" }
"vim-fugitive": { "branch": "master", "commit": "fcb4db52e7f65b95705aa58f0f2df1312c1f2df2" }
}

View file

@ -0,0 +1,25 @@
return {
"mfussenegger/nvim-jdtls",
opts = {
cmd = { "jdtls" },
},
ft = { "java" },
cond = function(_)
return vim.fn.executable("jdtls") ~= 0
and vim.fn.executable("python3") ~= 0
end,
config = function(_, opts)
if (opts.root_dir == nil) then
opts.root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1])
end
vim.api.nvim_create_autocmd({ "FileType" }, {
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
callback = function(ev)
if (ev.match == "java") then
require("jdtls").start_or_attach(opts)
end
end,
})
end,
}

View file

@ -38,27 +38,26 @@ return {
event = "BufEnter Cargo.toml",
},
{
"simrat39/rust-tools.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"hrsh7th/cmp-nvim-lsp",
},
lazy = true,
config = function()
local capabilities = require("cmp_nvim_lsp").default_capabilities()
require("rust-tools").setup({
'mrcjkb/rustaceanvim',
version = '^5',
lazy = false,
init = function()
vim.g.rustaceanvim = {
server = {
capabilities = capabilities,
settings = {
["rust-analyzer"] = {
on_attach = function(client, bufnr)
opts = { silent = true, buffer = bufnr }
vim.keymap.set("n", "<leader>a", function() vim.cmd.RustLsp('codeAction') end, opts)
vim.keymap.set("n", "K", function() vim.cmd.RustLsp({'hover', 'actions'}) end, opts)
end,
default_settings = {
['rust-analyzer'] = {
check = {
command = "clippy",
},
},
},
},
})
}
end,
},
}