[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: c-ts-mode
From: |
Yuan Fu |
Subject: |
Re: c-ts-mode |
Date: |
Thu, 31 Aug 2023 21:14:42 -0700 |
> On Aug 30, 2023, at 4:52 PM, Ergus <spacibba@aol.com> wrote:
>
> Hi all:
>
> I have been trying to use c++-ts-mode and I found this apparently wrong
> indentation:
>
> int a(in x
> )
>
> The ) is placed differently compared with the previous c++-mode and
> inconsistent with the current linux coding standard.
>
> The treesit-check-indent shows actually a diff there (same with for
> loops)
>
> I see this entry `((node-is ")") parent 1)` in c-ts-mode--indent-styles
> so there must e a reason I am not aware of... however:
>
> Is it possible to specify small differences in the existent styles like
> we used to do with c-set-offset? either in the init file or the
> .dir-locals.el?
>
> a way to put something like: `((node-is ")") parent 0`??
>
> If I need to define some completely different indentation style (google
> for example) whats the intended method to do it without reinventing the
> wheel?
For now at least, I think you can try modifying treesit-simple-indent-rules.
You can prepend rules to the list which would take precedence over the rest.
C-ts-mode could definitely be improved in terms of customization, and any
feature in general. Any help is welcome!
Yuan
- Re: c-ts-mode,
Yuan Fu <=
- Re: c-ts-mode, João Távora, 2023/09/07
- Re: c-ts-mode, Eli Zaretskii, 2023/09/07
- Re: c-ts-mode, João Távora, 2023/09/07
- Re: c-ts-mode, Eli Zaretskii, 2023/09/07
- Re: c-ts-mode, João Távora, 2023/09/07
- Re: c-ts-mode, Eli Zaretskii, 2023/09/07
- Re: c-ts-mode, João Távora, 2023/09/07
- Re: c-ts-mode, Eli Zaretskii, 2023/09/07
- Re: c-ts-mode, João Távora, 2023/09/07
- Re: c-ts-mode, Eli Zaretskii, 2023/09/08