From: Randy Taylor <dev@rjt.dev>
To: Juan Palacios <jpalaciosdev@gmail.com>
Cc: 66845@debbugs.gnu.org
Subject: bug#66845: 29.1; cmake-ts-mode indentation broken
Date: Tue, 31 Oct 2023 15:50:43 +0000 [thread overview]
Message-ID: <jr40M1qr-grj-QypctGvCtqzHMk9deoo-s-OtKXUzwBiTyS0pa9rC3Fu5B1iS82m01lUwuZj273nLQx0gJEfvWCY8mcRKV6AxhP6PrDpD3o=@rjt.dev> (raw)
In-Reply-To: <CAEPLNsfw8rC-cLOptvHiNh_XtpOZ_e15cUeFtv_hb2PEpn-wpA@mail.gmail.com>
On Tuesday, October 31st, 2023 at 07:35, Juan Palacios <jpalaciosdev@gmail.com> wrote:
> Using cmake grammar from https://github.com/uyha/tree-sitter-cmake
>
> Reproduction:
> 1. emacs -q
> 2. C-x C-f test.cmake
> 3. M-x cmake-ts-mode
> 4. Insert the following text:
> if(TRUE)
> message("indent")
> endif()
> 5. Move the point to the beginning of the second line.
> 6. TAB
> 7. Notice that no indentation is performed.
>
> treesit-simple-indent-rules local value:
> ((cmake
> ((node-is ")")
> parent-bol 0)
> ((node-is "else_command")
> parent-bol 0)
> ((node-is "elseif_command")
> parent-bol 0)
> ((node-is "endforeach_command")
> parent-bol 0)
> ((node-is "endfunction_command")
> parent-bol 0)
> ((node-is "endif_command")
> parent-bol 0)
> ((parent-is "foreach_loop")
> parent-bol cmake-ts-mode-indent-offset)
> ((parent-is "function_def")
> parent-bol cmake-ts-mode-indent-offset)
> ((parent-is "if_condition")
> parent-bol cmake-ts-mode-indent-offset)
> ((parent-is "normal_command")
> parent-bol cmake-ts-mode-indent-offset)))
>
> treesit-explore-mode shows:
> (if_condition
> (if_command (if) (
> (argument_list
> (argument (unquoted_argument)))
> ))
> (body
> (normal_command (identifier) (
> (argument_list
> (argument
> (quoted_argument " (quoted_element) ")))
> )))
> (endif_command (endif) ( )))
>
Thanks for the report, I'll take a look tonight.
next prev parent reply other threads:[~2023-10-31 15:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 11:35 bug#66845: 29.1; cmake-ts-mode indentation broken Juan Palacios
2023-10-31 15:50 ` Randy Taylor [this message]
2023-11-01 2:45 ` Randy Taylor
2023-11-05 14:32 ` Juan Palacios
2023-11-05 18:16 ` Fu Yuan
2023-11-07 8:25 ` Yuan Fu
2023-11-07 17:21 ` Randy Taylor
2023-11-07 20:11 ` Juan Palacios
2023-11-08 2:52 ` Yuan Fu
2023-11-08 3:42 ` Randy Taylor
2023-11-08 12:33 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='jr40M1qr-grj-QypctGvCtqzHMk9deoo-s-OtKXUzwBiTyS0pa9rC3Fu5B1iS82m01lUwuZj273nLQx0gJEfvWCY8mcRKV6AxhP6PrDpD3o=@rjt.dev' \
--to=dev@rjt.dev \
--cc=66845@debbugs.gnu.org \
--cc=jpalaciosdev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.