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

<cmd> doesn't work for visual mappings #37

Open
jam1015 opened this issue Jan 31, 2024 · 1 comment
Open

<cmd> doesn't work for visual mappings #37

jam1015 opened this issue Jan 31, 2024 · 1 comment

Comments

@jam1015
Copy link

jam1015 commented Jan 31, 2024

xnoremap <silent> m :lua require('tsht').nodes()<CR>

works as expected but

xnoremap <silent> m <cmd>lua require('tsht').nodes()<CR>

does not expand the visual selection

@milanglacier
Copy link

You should use this:

            keymap('v', '<CR>', ':<C-U>lua require("tsht").nodes()<CR>', {
                desc = 'treesitter nodes',
            })

Looks like a typo in the readme.

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

No branches or pull requests

2 participants