DEV Community

taku25
taku25

Posted on

Bringing Neovim Closer to Rider: Auto-Generation & Tree Enhancements (Weekly Update)

Here are the updates for this week.
Along with fixing some persistent database-related bugs, I've focused on implementing convenient features found in JetBrains Riderโ€”specifically "Create Definition" and "Create Implementation"โ€”into UCM.nvim.

Neovim is getting one step closer to a full IDE experience for Unreal Engine development!

๐Ÿš€ UCM.nvim: Seamless Definitions & Implementations

Iโ€™ve automated the boilerplate code writing that usually requires manual switching between header and source files.

  • UCM create_impl
    Executing this command on a function definition in a header file automatically inserts the implementation template into the corresponding source (.cpp) file.
    A key feature is that if the function is marked with override, it automatically generates the Super::Function() call as well.
    UCM impl

  • UCM create_decl
    This performs the reverse of create_impl. Executing it on a function implementation in the source file adds the definition to the header. It also supports signature updates, such as changes to arguments.

UCM decl

  • UCM add_struct While classes are typically managed as "one class per file," there are often times when you want to quickly add a struct to a header. This command provides a wizard where you can simply select a name and parent struct to insert the appropriate USTRUCT definition right at your cursor.

IUCM add

  • Refactoring New File Creation
  • UCM new_class: Dedicated command for creating new class files.
  • UCM new_struct: Dedicated command for creating new struct files.
  • I refactored the internal logic of UCM new to properly handle both classes and structs independently.

๐ŸŒฒ UNX.nvim: Reducing File Tree Friction

I've improved the usability of the file tree to reduce friction during navigation.

  • Tree State Persistence Unreal Engine project hierarchies tend to be very deep. Reopening folders every time I restarted Neovim was tedious, so I added the ability to save and restore the tree's open/close state.
  • UNX focus I implemented a feature to focus the file tree on the currently edited file. This is extremely useful when you want to create a new file in the same directory as the one you are currently working onโ€”you can instantly locate your position in the tree.

๐Ÿ” UEP.nvim: Enhanced Navigation

  • UEP structs Implemented a feature to display a list of structs and jump directly to their definitions.

UEP struct


Conclusion

That wraps up this week's changes.
With the addition of implementation/definition auto-generation and the struct wizard, I feel that Neovim has reached a level where it can be my primary battlefield for editing code.

Looking ahead, I'm exploring ways to integrate Neovim with IDEs like Rider.
For example, it would be amazing to instantly open a file hitting a breakpoint in Rider directly in Neovim, or conversely, open the file being edited in Neovim inside Rider. If I can achieve this seamless interaction, I think it will create the ultimate development environment. I'm currently researching the technical feasibility of this workflow.

Top comments (0)