From b6ae2fb782ac2c47dda3b786c3e6399d2972efc6 Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Mon, 6 May 2024 09:26:51 -0600 Subject: [PATCH] lua: filetype: properly search for lexer path fixes #1190: Missing mail.lua lexer --- lua/plugins/filetype.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua index 391621d99..553e79dd0 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