]> git.eshelyaron.com Git - emacs.git/commit
Fix treesit-indent-region
authorYuan Fu <casouri@gmail.com>
Sat, 29 Oct 2022 16:04:35 +0000 (09:04 -0700)
committerYuan Fu <casouri@gmail.com>
Sat, 29 Oct 2022 16:09:09 +0000 (09:09 -0700)
commitbde8e87cb7b3be0e0bc9e72c3634f108570cac3e
tree76b52c4dacc6fa49106c37535e4b0f7a9c42515f
parent4552b01d8c8052f607dca2fcddcf7b2e270f1db6
Fix treesit-indent-region

* lisp/treesit.el (treesit-simple-indent-presets): Remove extra comma.
(treesit--indent-1): Return (ANCHOR . OFFSET) instead of column.
(treesit-indent): Accept (ANCHOR . OFFSET) from treesit--indent-1.
(treesit--indent-region-batch-size): Reduce to 400.
(treesit-indent-region): Put a marker on each line's ANCHOR and
compute the indentation with ANCHOR + OFFSET.  Precomputing column
gives wrong indentation when the ANHOR line doesn't have correct
indent yet.
lisp/treesit.el