Revert trouble

This commit is contained in:
Janis Hutz 2025-02-21 14:11:47 +01:00
parent aac1f22b1d
commit 642355365f

@ -5,11 +5,9 @@ return {
dependencies = {
"hrsh7th/cmp-nvim-lsp",
{ "antosha417/nvim-lsp-file-operations", config = true },
-- "mfussenegger/nvim-jdtls",
"nvim-java/nvim-java"
"mfussenegger/nvim-jdtls",
},
config = function()
require('java').setup()
-- import lspconfig plugin
local lspconfig = require("lspconfig")
@ -66,41 +64,6 @@ return {
opts.desc = "Restart LSP"
keymap.set("n", "<leader>rs", ":LspRestart<CR>", opts)
-- Keybinds for testing, refactoring, java specific
opts.desc = "Java profiling"
keymap.set("n", "<leader>jp", ":JavaProfile<CR>", opts)
opts.desc = "Java Refactor: Extract Variable (create variable from cursor)"
keymap.set("n", "<leader>jev", ":JavaExtractVariable<CR>", opts)
opts.desc = "Java Refactor: Extract Variable all occurrences (create variable from cursor)"
keymap.set("n", "<leader>jea", ":JavaExtractVariableAllOccurrence<CR>", opts)
opts.desc = "Java Refactor: Extract Const (create const from cursor)"
keymap.set("n", "<leader>jec", ":JavaExtractConst<CR>", opts)
opts.desc = "Java Refactor: Extract Method (create method from cursor)"
keymap.set("n", "<leader>jev", ":JavaExtractMethod<CR>", opts)
opts.desc = "Java Refactor: Extract Field (create field from cursor)"
keymap.set("n", "<leader>jev", ":JavaExtractField<CR>", opts)
-- Java testing, Debugging
opts.desc = "Java Testing: Run test class in buffer"
keymap.set("n", "<leader>jtc", ":JavaTestRunCurrentClass<CR>", opts)
opts.desc = "Java Testing: Debug test class in buffer"
keymap.set("n", "<leader>jdc", ":JavaTestDebugCurrentClass<CR>", opts)
opts.desc = "Java Testing: Run current method in buffer"
keymap.set("n", "<leader>jtm", ":JavaTestRunCurrentMethod<CR>", opts)
opts.desc = "Java Testing: Debug current method in buffer"
keymap.set("n", "<leader>jdm", ":JavaTestDebugCurrentMethod<CR>", opts)
opts.desc = "Java Testing: View last report"
keymap.set("n", "<leader>jtv", ":JavaTestViewLastReport<CR>", opts)
vim.opt.signcolumn = "yes" -- reserve space for diagnostics
end
@ -167,6 +130,26 @@ return {
on_attach = on_attach,
})
-- lspconfig.ts_ls.setup({
-- capabilities = capabilities,
-- on_attach = on_attach,
-- })
-- local mason_registry = require('mason-registry')
-- local vue_language_server_path = mason_registry.get_package('vue-language-server'):get_install_path() .. '/node_modules/@vue/language-server'
--
-- lspconfig.volar.setup({
-- capabilities = capabilities,
-- on_attach = on_attach,
-- -- cmd = { "vue-language-server", "--stdio" },
-- filetypes = { "vue" },
-- -- settings = {
-- -- typescript = {
-- -- tsdk = '/usr/lib/node_modules/typescript/lib'
-- -- }
-- -- }
-- })
lspconfig.jdtls.setup({
capabilities = capabilities,
on_attach = on_attach,