Change tree-sitter indent anchor 'point-min' to 'column-0'
Point-min isn't necessarily at column 0, using line-beginning-position is better. column-0 is also more intuitive. * doc/lispref/modes.texi (Parser-based Indentation): Update manual. * lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): * lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--indent-rules): * lisp/progmodes/typescript-ts-mode.el: (typescript-ts-mode--indent-rules): Change point-min to column-0. * lisp/treesit.el (treesit-simple-indent-presets): Change point-min to column-0.
This commit is contained in:
parent
f47b393015
commit
4c16fd3a51
6 changed files with 29 additions and 26 deletions
|
@ -69,7 +69,7 @@
|
|||
"Rules used for indentation.
|
||||
Argument LANGUAGE is either `typescript' or `tsx'."
|
||||
`((,language
|
||||
((parent-is "program") point-min 0)
|
||||
((parent-is "program") column-0 0)
|
||||
((node-is "}") parent-bol 0)
|
||||
((node-is ")") parent-bol 0)
|
||||
((node-is "]") parent-bol 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue