vimtex: get editor based on OS

This commit is contained in:
vladstojna 2023-08-30 21:10:16 +03:00 committed by vladstojna
parent e6696c8ef0
commit b2ea6eb142
1 changed files with 13 additions and 1 deletions

View File

@ -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 { return {
"lervag/vimtex", "lervag/vimtex",
config = function() config = function()
vim.g.vimtex_view_method = "zathura" vim.g.vimtex_view_method = get_editor(vim.loop.os_uname().sysname)
end end
} }