[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Allow indentation styles by use of function in tree-sitter
From: |
Theodor Thornhill |
Subject: |
Allow indentation styles by use of function in tree-sitter |
Date: |
Sun, 06 Nov 2022 13:52:08 +0100 |
Hi Yuan!
I was thinking that a quick way to enable indentation styles and
customizable indentation styles is to also accept a function in
tree-sitter-simple-indent.
What do you think of the suggested patch?
That would allow a defcustom such as
```
(defcustom c-ts-mode-indent-rule-function #'c-ts-mode--some-specific-style
"Indentation style of choice"
:group 'c)
```
and in the major-mode init:
```
(setq-local treesit-simple-indent-rules c-ts-mode-indent-rule-function)
```
--
Theo
0001-Make-treesit-simple-indent-rules-accept-function.patch
Description: Text Data
- Allow indentation styles by use of function in tree-sitter,
Theodor Thornhill <=