Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings
nvim-java

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Generating files#307

Unanswered
radekgrzywacz asked this question inQ&A
Discussion options

Hi!
I can't find, if this plugin has the functionality to generate classes, interfaces, enums in a intellIj like way? I know that elmcgill/springboot-nvim plugin have it. Do we have our version? If not is it possible to use these both plugins at once?

You must be logged in to vote

Replies: 2 comments

Comment options

You can install springboot-nvim and add nvim-java as a dependency instead of jdtls. Like this:
2024-12-06-232348_hyprshot
Then to make the plugin register non springboot projects you can edit the plugin a little. Go to ~/.local/share/nvim/lazy/springboot-nvim/lua/springboot-nvim, and open the utils.lua file. In the file you will find a function called "find_main_application_class_directory". Edit it to look like this:
image
Now you can setup keybindings for generating new classes, enums and interfaces in java projects. Here are mine for referance, with a function so they are only available when jdtls is attached to the buffer . Its missing some keymaps, made it today so i havent finished.
image
A bit late but i hope you still find it useful!

You must be logged in to vote
0 replies
Comment options

I know this thread is old, but I had the same need and I created a separate plugin from this one that serves only that purpose.
If you want, you can find it here:
https://github.com/alessio-vivaldelli/java-creator-nvim

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@radekgrzywacz@alessio-vivaldelli@h678288

[8]ページ先頭

©2009-2025 Movatter.jp