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

docs: Add Lua-only key mappings examples #2174

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

sestrella
Copy link
Contributor

@sestrella sestrella commented Sep 21, 2022

Description

Adding some Lua-only key mapping examples taking advantage of NeoVim 0.7 features

@sestrella sestrella changed the title docs: Add Lua key mappings to usage section docs: Add Lua-only key mappings examples Sep 21, 2022

```lua
local builtin = require('telescope.builtin')
vim.keymap.set('n', 'ff', builtin.find_files, {})
Copy link
Member

Choose a reason for hiding this comment

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

mappings dont have parity with the viml because of missing noremap = true

Copy link
Contributor Author

@sestrella sestrella Sep 28, 2022

Choose a reason for hiding this comment

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

@Conni2461 thank you for the comment, I might be missing something here, but I don't see noremap as a valid option in the context of vim.keymap.set. There is an option called remap with false as the default value which I think is equivalent to noremap = true in the context of nvim_set_keymap

image

Copy link
Member

@Conni2461 Conni2461 Sep 30, 2022

Choose a reason for hiding this comment

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

image

It clearly links to map-arguments, noremap should be a map argument. But remap clearly meantions that the default is already false. maybe the neovim team changed the default to the better.

It also mentions all options from nvim_set_keymap which meantions noremap explicitly.

btw docs are from nvim 0.7.2, which is the current target version

@Conni2461
Copy link
Member

Thanks :)

CI failure is unrelated and already fixed on master

@Conni2461 Conni2461 merged commit 63e2790 into nvim-telescope:master Sep 30, 2022
@sestrella sestrella deleted the update_readme_usage branch September 30, 2022 18:25
Conni2461 pushed a commit that referenced this pull request Jan 6, 2023
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.

2 participants