summaryrefslogtreecommitdiff
path: root/lisp/progmodes/java-ts-mode.el
diff options
context:
space:
mode:
authorTheodor Thornhill <theo@thornhill.no>2022-12-09 22:36:03 +0100
committerYuan Fu <casouri@gmail.com>2022-12-12 15:08:54 -0800
commit8ec923775de3482acf4b158a79838eae64fd4980 (patch)
treec5526fd22dcc4510d9952fcf2afbfc8662dfddd4 /lisp/progmodes/java-ts-mode.el
parent647b6a8099f414e5a7b162efd3658e174064dfe7 (diff)
downloademacs-8ec923775de3482acf4b158a79838eae64fd4980.tar.gz
emacs-8ec923775de3482acf4b158a79838eae64fd4980.tar.bz2
emacs-8ec923775de3482acf4b158a79838eae64fd4980.zip
Tweak various ts-mode's indent and fontification (bug#59931)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Add raw string literal font-locking. * lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Add text_block indent rule. (java-ts-mode--font-lock-settings): Add text_block font-locking. * lisp/progmodes/js.el (js-ts-mode): Prefer top-level navigation. * lisp/progmodes/json-ts-mode.el (json-ts-mode--font-lock-settings): Add comment feature. (json-ts-mode): Use comment feature. * lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode): Prefer top-level navigation.
Diffstat (limited to 'lisp/progmodes/java-ts-mode.el')
-rw-r--r--lisp/progmodes/java-ts-mode.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el
index 9155a7fff25..ac591a08599 100644
--- a/lisp/progmodes/java-ts-mode.el
+++ b/lisp/progmodes/java-ts-mode.el
@@ -73,6 +73,7 @@
((node-is "]") parent-bol 0)
((and (parent-is "comment") comment-end) comment-start -1)
((parent-is "comment") comment-start-skip 0)
+ ((parent-is "text_block") no-indent)
((parent-is "class_body") parent-bol java-ts-mode-indent-offset)
((parent-is "interface_body") parent-bol java-ts-mode-indent-offset)
((parent-is "constructor_body") parent-bol java-ts-mode-indent-offset)
@@ -162,7 +163,8 @@
:language 'java
:override t
:feature 'string
- `((string_literal) @font-lock-string-face)
+ `((string_literal) @font-lock-string-face
+ (text_block) @font-lock-string-face)
:language 'java
:override t
:feature 'literal