Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add keymaps for floating window #174

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Tronikelis
Copy link

@Tronikelis Tronikelis commented Aug 31, 2024

closes #172

I am up for discussion on how to call these settings and where to put them

fyi I tested the changes locally

Another approach would be to architecture settings like this:

win_mappings = {
	tags = {},
	scopes = {},
	loaded_scopes = {},
}

Not really sure which one's betteer

Copy link

@edwardbaeg edwardbaeg left a comment

Choose a reason for hiding this comment

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

Very excited about this new feature!

lua/grapple/settings.lua Outdated Show resolved Hide resolved
@Tronikelis
Copy link
Author

@cbochs friendly bump :))

@cbochs
Copy link
Owner

cbochs commented Sep 29, 2024

@Tronikelis apologies for the late reply. I was away on vacation for the past several weeks. Will take a look here soon 🙂

Copy link
Owner

@cbochs cbochs left a comment

Choose a reason for hiding this comment

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

This is a good start to making mappings more customizable! Left a couple comments.

One note: I think (at least for now) I would prefer that the go_up_scope be fixed. It doesn't have a good common action between the different windows. For example, Tags -> Scopes, Scopes -> Loaded (containers), Loaded (containers) -> Scopes.

It almost feels like there should be separate maps for each:

tag_mappings = { go_to_scopes = "-" }
scope_mappings = { go_to_loaded = "-" }
loaded_mappings = { go_to_scopes = "-" }

But needs a bit more thought, I think. In addition, I don't really like the name loaded. It obscures what is this window is really for: Grapple containers. Something I would like to resolve in the near future would be to rename this from "loaded" to "containers".

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved

--Override default floating window mappings
win_mappings = {
toggle_hidden = "g.",
Copy link
Owner

Choose a reason for hiding this comment

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

Some action name change suggestions:

  • unload_scope -> unload and put in the loaded_mappings table
  • reset_scope -> reset and put in the loaded_mappings table
  • change_scope -> change and put in the scope_mappings table
  • select_horizontal -> select_split and put in the tag_mappings table
  • select_vertical -> select_vsplit and put in the tag_mappings table

Copy link
Author

Choose a reason for hiding this comment

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

thanks for the insights, I'll change it

Copy link
Author

@Tronikelis Tronikelis Sep 29, 2024

Choose a reason for hiding this comment

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

did you list all the renames here? Or is something left

@Tronikelis
Copy link
Author

@cbochs I've changed the names based on your comments, please check if I got everything right

@Tronikelis
Copy link
Author

@cbochs could we get this merged?

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.

feature: option for the floating window's keymaps
3 participants