Recognize ".rockspec" file extension as a Lua file

rockspec files are used by [Luarocks](https://luarocks.org/), the
most prominent package manager for Lua. Despite the different file
extension, these files are actually Lua files and should be syntax
highlighted as such.

For what it is worth, Neovim also does the same thing that I am doing in
this commit. They recognize both ".lua" and ".rockspec" as being Lua
files (and no other extensions, as far as I know).
This commit is contained in:
Hugo Musso Gualandi 2021-07-26 17:41:00 -03:00
parent cf52379422
commit 52f7999705

View File

@ -4,7 +4,7 @@
# Detection # Detection
# ‾‾‾‾‾‾‾‾‾ # ‾‾‾‾‾‾‾‾‾
hook global BufCreate .*[.](lua) %{ hook global BufCreate .*[.](lua|rockspec) %{
set-option buffer filetype lua set-option buffer filetype lua
} }