all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#65673: [PATCH emacs 0/1] Add lua-ts-mode
@ 2023-08-31 22:55 ~johnmuhl
  2023-08-31 21:32 ` bug#65672: [PATCH emacs 1/1] " ~johnmuhl
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: ~johnmuhl @ 2023-08-31 22:55 UTC (permalink / raw)
  To: 65673; +Cc: ~emacs/emacs-devel

This email and patch were generated and sent using the web based
“Prepare a patchset” feature of Sourcehut. I hope it will be a useful
POC for how Emacs could integrate a forge based pull request style
workflow for occasional contributors with (hopefully) minimal hassle
for those with push access. If it causes too much annoyance I’m happy
to resend it the preferred way.

I’ve also CC’d a Sourcehut mailing list to test the patch review
feature so if this experiment continues it’d be good if we could keep
“~emacs/emacs-devel@lists.sr.ht” included in any replies. Other than
that just do the usual patch review/handling.

The sr.ht hosted version of the Sourcehut forge is considered “Good
enough to recommend” by the GNU Ethical Repository Criteria in case
anyone wonders about that.

https://www.gnu.org/software/repo-criteria-evaluation.html

Discussion or questions about Sourcehut or the workflow should
probably go somewhere else but please CC me in that case.

Thanks.

////

This patch adds a lua-ts-mode for editing Lua files in Emacs >= 29.1.
It is comparable in features to the NonGNU ELPA lua-mode. Shortcomings
in the partially supported features are mentioned below.

| Feature                | lua-mode | lua-ts-mode |
|------------------------+----------+-------------|
| indentation ¹          | Yes      | Yes         |
| highlighting           | Yes      | Yes         |
| documentation lookup ² | Yes      | Yes         |
| imenu support ³        | Yes      | Partial     |
| hideshow support       | Yes      | Yes         |
| outline support        | No       | Yes         |
| flymake support ⁴      | Yes      | Yes         |
| which-func support     | No       | Yes         |
| inferior Lua ⁵         | Yes      | Partial     |

1. Indentation tries to follow the default EmmyLua style. This is the
   same formatter used by lua-ls so out of the box eglot-format and
   automatic indentation should agree about indents.

2. Both modes implement this feature by calling browse-url for the
   manual.html file that is normally distributed with Lua. lua-mode
   has a fallback that uses an online version, lua-ts-mode has no
   fallback but works with the online docs if customized.

3. I tried to follow the model used in other ts modes but it doesn’t
   seem like the results are very useful compared to Eglot/lua-ls. I’d
   like it to improve eventually but it’s low priority personally and
   wouldn’t oppose removing it for now.

4. Both modes require the Luacheck program to be installed.

5. The comint integration is the most basic. lua-mode supports things
   like "Send {buffer,region} to process" which I’d like to add but
   haven’t had time. Currently lua-ts-mode only supports starting an
   inferior Lua process and interacting with it directly.

The patch file is also available from:
https://git.sr.ht/~johnmuhl/emacs/commit/391699e.patch

Thanks again.

john muhl (1):
  Add lua-ts-mode

 admin/notes/tree-sitter/build-module/batch.sh |   1 +
 admin/notes/tree-sitter/build-module/build.sh |   3 +
 etc/NEWS                                      |   4 +
 lisp/progmodes/eglot.el                       |   2 +-
 lisp/progmodes/hideshow.el                    |   1 +
 lisp/progmodes/lua-ts-mode.el                 | 457 ++++++++++++++++++
 test/infra/Dockerfile.emba                    |   1 +
 test/infra/test-jobs.yml                      |   1 +
 .../lua-ts-mode-resources/indent.erts         | 152 ++++++
 test/lisp/progmodes/lua-ts-mode-tests.el      |  32 ++
 10 files changed, 653 insertions(+), 1 deletion(-)
 create mode 100644 lisp/progmodes/lua-ts-mode.el
 create mode 100644 test/lisp/progmodes/lua-ts-mode-resources/indent.erts
 create mode 100644 test/lisp/progmodes/lua-ts-mode-tests.el

-- 
2.38.5





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-09-16 11:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-31 22:55 bug#65673: [PATCH emacs 0/1] Add lua-ts-mode ~johnmuhl
2023-08-31 21:32 ` bug#65672: [PATCH emacs 1/1] " ~johnmuhl
2023-09-02 12:14   ` bug#65673: [PATCH emacs 0/1] " Philip Kaludercic
2023-09-02 14:10   ` bug#65672: [PATCH emacs 1/1] " Augusto Stoffel
     [not found]   ` <handler.65672.B.169354983214451.ack@debbugs.gnu.org>
2023-09-04 14:36     ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-04 15:18       ` Eli Zaretskii
2023-09-04 15:54       ` Philip Kaludercic
2023-09-01 22:46 ` bug#65673: [PATCH emacs 0/1] " Mauro Aranda
2023-09-09 15:17 ` bug#65673: [PATCH emacs 1/1 v2] " john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-09 15:17   ` bug#65673: [PATCH] " john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10 11:12     ` Philip Kaludercic
2023-09-10 12:57       ` Augusto Stoffel
2023-09-11 15:03 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-16 10:03   ` Eli Zaretskii
2023-09-16 11:17     ` Eli Zaretskii
2023-09-16 11:21       ` Eli Zaretskii

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.