diff --git a/lua/custom/plugins/vimtex.lua b/lua/custom/plugins/vimtex.lua index 7d5d951a..7e8bb9dc 100644 --- a/lua/custom/plugins/vimtex.lua +++ b/lua/custom/plugins/vimtex.lua @@ -1,6 +1,18 @@ +local function get_editor(sys) + local editor + if sys == "Darwin" then + editor = "skim" + elseif sys == "Linux" then + editor = "zathura" + else -- windows? + editor = "zathura" + end + return editor +end + return { "lervag/vimtex", config = function() - vim.g.vimtex_view_method = "zathura" + vim.g.vimtex_view_method = get_editor(vim.loop.os_uname().sysname) end }