Skip to content

Conversation

@dgud
Copy link
Contributor

@dgud dgud commented Oct 17, 2025

Clean up of pull request #2

Removed commits that where obsolete by later commits.
Squashed commits that changed the same functionality.

Added a commit with new operators and one which changes
the original face of remote module calls. Which all users don't want.

Replaces #2

JimMoen and others added 9 commits February 20, 2025 17:57
- To make `-` before attrs highlighted
set syntax-propertize function
- `$` in atom and string
- Tripled-quoted string in doc or Var

make erlang-ts-mode-syntax-table and mark `?$` as word

- for char like `$'`, `$"`, `$\"`, modify text property as word
Let the user choose if they want different colors for module, function.
And update instructions, because an updated treesitter grammer is required.
@dgud dgud self-assigned this Oct 17, 2025
@dgud dgud mentioned this pull request Oct 17, 2025
@dgud dgud requested a review from u3s October 19, 2025 07:55
@dgud
Copy link
Contributor Author

dgud commented Oct 20, 2025

@JimMoen @bbatsov Can you do a check so I have not botched anything?

@bbatsov
Copy link

bbatsov commented Oct 20, 2025

Looks good to me. (might be a good idea to also add some trivial GHA that runs the built-in byte-compilation linting so such problems are immediately spotted)

@dgud
Copy link
Contributor Author

dgud commented Oct 20, 2025

Looks good to me. (might be a good idea to also add some trivial GHA that runs the built-in byte-compilation linting so such problems are immediately spotted)

Yes, agree, need more time, this is done because I procrastinate other things :-)

I did look at the testing you suggested but it was not trivial for me, emacs newbie every time I start doing something in lisp.
If you have time, it would be great if you could supply a PR with a testing framework (and instructions of how to run it),
and then I could add more tests later.

@JimMoen
Copy link
Contributor

JimMoen commented Oct 21, 2025

Sorry forgot to reply to the PR... 🙃

function-call
constant)
(operator ;; Level 4
remote-module
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remote-module feature is a common function call in Erlang code.
I tend to enable it by default as a level 3 feature.
(The default level is 3, line 416)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some old timers don't like too much colors in their code.

Which is why I split up your code in function calls and remote-module calls, and
added function calls to level 3, and added remote to level 4.

Then the user can choose, and it is a menu click a way, I thought it was a good compromise,
you and I can set level 4.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I think overdoing the fontification by default is not a good idea as too much colors can make the code harder to read instead of easier. As that's easily configurable it's not a big deal.

@dgud
Copy link
Contributor Author

dgud commented Oct 21, 2025

@JimMoen what do you use to get the bracket high-lightning, highlight-parentheses?

@dgud dgud merged commit a778abd into erlang:main Oct 21, 2025
@JimMoen
Copy link
Contributor

JimMoen commented Oct 21, 2025

@dgud
I use rainbow-delimiters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants