Open lucascherzer opened 3 months ago
I am currently running Zed zed 0.146.5-2
, in most of the time and most of the languages, the function of %
working perfectly as indented.
Could it be that this is a language specific problem?
Yeah, I've been using Zed since earlier this year and %
has always worked in at least elixir, js, and json.
Hey @lucascherzer, can you give me some more details on this? What languages are you trying to use this in and what OS are you using?
For what it's worth: while this typically works as I expect in the "main" source, I frequently have problems with %
(and some other motions), which don't do what they should in "secondary" text, i.e., in string literals, here-docs, etc.
It seems like this is generally a consequence of trying to be too clever about the source context when just scanning the literal surrounding text would produce the desired result.
I just tried it again in Zed 0.147.2
on MacOS.
Within a rust buffer, this feature worked as expected. I suspect this is because I was previously attempting to use it in a text buffer, which vim supports, but zed does not.
So this is not about adding support in general, which already exists but whether to enable this feature on buffers that do not have a strictly defined syntax like plain text.
As I already said, vim does support the %
hotkey in txt buffers, but imo it would be more elegant to let the user decide via the config. Does anyone have thoughts about that?
IMHO: It's some how related to lsp or tree-sitter. In my case I can't jump to paired bracket in csharp probably because missing tree-sitter or fully functional lsp, something… After vim its a bit disappointing :`(
Check for existing issues
Describe the feature
In vim, pressing
%
when the cursor is on an opening or closing bracket, it will jump to its corresponding closing/opening bracket.If applicable, add mockups / screenshots to help present your vision of the feature
https://asciinema.org/a/bGrzqxXUdGY1Mk8BeREW1prT4