Skip to content
This repository was archived by the owner on Dec 27, 2025. It is now read-only.

Commit 995afbb

Browse files
committed
feat: support for Lua 5.5
1 parent 42980a3 commit 995afbb

4 files changed

Lines changed: 18 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ to [Semantic Versioning][2].
1212

1313
### Added
1414

15+
- Support for Lua 5.5
1516
- Nix flake overlay containing `m15aVimPlugins.vim-fennel-syntax`.
1617

1718
## [1.2.0] - 2025-11-16

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ global (`g:*`) or buffer-local (`b:*`) variables.
122122

123123
#### `fennel_lua_version`
124124

125-
Specifies the Lua version (`5.1`, `5.2`, `5.3`, or `5.4`) for
125+
Specifies the Lua version (`5.1`, `5.2`, `5.3`, `5.4`, or `5.5`) for
126126
highlighting corresponding literals and keywords. If not set manually,
127127
it is inferred automatically by invoking `lua -v`.
128128

_tools/build-lua-keywords.fnl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@
115115
(set mt.versions {:5.1 true
116116
:5.2 true
117117
:5.3 true
118-
:5.4 true})
118+
:5.4 true
119+
:5.5 true})
119120
(fn mt.version? [self x]
120121
(let [x (tostring x)]
121122
(or (. self.versions x) false)))

syntax/fennel-lua.vim

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
" Vim syntax file
22
" Language: Fennel
3-
" Last Change: 2024-02-08
3+
" Last Change: 2025-12-24
44
" Maintainer: NACAMURA Mitsuhiro <m15@m15a.dev>
55
" URL: https://github.com/m15a/vim-fennel-syntax
66
" License: MIT
7-
" NOTE: Automatically generated by tools/build-lua-keywords.fnl. DO NOT EDIT!
7+
" NOTE: Automatically generated by ./_tools/build-lua-keywords.fnl. DO NOT EDIT!
88

99
if !exists('b:did_fennel_syntax')
1010
finish
@@ -31,21 +31,26 @@ syn keyword fennelLuaKeyword string.char string.dump string.find string.format s
3131
syn keyword fennelLuaKeyword string.gsub string.len string.lower string.match string.rep
3232
syn keyword fennelLuaKeyword string.reverse string.sub string.upper table.concat table.insert
3333
syn keyword fennelLuaKeyword table.remove table.sort tonumber tostring type xpcall
34-
if match(s:lua_version, '^5\.[234]$') > -1
34+
if match(s:lua_version, '^5\.[2345]$') > -1
3535
syn keyword fennelLuaKeyword debug.getuservalue debug.setuservalue debug.upvalueid
3636
syn keyword fennelLuaKeyword debug.upvaluejoin package.config package.searchers
3737
syn keyword fennelLuaKeyword package.searchpath rawlen table.pack table.unpack
3838
endif
39-
if match(s:lua_version, '^5\.[12]$') > -1
40-
syn keyword fennelLuaKeyword math.atan2 math.cosh math.frexp math.ldexp math.pow math.sinh
41-
syn keyword fennelLuaKeyword math.tanh
39+
if match(s:lua_version, '^5\.[125]$') > -1
40+
syn keyword fennelLuaKeyword math.frexp math.ldexp
4241
endif
43-
if match(s:lua_version, '^5\.[34]$') > -1
42+
if match(s:lua_version, '^5\.[345]$') > -1
4443
syn keyword fennelLuaKeyword coroutine.isyieldable math.maxinteger math.mininteger math.tointeger
4544
syn keyword fennelLuaKeyword math.type math.ult string.pack string.packsize string.unpack
4645
syn keyword fennelLuaKeyword table.move utf8.char utf8.charpattern utf8.codepoint utf8.codes
4746
syn keyword fennelLuaKeyword utf8.len utf8.offset
4847
endif
48+
if match(s:lua_version, '^5\.[12]$') > -1
49+
syn keyword fennelLuaKeyword math.atan2 math.cosh math.pow math.sinh math.tanh
50+
endif
51+
if match(s:lua_version, '^5\.[45]$') > -1
52+
syn keyword fennelLuaKeyword coroutine.close warn
53+
endif
4954
if match(s:lua_version, '^5\.1$') > -1
5055
syn keyword fennelLuaKeyword debug.getfenv debug.setfenv getfenv loadstring math.log10 module
5156
syn keyword fennelLuaKeyword package.loaders package.seeall setfenv table.maxn unpack
@@ -55,6 +60,6 @@ if match(s:lua_version, '^5\.2$') > -1
5560
syn keyword fennelLuaKeyword bit32.extract bit32.lrotate bit32.lshift bit32.replace bit32.rrotate
5661
syn keyword fennelLuaKeyword bit32.rshift
5762
endif
58-
if match(s:lua_version, '^5\.4$') > -1
59-
syn keyword fennelLuaKeyword coroutine.close warn
63+
if match(s:lua_version, '^5\.5$') > -1
64+
syn keyword fennelLuaKeyword table.create
6065
endif

0 commit comments

Comments
 (0)