aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-03-19 11:51:00 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-03-19 14:58:06 +0100
commit42f04699d6df2d5b144533737a8f2f7e0814ad85 (patch)
tree3d69b94c221e3b91749b7f09b7f4da89839206ca /lua/plugins
parent8919fd1cbeef89aa3a5fce9c00aa708335e1de85 (diff)
downloadvis-42f04699d6df2d5b144533737a8f2f7e0814ad85.tar.gz
vis-42f04699d6df2d5b144533737a8f2f7e0814ad85.tar.xz
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.
Diffstat (limited to 'lua/plugins')
-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 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)