Skip to content

Conversation

@ckob
Copy link
Contributor

@ckob ckob commented Apr 12, 2025

I create this PR as a discussion about how could we add custom mappings needed per each IDE flavor.

For example, in Rider, the RenameFile action does nothing. But the RiderRenameFile does what's expected. I suppose the same could happen with other IDEA flavors.

Please feel free to propose or edit the PR with other code organization.

There could be several options, such as:

if is_ide_rider
  the Rider map
else
  the default map
endif
if is_ide_rider
   all the maps for rider together in a single if block, after the common ones
endif

Somehow a function where you pass on the map, default action name, rider action name, etc.

I opted to propose it with the inline-if, as it is close to the default mapping. And it adds just one line per each one.

Copy link
Owner

@cufarvid cufarvid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR!

I like keeping override mappings close to their originals as you've done. Makes perfect sense for maintenance. The inline-if approach works well enough for the Rider actions for now.

We've had some discussions about restructuring the project to make it a bit more modular (intellimacs has an interesting approach), but I don't have bandwidth for that kind of refactoring at the moment.

We can go with your solution for now - it solves the immediate problem without requiring a major overhaul. Before I merge, @mikeslattery - any thoughts on this?

Cheers for the contribution!

Copy link
Collaborator

@mikeslattery mikeslattery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cufarvid, I like it.

@cufarvid cufarvid merged commit 1dc07c9 into cufarvid:main Apr 22, 2025
yy921010 pushed a commit to yy921010/lazy-idea that referenced this pull request Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants