-
Notifications
You must be signed in to change notification settings - Fork 2
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
TreeSitter indent for .yuck files doesn't seem correct #7
TreeSitter indent for .yuck files doesn't seem correct #7
Comments
@amaanq do you have an idea how to fix this? |
Hey sorry I just saw this, I can take a look in a bit, and maybe it'd be better to open an issue there, ik @lucario387 is pretty good with the indent stuff |
Will look at it someday :) That's all I can confirm. This isn't a parser issue (yet). |
Can you try updating nvim-ts and see how that fares @squishram |
A problem seems to persist even after updating TreeSitter. I'll try and explain the issue more concisely, I hope that helps. Sorry, I am not all that much of a programmer and don't think I'd be an effective crontibutor, but if you are struggling to see the issue and could use some help I'd be happy to clone the repo and have a look. Currently, auto-indent looks like this:
When what we presumably want is this:
So I know this probably seems like quite a small problem, but over a long widget, this can really impact legibility as it's unclear "what belongs to what", which is a pretty essential piece of information in this context. As I say, let me know if you need another pair of eyes on it. |
Does it work correctly after inputting |
Because if it's supposed to work like lisp, i.e all parens are done after all the contents are typed in, I will have to do a bit more tweaking for that |
I'm not really sure what you mean by this I'm afraid & I'm not familiar with Lisp syntax. Do you think my recommendation for how |
As in I have no idea what you and others expect of Yuck indent. Should it be "I won't close any parentheses until the end", or "I will close the parens and then fill the content inside it". |
Auto-indentation on
.yuck
files using treesitter misplaces the first piece of content in (e.g.) a widget or window, and all the closing brackets are also misplaced (as a result?). It gives this kind of situation:So line containing box one is under-indented, and the brackets that close box one and box two are over-indented. I hope this makes sense. It's still a lot better than non-TS indenting but I'd really appreciate a fix as these files are a nightmare to work with already. Thanks!
The text was updated successfully, but these errors were encountered: