From a05478ff50d91253ae29d074ca7d4edd3d20ff8d Mon Sep 17 00:00:00 2001 From: Pierrick Gourlain Date: Tue, 22 Sep 2026 20:06:40 +0200 Subject: [PATCH 1/2] Bump grammar submodule to erlang-ls/grammar 8e92d1c Picks up the 6 upstream commits since b6a7360 (markdown doc attributes, docstring tweaks) and puts the submodule on the base the fun-expression fix was developed against. Co-Authored-By: Claude Opus 5 --- grammar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammar b/grammar index b6a7360..8e92d1c 160000 --- a/grammar +++ b/grammar @@ -1 +1 @@ -Subproject commit b6a73607fda86cc0ecb4273c8ef862a647e7a8cc +Subproject commit 8e92d1c3bfe1d84b80c200edb65f4f504f3ba7d5 From 56d4f64545095a2fb8f113689df8868b5f355c88 Mon Sep 17 00:00:00 2001 From: Pierrick Gourlain Date: Tue, 22 Sep 2026 21:27:09 +0200 Subject: [PATCH 2/2] Fix #316, #317 --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cc195e..ccb9b0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Change log -## Unreleased +## ## Version 1.2.3 (September 22, 2026) + +* [317](https://github.com/pgourlain/vscode_erlang/issues/317), [316](https://github.com/pgourlain/vscode_erlang/issues/316) : Syntax highlighting of `fun` expressions + - `fun () -> ... end` and `fun() -> ... end` (a fun with no parameter) highlighted `fun` as a function name instead of a keyword: the rule matching the `fun()` *type* of a `-spec`/`-type` also matched the zero-arity fun *expression*. It now requires that the `)` is not followed by `->`, so the `fun()` type introduced for [297](https://github.com/pgourlain/vscode_erlang/issues/297) keeps working + - A named fun (`fun Loop() -> ... end`, OTP 17+) had no rule at all and fell into the one meant for `fun Module:Name/Arity`, which scans forward to the next `/` - so every construct after it, `-spec`s included, lost its highlighting for the rest of the file. Named funs are now recognized, on one line or with the clause heads on their own lines, and the name is highlighted as a function name + - Fixed in the `grammar` submodule ([erlang-ls/grammar](https://github.com/erlang-ls/grammar)), which is also updated to its current upstream revision * [351](https://github.com/pgourlain/vscode_erlang/issues/351) : `erl`/`escript`/`erlc` no longer always spawn through a shell - A sandboxed or minimal environment (e.g. Kiro) can deny or lack a shell entirely while still allowing the binary itself to run; spawning everything through `/bin/sh -c ...` there failed with `spawn /bin/sh ENOENT` regardless of whether `erl` or the working directory were actually fine