From 42f04699d6df2d5b144533737a8f2f7e0814ad85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 19 Mar 2017 11:51:00 +0100 Subject: Move :set syntax option implementation to lua It is no longer possible to change the used syntax by assigning to the `win.syntax = name` field, instead the function win:set_syntax(name)` should be called. The distinction between filetype and syntax lexer to use should probably be clarified/cleaned up at some point. --- lua/plugins/filetype.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/plugins') diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua index 3bfda55..4d522e6 100644 --- a/lua/plugins/filetype.lua +++ b/lua/plugins/filetype.lua @@ -405,7 +405,7 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win) for _, cmd in pairs(filetype.cmd or {}) do vis:command(cmd) end - win.syntax = syntax + win:set_syntax(syntax) end local name = win.file.name @@ -470,6 +470,6 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win) end end - win.syntax = nil + win:set_syntax(nil) end) -- cgit v1.2.3