A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg00366.html below:

Re: Allow indentation styles by use of function in tree-sitter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] From: Yuan Fu Subject: Re: Allow indentation styles by use of function in tree-sitter Date: Sun, 6 Nov 2022 16:06:22 -0800
> On Nov 6, 2022, at 4:52 AM, Theodor Thornhill <theo@thornhill.no> wrote:
> 
> 
> 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)
> ```

Hmmm, does assigning treesit-indent-function fit the bill?

Yuan



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4