Skip to content

feat(commands): add descriptions #2083

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

Merged
merged 6 commits into from
Mar 27, 2023
Merged

Conversation

alex-courtis
Copy link
Member

@alex-courtis alex-courtis commented Mar 25, 2023

fixes #2076

I would be most grateful for your review @mrjones2014

I've used the "nvim-tree: " prefix as per the mappings and kept it brief. Most grateful for suggestions...

Copy link
Collaborator

@gegoune gegoune left a comment

Choose a reason for hiding this comment

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

Many of those descriptions just repeat what the command itself already says. This doesn't add any value really. But frankly I have no idea what else it could say. :)

@mrjones2014
Copy link
Collaborator

Descriptions look good. Is there any way you can expose the commands as raw data that we can access directly? Sorta like this: https://github.com/mrjones2014/op.nvim/blob/master/lua/op/commands.lua

@alex-courtis
Copy link
Member Author

Descriptions look good. Is there any way you can expose the commands as raw data that we can access directly? Sorta like this: https://github.com/mrjones2014/op.nvim/blob/master/lua/op/commands.lua

That's a great idea. Might be a good opportunity to extract the commands to their own file.

@alex-courtis
Copy link
Member Author

@mrjones2014 I would be most grateful if you tested the new api.get_commands as well as testing each of the commands, to ensure that I didn't miss anything in the refactor.

@gegoune
Copy link
Collaborator

gegoune commented Mar 26, 2023

Would we ever have any more endpoints for commands? If there is a slightest change maybe it warrants nesting like api.commands.get()?

Copy link
Collaborator

@mrjones2014 mrjones2014 left a comment

Choose a reason for hiding this comment

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

As long as the table structure remains consistent, looks good to me 👍

@alex-courtis
Copy link
Member Author

Would we ever have any more endpoints for commands? If there is a slightest change maybe it warrants nesting like api.commands.get()?

Much better. Everything is nested now.

@alex-courtis alex-courtis merged commit 45400cd into master Mar 27, 2023
@alex-courtis alex-courtis deleted the 2076-add-command-descriptions branch March 27, 2023 23:52
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.

Add descriptions to commands via vim.api.nvim_create_user_command
3 participants