[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66466: [PATCH] Support lua-ts-mode in align.el
From: |
Stefan Kangas |
Subject: |
bug#66466: [PATCH] Support lua-ts-mode in align.el |
Date: |
Sat, 21 Oct 2023 03:27:19 -0700 |
Version: 30.1
john muhl <jm@pub.pink> writes:
>> Also, I noticed that we already have several similar rules for aligning
>> assignments and comments in `align-rules-list`. Do none of them work
>> for Lua?
>
> The toml-assignment rule works well enough. I added the Lua modes there
> now.
>
>> If so, I wonder what specifics of Lua's syntax make the existing rules
>> inapplicable.
>
> For comments I only see the open-comment and c++-comment rules.
> open-comment doesn’t match trailing line comments. Extending c++-comment
> in the obvious way (Lua uses "--" for comment start) causes trouble with
> c++ code like:
>
> int x = 5; // declare
> x--; // decrement
>
> Lua shares comment syntax with at least Ada, Haskell, SQL and VHDL so I
> changed the name of the rule to double-dash-comment and added the Lua
> modes there.
Thanks, installed on master.
[1: a838bcb23c6]: 2023-10-21 12:25:25 +0200
Support lua-ts-mode in align.el
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=a838bcb23c60fe5bd29a1013a8c75796420ee461