From 484c48c916ed06a4159781b067280843e08f02d8 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Fri, 10 Mar 2023 13:18:30 -0600 Subject: [PATCH] removed java ftplugin file, as mason-ls now does not need one. --- neovim/.config/nvim/ftplugin/java.lua | 82 -------------------------- neovim/.config/nvim/lua/LSPconfig.lua | 4 +- neovim/.config/nvim/lua/packages.lua | 4 +- neovim/.config/nvim/spell/en.utf-8.add | 4 ++ 4 files changed, 8 insertions(+), 86 deletions(-) delete mode 100644 neovim/.config/nvim/ftplugin/java.lua diff --git a/neovim/.config/nvim/ftplugin/java.lua b/neovim/.config/nvim/ftplugin/java.lua deleted file mode 100644 index f46707f..0000000 --- a/neovim/.config/nvim/ftplugin/java.lua +++ /dev/null @@ -1,82 +0,0 @@ -local opts = { - cmd = {}, - settings = { - java = { - signatureHelp = { enabled = true }, - completion = { - favoriteStaticMembers = {}, - filteredTypes = { - -- "com.sun.*", - -- "io.micrometer.shaded.*", - -- "java.awt.*", - -- "jdk.*", - -- "sun.*", - }, - }, - sources = { - organizeImports = { - starThreshold = 9999, - staticStarThreshold = 9999, - }, - }, - codeGeneration = { - toString = { - template = "${object.className}{${member.name()}=${member.value}, ${otherMembers}}", - }, - useBlocks = true, - }, - configuration = { - runtimes = { - { - name = "JavaSE-1.8", - path = "/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home", - default = true, - }, - { - name = "JavaSE-17", - path = "/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home", - }, - { - name = "JavaSE-19", - path = "/Library/Java/JavaVirtualMachines/jdk-19.jdk/Contents/Home", - }, - }, - }, - }, - }, -} -local jdtls_config = opts -local pkg_status, jdtls = pcall(require,"jdtls") -if not pkg_status then - vim.notify("unable to load nvim-jdtls", "error") - return {} -end - --- local jdtls_path = vim.fn.stdpath("data") .. "/mason/packages/jdtls" -local jdtls_bin = vim.fn.stdpath("data") .. "/mason/bin/jdtls" - -local root_markers = { ".gradle", "gradlew", ".git" } -local root_dir = jdtls.setup.find_root(root_markers) -local home = os.getenv("HOME") -local project_name = vim.fn.fnamemodify(root_dir, ":p:h:t") -local workspace_dir = home .. "/.cache/jdtls/workspace/" .. project_name - -opts.cmd = { - jdtls_bin, - "-data", - workspace_dir, -} - - -local on_attach = function(client, bufnr) - jdtls.setup.add_commands() -- important to ensure you can update configs when build is updated - -- if you setup DAP according to https://github.com/mfussenegger/nvim-jdtls#nvim-dap-configuration you can uncomment below - -- jdtls.setup_dap({ hotcodereplace = "auto" }) - -- jdtls.dap.setup_dap_main_class_configs() - - -- you may want to also run your generic on_attach() function used by your LSP config -end - -opts.on_attach = on_attach -opts.capabilities = vim.lsp.protocol.make_client_capabilities() -jdtls.start_or_attach(jdtls_config) diff --git a/neovim/.config/nvim/lua/LSPconfig.lua b/neovim/.config/nvim/lua/LSPconfig.lua index 0b8f184..13681af 100644 --- a/neovim/.config/nvim/lua/LSPconfig.lua +++ b/neovim/.config/nvim/lua/LSPconfig.lua @@ -38,8 +38,8 @@ require("mason-lspconfig").setup_handlers({ require('rust-tools-setup') on_attach() end, - ["sumneko_lua"] = function() - require('lspconfig').sumneko_lua.setup { + ["lua_ls"] = function() + require('lspconfig').lua_ls.setup { settings = { Lua = { diagnostics = { diff --git a/neovim/.config/nvim/lua/packages.lua b/neovim/.config/nvim/lua/packages.lua index 23f5e99..a1fa6e1 100644 --- a/neovim/.config/nvim/lua/packages.lua +++ b/neovim/.config/nvim/lua/packages.lua @@ -44,8 +44,8 @@ return require('packer').startup(function(use) config = function() require("mason-lspconfig").setup({ ensure_installed = { - "sumneko_lua", - "rust_analyzer", + 'lua_ls', + 'rust_analyzer', 'pyright', 'bashls', 'texlab', diff --git a/neovim/.config/nvim/spell/en.utf-8.add b/neovim/.config/nvim/spell/en.utf-8.add index a926468..3e247e9 100644 --- a/neovim/.config/nvim/spell/en.utf-8.add +++ b/neovim/.config/nvim/spell/en.utf-8.add @@ -20,3 +20,7 @@ FTL superintelligent homeworld toolchain +Kata +ctl +NDSU +rebasing