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

Question: Add desc parameter to mappings #51

Open
shahamran opened this issue Jun 29, 2023 · 2 comments
Open

Question: Add desc parameter to mappings #51

shahamran opened this issue Jun 29, 2023 · 2 comments
Labels
good first issue Good for newcomers

Comments

@shahamran
Copy link

Hi, thanks for this plugin, it makes my init.lua much nicer.

I apologize in advance if this is a silly question, I'm new to neovim.

Inspired by kickstart.nvim, I set mappings like this:

vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { buffer = bufnr, desc = '[G]o to [D]efinition' })

which made integration with which-key really nice.

Is there a way to achieve this simply with this plugin? Or should I just set default_mappings = false and configure it manually?

Thanks!

@shahamran
Copy link
Author

I just looked at: lua/lsp-setup/utils.lua and it seems like opts are hardcoded.

I guess changing the config to support something like that is possible, but maybe you don't want to add this kind of complexity (after all, this plugin exists to reduce configuration complexity).
If you'll be open to such change, let me know, and I can try to implement it :)

@junnplus
Copy link
Owner

junnplus commented Jun 29, 2023

@shahamran PRs are doubly welcome!

@junnplus junnplus added the good first issue Good for newcomers label Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants