-
Notifications
You must be signed in to change notification settings - Fork 8
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
Auto indentation not working as expected #5
Comments
Thank you for the hint. Your issue is about indentation, while the plugin is for highlighting. Is there a relation? I.e. does the indentation draw information from the highlighting? |
It's not related to Syntax itself, but might be provided by the plugin for TypoScript. I still don't get the error why the indentation does not work. Just tried to figure it out by reading the docs:
Looks like with At least it should be possible to define a function for indentation via https://neovim.io/doc/user/options.html#'indentexpr' . This way it should be possible to fix the indentation problem at least. |
I tested this. Both cindent and smartindent show this behaviour. You are right, that typoscript indentation would make a great improvement to this plugin. Any idea which language is similar so that one could copy from it? Or did you find other typoscript plugins already shipping indentation? |
I'm not aware of any other TypoScript plugin for Vim. Vim is not that common in TYPO3 context. For me it's a smaller set of PSR-2 rules for PHP, where we also have Looks like the default is to indent the line containing the https://github.com/neovim/neovim/tree/master/runtime/indent contains a list of supported indentation configurations for languages. |
There are plenty of indent files for other languages. Examples:
I am sure typescript just needs a very small script. It's mainly about the curly braces, the round brackets of multiline text and the multiline comments. |
Go could be a starting point. Braces grammar and quite small. https://github.com/neovim/neovim/blob/master/runtime/indent/go.vim |
Thanks for this plugin.
I just found a small glitch.
Given the following TypoScript:
The autoformat:
gg=G
results in:Where I expect the above input to be the result.
The text was updated successfully, but these errors were encountered: