@@JonathanMorrisMusic Oh good suggestion. Do you know offhand where the data directory is by default in nvim-java? I have been blowing away ~/.local/share/KickstartNvim but if it is outside that directory then this may be tripping me up.
@@ascourter I apparently must have been temporarily banned from posting on YT since I've been trying to reply to this message for the past day lol. Must be because I tried to post a bash command. Anyway, it's defined in the nvim-java/nvim-java-core plugin and resolves to either HOME/.cache/nvim/jdtls/workspaces/common-workspace or XDG_CACHE_HOME/nvim/jdtls/workspaces/common-workspace (removing the dollar signs from the variables in case I get flagged again somehow).
@@JonathanMorrisMusic Oh geez, I was wondering what happened to your messages when I looked for them. Crazy that you got a temporary ban. Thank you for your perseverance in posting the comment! I will check this and see if removing that cache gets this working for me. Thanks!
You're a better man than me man. I use vim and I used it for JS and TS but it's always been my dream to also use it with Java, but this seems too hardcore and error prone to me. Maybe one day..
0:56 could you elaborate on what you mean with "document symbols" and "language definitions"? A few missing features from your list are syntax highlighting, code navigation, code refactoring, formatting and debugging. Perhaps some of these are included in the two features I am asking about?
Good question. For Language Definitions I meant looking through language level APIs (e.g. if you went to definition on a library method, it would take you to the definition or interface). Document symbols is a term used by other plugins that allow you to view a file at a high level so I should have used a different term there. syntax highlighting should come from Treesitter. Code Navigation & Refactoring should come from the LSP (nvim-jdtls has specific commands you can call for refactoring). Debugging is missing and I was actually working on that capability today. But it is not coming together as easily as I had hoped.
Yes treesitter should be installed and then when it detects a Java file I believe it will install that grammar. Adding it into the config will make it explicit and install it before you land in a Java file.
Maybe the issue is related to the paths used in your java.lua? Seems like you are using different share directories. Could you try changing '/.local/share/nvim' to '/.local/share/KickstartNvim'?
Welcome! Of course, replace lazy.nvim with packer and the installation should be the same. I would recommend migrating to lazy.nvim though since packer is no longer maintained.
Using gd does not take me to definitions I only get "[telescope.builtin.lsp_*]: server does not support definitionProvider" Also, autocomplete did not show "classUnderTest" Could somebody help?
@@ascourter It seems like at some point i messed up compl Here's the response i get from :LspInfo: Language client log: /home/brianvf/.local/state/nvim/lsp.log Detected filetype: java 2 client(s) attached to this buffer: Client: jdtls (id: 1, bufnr: [8]) filetypes: autostart: false root directory: /home/brianvf/coding/java cmd: /home/brianvf/.local/share/nvim/mason/bin/jdtls Client: jdtls (id: 2, bufnr: [8]) filetypes: java autostart: true root directory: /home/brianvf/coding/java cmd: /home/brianvf/.local/share/nvim/mason/bin/jdtls -configuration /home/brianvf/.cache/jdtls/config -data /home/brianvf/.cache/jdtls/workspace Configured servers list: jdtls, lua_ls, tsserver
@@ascourter Expected a table of specs but a nil was returned (from the jdtls code) I have a large Neovim setup with lazy and all my plugins are in individual Lua files, the jdtls plugin is the only one which fails. Health check is fine, as is Java (I do a lot of Spring / Java development) it seems to be a syntax issue. (Copied mainly from the repos)
Hello, I'm using java 21 with springboot and I did exactly what you show for jdtls, and I get the error of "The blank final field may not have been initialized", where Intellij doesn't give me this error. Do you know something about it?
I haven't seen that one before. You might check this out: stackoverflow.com/questions/28129169/the-blank-final-field-may-not-have-been-initialized If that doesn't help then I'd open an issue on jdtls and see if someone there can help
Here's my config that has my kitty conf file. The status bar you're talking about is from tmux. That config is under the tmux conf file. I went over setting up tmux in a previous video if that helps. github.com/exosyphon/dotfiles
@@ascourter tldr: put the require('java').setup() in the config function of nvim-java, put the require('lspconfig').jdtls.setup {} at the very bottom of the file. Edit: I posted a comment with a github link but I think it was filtered out
@@guglielmobartelloniI updated my config but it still won't work for me. I am getting a different error. Here's the open issue I have on Github: github.com/nvim-java/nvim-java/issues/135