-
Notifications
You must be signed in to change notification settings - Fork 175
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
issue with plugin (commentary) #2
Comments
Thank you for the report!
It might be that gcc needs the timeoutlen. Will check if there's something I can do. |
I just pushed a fix that should make NORMAL => OPERATOR PENDING mappings work. Can you recheck if it does? It should even work with timeoutlen = 0 |
Your 3. should also work as expected now |
Just checked. thank you for the quick update! 2 works perfectly for any length! Stuff that does not work:
|
I may have narrowed down the problem for .2 problem. Treesitter-textobject mappings are defined this way
So whichkey reads them as actual mappings inplace of appended mappings. Now I cant get into insert mode as i need to press 'i' and whichkey reads them as mappings for textobjects |
@ranjithshegde damn, indeed. I just disabled my earlier changes for operator pending stuff. Need to look into this in more depth. |
@ranjithshegde I just pushed a bunch of changes, which should solve these issues. Treesitter text objects work as they should now, but I'm working on #10 to also get them to show up in the text objects list. |
@folke ^ they are exactly the same actually, except for CSurround |
They would be similar since we show all motions and text objects for both comment and change. Under i/a, you should now also see the treesitter text objects. For me it all seems to work with kommentary. Both plugins should be similar, but I will test with commentary just to be sure. How it should work:
Can you check if it works if WhichKey is loaded and setup before commentary? I lazy load kommentary, so that might make a difference |
Checked. I don't see any difference.
|
ok, I'll install commentary to see what's happening here. |
Commentary doesn't seem to create key mappings: https://github.com/tpope/vim-commentary/blob/349340debb34f6302931f0eb7139b2c11dfdf427/plugin/commentary.vim#L108 I don't really get why not. Even if I load WK after it, they're still missing. Pretty sure the problem is not that we are replacing them, since the keymap for gcc is also missing. Will look into it further |
Just pushed a fix. Let know if it work now. 🤞 |
@folke works perfectly now! (at least cases I typically use) |
@konart thank you for further verification. After #10 fix I wanted to write about gcc problem. But that seems to be resoved with the previous PR. |
@ranjithshegde awesome, thanks! |
All my TS keymaps, whether they were defined within TSconfig block or implicitly as keymaps, all plugin defined motions such as commentary or unimpaired, they work perfectly. Even with 0 timeout. |
@ranjithshegde great to hear! Thanks again for taking the time to help testing all of this |
no problem. Maybe in future I also contribute in the means of PRs. |
@ranjithshegde fyi: just fixed #10 as well |
@folke Just saw it! Fantastic. This is such an upgrade over regular whichkey. I used to have a host of rempas for z, g and ] internals to get them to show up in the old whichkey! this is perfect |
Hello @folke how u doing? First that all, thanks for this amazing plugin. I'd like to report something. I'm using terrortylor/nvim-comment which just a lua version of TPope's Commentary but it doesn't seem to be working. use {
"terrortylor/nvim-comment",
cmd = "CommentToggle",
config = function() require('config.comments') end
}
-- the config
local nvim_comment = prequire("nvim_comment")
if not (nvim_comment) then return end
nvim_comment.setup() Just to be clear, the IDK if I'm doing something wrong or if it's a Thanks! |
@folke my bad. I just removed |
What a wonderful plugin!
Planning to try out with all my plugin with default whichkey config first.
So far I have the following problems.
Will report more as they come in.
The text was updated successfully, but these errors were encountered: