diff --git a/nvim/lua/plugins/lspconfig.lua b/nvim/lua/plugins/lspconfig.lua index 32cb0c5..64bc0e2 100755 --- a/nvim/lua/plugins/lspconfig.lua +++ b/nvim/lua/plugins/lspconfig.lua @@ -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", "rs", ":LspRestart", opts) - -- Keybinds for testing, refactoring, java specific - opts.desc = "Java profiling" - keymap.set("n", "jp", ":JavaProfile", opts) - - opts.desc = "Java Refactor: Extract Variable (create variable from cursor)" - keymap.set("n", "jev", ":JavaExtractVariable", opts) - - opts.desc = "Java Refactor: Extract Variable all occurrences (create variable from cursor)" - keymap.set("n", "jea", ":JavaExtractVariableAllOccurrence", opts) - - opts.desc = "Java Refactor: Extract Const (create const from cursor)" - keymap.set("n", "jec", ":JavaExtractConst", opts) - - opts.desc = "Java Refactor: Extract Method (create method from cursor)" - keymap.set("n", "jev", ":JavaExtractMethod", opts) - - opts.desc = "Java Refactor: Extract Field (create field from cursor)" - keymap.set("n", "jev", ":JavaExtractField", opts) - - -- Java testing, Debugging - opts.desc = "Java Testing: Run test class in buffer" - keymap.set("n", "jtc", ":JavaTestRunCurrentClass", opts) - - opts.desc = "Java Testing: Debug test class in buffer" - keymap.set("n", "jdc", ":JavaTestDebugCurrentClass", opts) - - opts.desc = "Java Testing: Run current method in buffer" - keymap.set("n", "jtm", ":JavaTestRunCurrentMethod", opts) - - opts.desc = "Java Testing: Debug current method in buffer" - keymap.set("n", "jdm", ":JavaTestDebugCurrentMethod", opts) - - opts.desc = "Java Testing: View last report" - keymap.set("n", "jtv", ":JavaTestViewLastReport", 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,