vimtex: get editor based on OS
This commit is contained in:
		
							parent
							
								
									e6696c8ef0
								
							
						
					
					
						commit
						b2ea6eb142
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue