summaryrefslogtreecommitdiff
path: root/lisp/progmodes/java-ts-mode.el
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix tree-sitter comment indentation for C-like languagesYuan Fu2022-11-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to indent like this: /* comment comment --> This line aligns with the beginning of the first line */ --> This line aligns with the opening comment token * lisp/treesit.el (treesit-comment-start) (treesit-comment-end): New variables. (treesit-simple-indent-presets): New preset comment-end, comment-start, comment-start-skip * lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles) (c-ts-mode) * lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules) (java-ts-mode) * lisp/progmodes/js.el (js--treesit-indent-rules) (js-ts-mode) * lisp/progmodes/ts-mode.el (ts-mode--indent-rules) (ts-mode): Add identical indent rules to each mode, and set identical treesit-comment-start/end's. * doc/lispref/modes.texi (Parser-based Indentation) * doc/lispref/parsing.texi (Tree-sitter major modes): Update manual.
* Fix some inconsistencies in *-ts-modesTheodor Thornhill2022-11-141-11/+34
| | | | | | | | | | | | | | | | | | | | (c-ts-mode--base-mode): Extract comment-* so that we can separate between C and C++. (c-ts-mode, c++-ts-mode): Set comment-* variables. * lisp/progmodes/css-ts-mode.el (css-ts-mode): Add electric-indent. * lisp/progmodes/java-ts-mode.el (java-ts-mode--imenu): Add categories. Only display categories that exist in the file. (java-ts-mode): Add electric-indent. * lisp/progmodes/json-ts-mode.el (json-ts-mode): Add electric-indent. * lisp/progmodes/ts-mode.el (ts-mode--font-lock-settings): Whitespace cleanup. (ts-mode): Add electric-indent.
* ; Minor typo fixes for tree-sitter modesYuan Fu2022-11-121-2/+2
| | | | | | | | | * etc/NEWS: Fix typos. Change Tree-sitter to tree-sitter. * lisp/progmodes/c-ts-mode.el * lisp/progmodes/css-ts-mode.el * lisp/progmodes/java-ts-mode.el * lisp/progmodes/json-ts-mode.el: Change Tree Sitter to tree-sitter. Fix typo.
* Add tree-sitter modes for C-like languagesTheodor Thornhill2022-11-121-0/+289
* etc/NEWS: Mention the new modes * lisp/progmodes/c-ts-mode.el: New major mode with tree-sitter support for C and C++. * lisp/progmodes/java-ts-mode.el: New major mode with tree-sitter support. * lisp/progmodes/json-ts-mode.el: New major mode with tree-sitter support. * lisp/progmodes/css-ts-mode.el: New major mode with tree-sitter support.