You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User should be able to create a run profile/profiles
User should be able to pick and run using a run profile
In a profile, user should be able to include project specific information
@todo we should look into how and what information intelij stores @todo we should look into if we can do run and debug both @todo we should look into if overseer can be used on things like this
IntelliJ creates a workspace.xml file in the {project_directory}/.idea folder, where it stores profile information. As an example, I've set up a configuration with VM arguments and program arguments ( I believe these are the most commonly used settings, so I've focused on them in the nvim options as well) .
it's possible to pass VM and program arguments for both running and debugging. For the debugging option, after selecting a new profile, you need to reconfigure DAP to load the new arguments. One little downside is that if you're running an application with profile1 and you switch to profile2, you need to stop the session and start a new one to use the profile2.
I think overseer little overhead in this case, because the run/debug commands are already available for us, and simpler user interface is better for profile changes and creation.
POC:
Since nvim.nui is already in use, I focused on creating a small UI with it for creating, editing, and changing the active profile.
profile.mp4
Profile ui
Open with JavaProfile command
Create Profile
Select the new profile option to create a new one (press enter/space)
Press s in normal mode to save.
The new profile is set active by defult.
Update
Select profile to edit (press enter/space)
Press s in normal mode to save.
Set Active
Press a in normal mode in a list
All Key binding (in normal mode) :
Profile List:
j: Down
k: Up
space: Edit
enter: Edit
b: Quit/Back
q: Quit
a: Set Active
d: Delete
Profile Edit:
b: Back
q: Quit
s: Save
The profile config is saved to a JSON file named nvim-java-profiles.json in the ~/.local/share/nvim folder. Saving to the project folder to the .config.json file or something like that, similar to what IntelliJ does, is still a possible option, but for dev/testing, one config feels more manageable.
Activity
atm1020 commentedon Mar 10, 2024
@s1n7ax
IntelliJ creates a workspace.xml file in the {project_directory}/.idea folder, where it stores profile information. As an example, I've set up a configuration with VM arguments and program arguments ( I believe these are the most commonly used settings, so I've focused on them in the nvim options as well) .

it's possible to pass VM and program arguments for both running and debugging. For the debugging option, after selecting a new profile, you need to reconfigure DAP to load the new arguments. One little downside is that if you're running an application with profile1 and you switch to profile2, you need to stop the session and start a new one to use the profile2.
I think overseer little overhead in this case, because the run/debug commands are already available for us, and simpler user interface is better for profile changes and creation.
POC:
Since nvim.nui is already in use, I focused on creating a small UI with it for creating, editing, and changing the active profile.
profile.mp4
Profile ui
JavaProfilecommandnew profileoption to create a new one (press enter/space)sin normal mode to save.sin normal mode to save.ain normal mode in a listAll Key binding (in normal mode) :
j: Downk: Upspace: Editenter: Editb: Quit/Backq: Quita: Set Actived: Deleteb: Backq: Quits: SaveThe profile config is saved to a JSON file named
nvim-java-profiles.jsonin the~/.local/share/nvimfolder. Saving to the project folder to the .config.json file or something like that, similar to what IntelliJ does, is still a possible option, but for dev/testing, one config feels more manageable.json structure:
{ "project_folder": { "profile_name1": { "vm_arg": "Vm-arg", "prog_arg": "Prog-arg", "profile_name": "profile_name1" } }nvim-java/feature-api-to-run-applicationbranch.feat: profile (nvim-java#110, nvim-java#131)
feat: profile (nvim-java#110, nvim-java#131)
feat: profile (nvim-java#110, nvim-java#131)
feat: profile (nvim-java#110, nvim-java#131)
feat: run/debug profiles (#110, #131) (#146)
s1n7ax commentedon Apr 12, 2024
Awesome work @atm1020. Thanks for contributing.