Support `CamelCaseMotion`, integrate `nvim-spider`
Default behavior of NODES("{[ < is good, but i MOSTY do WORD selection which is not seem to happening
example of wats wrong
https://github.com/SUSTech-data/wildfire.nvim/assets/108952834/e06af664-16d0-4c23-8c8f-c367f7113d74
just give me a way to do so :)
Did you mean select the word CamelCaseMotion in the comments?
yes , word Based selection but Based on CamelCaseMotion such in that way it would require x3 <CR> to select CamelCaseMotion whole !
I think this might be harder to achieve than it looks. Have you seen any plugins do similar things so I can look into it?
sorry i think i forgot to inform about nvim-spider in above convo's :(
NVIM-Spider has done it already for motion, you just use it with visual-motion
this may make this work easy,
OK I will take care of it, maybe add this with custom textobjects. This would introduce inconsistent incremental selection methods (searching for the parent node and searching for the next subword), so I'm still considering how to implement them.
sorry but i dont' know what to say now ?! :|
I have played with NVIM-Spider for a while, but I cannot make it work in visual mode. If you have slected CamelCase in CamelCaseMotion, can you select CamelCaseMotion by w and Camel by b?
@fecet Hi, nvim-spider dev here.
At least for stuff relating to my plugin, I can maybe help out.
@chrisgrieser Hi, thanks for response, I hadn't expect this.
I don't think there is any bug here, (neither for nvim-spider of course). I just wondering if/how spider works in visual mode, say, in the case
If you have slected
CamelCaseinCamelCaseMotion, can you selectCamelCaseMotionbywandCamelbyb?
This is what I had envisioned, but things didn't unfold this way. I'm wondering if it's due to an issue with my setup or if the spider doesn't actually work like this.
I had never used spider before this, but I loved nvim-origami very much, thank you for making so many great plugins!
If you have slected
CamelCaseinCamelCaseMotion, can you selectCamelCaseMotionby w andCamelby b?
Indeed, it appears in this case b selected CamelC 🤔
I don't use visual mode much, therefore I haven't noticed. But that only happens when using b to reduce a selection, when using b to enlarge a selection, it works correctly. Guess that one is a bug with nvim-spider indeed.
So, I believe the right approach would be to init wildfire with the subword , then you can employ spider to refine your selection range.
I will proceed with implementing the former, but the latter will have to wait for spider.