From 94d7bd76b8ec48378b044ff691fb5ef2f9698c08 Mon Sep 17 00:00:00 2001 From: Randy Taylor Date: Thu, 24 Nov 2022 09:31:53 -0500 Subject: [PATCH] Fix c++-ts-mode indentation (Bug#59498) * lisp/progmodes/c-ts-mode.el (c++-ts-mode): Set treesit-comment-start and treesit-comment-end. --- lisp/progmodes/c-ts-mode.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index fc35d9aedda..48f504214e2 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -570,6 +570,8 @@ c++-ts-mode (setq-local comment-start "// ") (setq-local comment-start-skip "\\(?://+\\|/\\*+\\)\\s *") (setq-local comment-end "") + (setq-local treesit-comment-start (rx "/" (or (+ "/") (+ "*")))) + (setq-local treesit-comment-end (rx (+ (or "*")) "/")) (treesit-parser-create 'cpp) -- 2.38.1