Skip to content

Conversation

@byrmsh
Copy link
Contributor

@byrmsh byrmsh commented Jul 30, 2024

See #1060

init.lua Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

you could do this:

          local map = function(keys, func, desc, mode)
            mode = mode or 'n'
            vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
          end

and set the mode { n, x } for that one line without changing the rest:

          map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' })

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hey @bayramkzk what do you think of this suggestion?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think having mode at the end of arguments seems a bit weird but I agree that this commit changed more lines than it should and as this is a very small change in the config, I don't think there is any need to debate any more about it. Reverting and recommitting with minimal changes now!

@feoh feoh merged commit d452633 into nvim-lua:master Aug 24, 2024
@byrmsh byrmsh deleted the upstream branch August 24, 2024 22:06
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