Skip to content

Commit

Permalink
lua: filetype: properly search for lexer path
Browse files Browse the repository at this point in the history
fixes #1190: Missing mail.lua lexer
  • Loading branch information
rnpnr committed May 6, 2024
1 parent a9a4f5c commit b6ae2fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/plugins/filetype.lua
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,9 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win)
vis:command(cmd)
end
if not vis.lexers.property then return end
local path = vis.lexers.property['scintillua.lexers']
local path = vis.lexers.property['scintillua.lexers']:gsub(';', '/?.lua;')
local lexname = filetype.alt_name or syntax
local lexpath = package.searchpath('lexers/'..lexname, path)
local lexpath = package.searchpath(lexname, path)
if lexpath ~= nil then
win:set_syntax(lexname)
else
Expand Down

0 comments on commit b6ae2fb

Please sign in to comment.