diff --git a/CHANGELOG.md b/CHANGELOG.md index f2011e6..14d2d84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ ### Fixed +- `&` in identifier is now highlighted as error (Fennel 1.0.0). +- Remove highlight for `doc` since it has been replaced with `,doc` (Fennel 1.0.0) - Remove highlight for `pick-args` since it has been deprecated (Fennel 0.10.0) ## [0.2][v0.2] (2021-06-20) diff --git a/syntax/fennel.vim b/syntax/fennel.vim index 33d0754..356d532 100644 --- a/syntax/fennel.vim +++ b/syntax/fennel.vim @@ -46,12 +46,12 @@ syn keyword fennelConstant nil " Identifier, symbol, and keyword {{{2 " " -> * -" where -> [^#:0-9[:space:]\n"'(),;@\[\]\\`{}~] -" -> [^[:space:]\n"'(),;@\[\]\\`{}~] -syn match fennelIdentifier /[^#:0-9[:space:]\n"'(),;@\[\]\\`{}~][^[:space:]\n"'(),;@\[\]\\`{}~]*/ +" where -> [^#&:0-9[:space:]\n"'(),;@\[\]\\`{}~] +" -> [^&[:space:]\n"'(),;@\[\]\\`{}~] +syn match fennelIdentifier /[^#&:0-9[:space:]\n"'(),;@\[\]\\`{}~][^&[:space:]\n"'(),;@\[\]\\`{}~]*/ syn match fennelLuaTableItemAccessor /\./ contained containedin=fennelIdentifier syn match fennelLuaMethodCall /:/ contained containedin=fennelIdentifier -syn match fennelSymbol /[^#:0-9[:space:]\n"'(),;@\[\]\\`{}~][^[:space:]\n"'(),;@\[\]\\`{}~]*/ contained +syn match fennelSymbol /[^#&:0-9[:space:]\n"'(),;@\[\]\\`{}~][^&[:space:]\n"'(),;@\[\]\\`{}~]*/ contained " -> : + " Keyword such as ::: is accepted by Fennel! syn match fennelKeyword /:[^[:space:]\n"'(),;@\[\]\\`{}~]\+/ @@ -151,7 +151,7 @@ syn cluster fennelExpressions contains=fennelSpecialForm,fennelAuxSyntax,fennelL " Special forms {{{2 syn match fennelSpecialForm /\%^\@ ->> -?> -?>> . .. / // : < <= = > >= ^ -syn keyword fennelSpecialForm and comment do doc doto each eval-compiler fn for global hashfn if +syn keyword fennelSpecialForm and comment do doto each eval-compiler fn for global hashfn if syn keyword fennelSpecialForm include lambda length let local lua macro macros match not not= or syn keyword fennelSpecialForm partial quote require-macros set set-forcibly! tset values var when syn keyword fennelSpecialForm while ~= λ