aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins/filetype.lua
diff options
context:
space:
mode:
authorRandy Palamar <randy@rnpnr.xyz>2024-05-06 09:26:51 -0600
committerRandy Palamar <randy@rnpnr.xyz>2024-05-06 09:26:51 -0600
commitb6ae2fb782ac2c47dda3b786c3e6399d2972efc6 (patch)
tree2365305bfd832a3d04bb8511d6a0ff1cc1fd6c99 /lua/plugins/filetype.lua
parenta9a4f5cabb766e3dadd504df4fd9583192c22315 (diff)
downloadvis-b6ae2fb782ac2c47dda3b786c3e6399d2972efc6.tar.gz
vis-b6ae2fb782ac2c47dda3b786c3e6399d2972efc6.tar.xz
lua: filetype: properly search for lexer path
fixes #1190: Missing mail.lua lexer
Diffstat (limited to 'lua/plugins/filetype.lua')
-rw-r--r--lua/plugins/filetype.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua
index 391621d..553e79d 100644
--- a/lua/plugins/filetype.lua
+++ b/lua/plugins/filetype.lua
@@ -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