Skip to content

Commit

Permalink
fix: catch up Fennel 1.0.0
Browse files Browse the repository at this point in the history
- Highlight `&` in identifier as error
- Remove highlight for `doc`
  • Loading branch information
mnacamura committed Feb 6, 2024
1 parent 2d91a6b commit d78d8d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions syntax/fennel.vim
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ syn keyword fennelConstant nil
" Identifier, symbol, and keyword {{{2
"
" <identifier> -> <initial> <subsequent> *
" where <initial> -> [^#:0-9[:space:]\n"'(),;@\[\]\\`{}~]
" <subsequent> -> [^[:space:]\n"'(),;@\[\]\\`{}~]
syn match fennelIdentifier /[^#:0-9[:space:]\n"'(),;@\[\]\\`{}~][^[:space:]\n"'(),;@\[\]\\`{}~]*/
" where <initial> -> [^#&:0-9[:space:]\n"'(),;@\[\]\\`{}~]
" <subsequent> -> [^&[: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> -> : <subsequent> +
" Keyword such as ::: is accepted by Fennel!
syn match fennelKeyword /:[^[:space:]\n"'(),;@\[\]\\`{}~]\+/
Expand Down Expand Up @@ -151,7 +151,7 @@ syn cluster fennelExpressions contains=fennelSpecialForm,fennelAuxSyntax,fennelL
" Special forms {{{2
syn match fennelSpecialForm /\%^\@<!#\ze[^[:space:]\n);@\]\\}~]/
syn keyword 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 ~= λ
Expand Down

0 comments on commit d78d8d2

Please sign in to comment.