mirror of
				https://github.com/tiyn/dotfiles.git
				synced 2025-11-04 14:31:16 +01:00 
			
		
		
		
	nvim: autostart knap only for tex, increase preview delay
This commit is contained in:
		@@ -2,7 +2,6 @@ vim.api.nvim_create_autocmd({ 'BufEnter' },
 | 
				
			|||||||
  {
 | 
					  {
 | 
				
			||||||
    callback = function()
 | 
					    callback = function()
 | 
				
			||||||
      vim.o.foldenable = false
 | 
					      vim.o.foldenable = false
 | 
				
			||||||
      require("knap").toggle_autopreviewing()
 | 
					 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
vim.api.nvim_create_autocmd({ 'BufEnter' },
 | 
					vim.api.nvim_create_autocmd({ 'VimEnter' },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    callback = function()
 | 
					    callback = function()
 | 
				
			||||||
      require("knap").toggle_autopreviewing()
 | 
					      require("knap").toggle_autopreviewing()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,7 @@ return {
 | 
				
			|||||||
    ft = { 'tex' },
 | 
					    ft = { 'tex' },
 | 
				
			||||||
    config = function()
 | 
					    config = function()
 | 
				
			||||||
      vim.g.knap_settings = {
 | 
					      vim.g.knap_settings = {
 | 
				
			||||||
        delay = 1000,
 | 
					        delay = 10000,
 | 
				
			||||||
        -- tex
 | 
					        -- tex
 | 
				
			||||||
        texoutputext = "pdf",
 | 
					        texoutputext = "pdf",
 | 
				
			||||||
        textopdf = "pdflatex -synctex=1 -halt-on-error -interaction=batchmode %docroot%",
 | 
					        textopdf = "pdflatex -synctex=1 -halt-on-error -interaction=batchmode %docroot%",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user