Skip to content

Commit

Permalink
highlight: add support for lua (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
lacamera authored Apr 13, 2023
1 parent 1a1eb58 commit d0e1f3a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions highlight/langs.v
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fn init_langs() []Lang {
langs_ << init_c()
langs_ << init_v()
langs_ << init_js()
langs_ << init_lua()
langs_ << init_go()
langs_ << init_cpp()
langs_ << init_d()
Expand Down
36 changes: 36 additions & 0 deletions highlight/lua.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module highlight

fn init_lua() Lang {
return Lang{
name: 'Lua'
lang_extensions: ['lua']
line_comments: '--'
mline_comments: ['--[[', ']]']
string_start: ['"', "'"]
color: '#00007d'
keywords: [
'and',
'break',
'do',
'else',
'elseif',
'end',
'false',
'for',
'function',
'goto',
'if',
'in',
'local',
'nil',
'not',
'or',
'repeat',
'return',
'then',
'true',
'until',
'while',
]
}
}

0 comments on commit d0e1f3a

Please sign in to comment.