aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/progmodes/lua-ts-mode-resources (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fontify all comment delimiters in 'lua-ts-mode'john muhl2025-08-301-0/+5
| | | | | | | | | * lisp/progmodes/lua-ts-mode.el (lua-ts--comment-font-lock): Apply 'font-lock-comment-delimiter-face' to the entire span of initial dashes. In particular, this improves the appearance of LuaCATS and EmmyLua style annotations which use "---". * test/lisp/progmodes/lua-ts-mode-resources/font-lock.lua: Add tests. (Bug#79258)
* ; Fix 'lua-ts-mode' tests (Bug#77102)john muhl2025-03-201-9/+9
| | | | | | * test/lisp/progmodes/lua-ts-mode-resources/indent.erts: Remove unintended use of tabs and make indentation settings buffer local.
* Simplify and improve indent rules in 'lua-ts-mode'john muhl2025-03-131-273/+531
| | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/lua-ts-mode.el (c-ts-common): Require it. (lua-ts-mode): Set 'c-ts-common' variables. (lua-ts--simple-indent-rules): Replace custom indent rules for tables, arguments and parameters with 'c-ts-common-baseline-indent-rule'. Improve consistency of indentation for IIFEs and nested functions. (lua-ts--variable-declaration-continuation) (lua-ts--variable-declaration-continuation-anchor): Reformat. (lua-ts--comment-first-sibling-matcher) (lua-ts--first-child-matcher, lua-ts--first-real-sibling-anchor) (lua-ts--function-definition-p, lua-ts--g-g-g-parent) (lua-ts--g-g-parent, lua-ts--nested-function-argument-matcher) (lua-ts--nested-function-block-include-matcher) (lua-ts--nested-function-block-matcher) (lua-ts--nested-function-end-argument-matcher) (lua-ts--nested-function-end-matcher) (lua-ts--nested-function-last-function-matcher) (lua-ts--top-level-function-call-matcher): Remove. * test/lisp/progmodes/lua-ts-mode-resources/indent.erts: Update tests. (Bug#76986)
* Use TS to support 'hs-minor-mode' in 'lua-ts-mode'john muhl2025-03-081-0/+43
| | | | | | | | | | * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Add list type to 'treesit-thing-settings'. * lisp/progmodes/hideshow.el (hs-special-modes-alist): Remove regular expression based implementation. * test/lisp/progmodes/lua-ts-mode-resources/hide-show.lua: New file. * test/lisp/progmodes/lua-ts-mode-tests.el (lua-ts-test-hideshow): Add test. (Bug#76693)
* ; Cleanup sexp things in 'lua-ts-mode'john muhl2025-02-261-4/+54
| | | | | | | * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Remove some nonsensical entries from 'treesit-thing-settings'. * test/lisp/progmodes/lua-ts-mode-resources/movement.erts: Add missing tests for 'backward-sexp'. (Bug#76534)
* Improve comment indenting in 'lua-ts-mode'john muhl2024-11-141-0/+42
| | | | | | | | | | * lisp/progmodes/lua-ts-mode.el (lua-ts--simple-indent-rules): Align single line comments with the surrounding context. (lua-ts--comment-first-sibling-matcher): Check that comment is the first sibling. (lua-ts--multi-line-comment-start): New function. * test/lisp/progmodes/lua-ts-mode-resources/indent.erts: Add tests. (Bug#74298)
* Improve indentation in 'lua-ts-mode' (bug#70785)john muhl2024-05-081-0/+40
| | | | | | | | | | | | | | | | * lisp/progmodes/lua-ts-mode.el (lua-ts--simple-indent-rules): - Ignore comments when aligning arguments, parameters and fields. - Apply simpler rules to simpler usage of anonymous functions. - Better handling of table as a function argument. (lua-ts--comment-first-sibling-matcher): (lua-ts--first-real-sibling-anchor): (lua-ts--last-arg-function-call-matcher): (lua-ts--top-level-function-call-matcher): New function. (lua-ts--g-parent): (lua-ts--g-g-parent): New function. (lua-ts--g-g-g-parent): Use it. * test/lisp/progmodes/lua-ts-mode-resources/indent.erts: Add tests.
* Fix which-function error in 'lua-ts-mode' (bug#70515)john muhl2024-04-251-0/+3
| | | | | | | | | * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Remove incorrect usage of 'which-func-functions'. * test/lisp/progmodes/lua-ts-mode-tests.el (lua-ts-test-which-function): Add test. * test/lisp/progmodes/lua-ts-mode-resources/which-function.lua: New file.
* Support indented continuation lines in lua-ts-modejohn muhl2024-01-111-0/+106
| | | | | | | | * lisp/progmodes/lua-ts-mode.el (lua-ts--simple-indent-rules): Add a rule to indent multi-line assignments and if statements. (lua-ts-indent-continuation-lines): New user option. * test/lisp/progmodes/lua-ts-mode-resources/indent.erts: Add tests. (Bug#68279)
* Add font-lock tests for lua-ts-mode (bug#67605)john muhl2023-12-091-0/+339
| | | | | | | | | | | * test/lisp/progmodes/lua-ts-mode-tests.el (lua-ts-test-font-lock): Add ert-font-lock tests. (lua-ts-mode-test-indentation): (lua-ts-test-indentation): (lua-ts-mode-test-movement): (lua-ts-test-movement): Rename for consistency. * test/lisp/progmodes/lua-ts-mode-resources/font-lock.lua: New file.
* Various improvements to lua-ts-mode (Bug#66159)john muhl2023-10-232-142/+719
| | | | | | | | | | | | | | | | | | | * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Improve movement. (lua-ts--simple-indent-rules): Improve indentation rules. (lua-ts-mode-map): Add key bindings and menus. (lua-ts-mode-hook): Make hook available in Customize. (lua-ts-inferior-history, lua-ts-inferior--write-history): Add option to read/write an input history file. (lua-ts-inferior-lua, lua-ts-send-buffer, lua-ts-send-file) (lua-ts-send-region, lua-ts-inferior-prompt) (lua-ts-inferior-prompt-continue): Support for sending buffer, file or region to the inferior process. (lua-ts-show-process-buffer, lua-ts-hide-process-buffer) (lua-ts-kill-process): New functions. (lua-ts-inferior-prompt-regexp): Remove option. * test/lisp/progmodes/lua-ts-mode-resources/indent.erts: * test/lisp/progmodes/lua-ts-mode-resources/movement.erts: Add tests.
* bug#65673: Add lua-ts-modebug-gnu-emacs@gnu.org2023-09-162-0/+705
* lisp/progmodes/lua-ts-mode.el: * test/lisp/progmodes/lua-ts-mode-resources/indent.erts: * test/lisp/progmodes/lua-ts-mode-tests.el: New files. * etc/NEWS: Mention the new mode. * lisp/progmodes/eglot.el (eglot-server-programs): * lisp/progmodes/hideshow.el (hs-special-modes-alist): Support 'lua-ts-mode'. * admin/notes/tree-sitter/build-module/batch.sh: * admin/notes/tree-sitter/build-module/build.sh: Add Lua. * test/infra/Dockerfile.emba: * test/infra/test-jobs.yml: Include lua-ts-mode tests.