tsi.el
tsi.el copied to clipboard
treesitter-based indendentation for emacs 28 and 27
`tsx-mode` indents all of these to zero spaces (`|` representing the cursor) ```ts `${ | }` `${{ | }}` `${( | )}` `${[ | ]}` ``` `typescript-mode` and `js-mode` also...
`tsx-mode` indents the line immediately following a `{{` or `[{` twice (all examples captured with `tsi-typescript-indent-offset` = 2, `|` representing the cursor): ```ts {{ | }} [{ | }] ```...
`tsx-mode` doesn't indent any lines within a multi-line string indentation: ```ts `${ 0 }` ``` `js-mode` and `typescript-mode` don't indent these cases either, but I'd personally expect it to be...
right now the experience isn't so great when there's an error node in the CST. for instance, typing an open-curly bracket at the beginning of line 2 here: ```javascript function()...
This is reminiscent of #8 . When adding a new line in CSS or if the line is blank it does not indent correctly: ``` .myBox { display: flex; flex-direction:...
accidentally pushed some bad code which caused an error while enabling a `tsi--mode`s. it'd be nice to have a quick smoke test which sets the current major-mode.
now that [`tsx-mode.el`](https://github.com/orzechowskid/tsx-mode.el) has support for GraphQL tagged template strings, it'd be nice if we could use tree-sitter for indentation there instead of graphql-mode.
* indent "if" and "for" loops without braces * indent return statement after if
Hello and thank you for work on this excellent package. It is the only viable solution for TSX in Emacs. And it works almost perfectly, except for a small problem....