From 76da8d6c5dd81b4baf39de2f538de0c3980679da Mon Sep 17 00:00:00 2001 From: whitney Date: Wed, 20 Nov 2024 16:11:25 -0800 Subject: [PATCH] Configure Java LSP nvim-java, split from main plugins, and split disabled plugins to seperate folder. --- lazyvim/README.md | 3 +++ lazyvim/lua/plugins-disabled/README.md | 4 ++-- lazyvim/lua/plugins-disabled/avante.lua | 1 - lazyvim/lua/plugins/colorscheme.lua | 1 + lazyvim/lua/plugins/nvim-java.lua | 23 ++++++++++++++++++++ lazyvim/lua/plugins/plugins.lua | 29 +------------------------ 6 files changed, 30 insertions(+), 31 deletions(-) create mode 100644 lazyvim/lua/plugins/nvim-java.lua diff --git a/lazyvim/README.md b/lazyvim/README.md index ebb9e82..e863652 100644 --- a/lazyvim/README.md +++ b/lazyvim/README.md @@ -35,6 +35,9 @@ ln -sfn /path/to/dotfiles/lazyvim/init.lua ~/.config/nvim/init.lua ``` 5. Start nvim, and let all the packages install. Done! +## Reminders +If uninstalling, you need to manually get rid of stuff in `~/.local/share/nvim` before reinstalling everything. + ## Plugins/Addons/Extras ### Mason (Language Servers) diff --git a/lazyvim/lua/plugins-disabled/README.md b/lazyvim/lua/plugins-disabled/README.md index aebc9c5..cb60dcb 100644 --- a/lazyvim/lua/plugins-disabled/README.md +++ b/lazyvim/lua/plugins-disabled/README.md @@ -1,3 +1,3 @@ # Disabled plugins folder. -Plugins are loaded by lazy.lua, by scanning the lua/plugins folder. -Move unused items to this folder. +Active plugins are found in the plugins folder, which is scanned by LazyVim. +Inactive plugins can be moved here to avoid accidental lazy loading. diff --git a/lazyvim/lua/plugins-disabled/avante.lua b/lazyvim/lua/plugins-disabled/avante.lua index 87a05c5..c129ad8 100644 --- a/lazyvim/lua/plugins-disabled/avante.lua +++ b/lazyvim/lua/plugins-disabled/avante.lua @@ -2,7 +2,6 @@ return { { "yetone/avante.nvim", - enabled = false, event = "VeryLazy", lazy = false, version = false, -- set this if you want to always pull the latest change diff --git a/lazyvim/lua/plugins/colorscheme.lua b/lazyvim/lua/plugins/colorscheme.lua index c3b36c1..9a93cc5 100644 --- a/lazyvim/lua/plugins/colorscheme.lua +++ b/lazyvim/lua/plugins/colorscheme.lua @@ -12,6 +12,7 @@ return { name = "catppuccin", priority = 1000, }, + -- Set the theme { "LazyVim/LazyVim", opts = { diff --git a/lazyvim/lua/plugins/nvim-java.lua b/lazyvim/lua/plugins/nvim-java.lua new file mode 100644 index 0000000..ff2dc38 --- /dev/null +++ b/lazyvim/lua/plugins/nvim-java.lua @@ -0,0 +1,23 @@ +return { + "nvim-java/nvim-java", + config = false, + dependencies = { + { + "neovim/nvim-lspconfig", + opts = { + servers = { + jdtls = { + -- Your custom jdtls settings goes here + }, + }, + setup = { + jdtls = function() + require("java").setup({ + -- Your custom nvim-java configuration goes here + }) + end, + }, + }, + }, + }, +} diff --git a/lazyvim/lua/plugins/plugins.lua b/lazyvim/lua/plugins/plugins.lua index 7e458d2..a564707 100644 --- a/lazyvim/lua/plugins/plugins.lua +++ b/lazyvim/lua/plugins/plugins.lua @@ -1,28 +1 @@ -return { - -- add more treesitter parsers - { - "nvim-treesitter/nvim-treesitter", - opts = { - ensure_installed = { - "bash", - "html", - "javascript", - "json", - "lua", - "markdown", - "markdown_inline", - "python", - "query", - "regex", - "tsx", - "typescript", - "vim", - "yaml", - }, - }, - }, - { - "nvim-java/nvim-java", - opts = {}, - }, -} +return {}