neovim: Add tex plugin, and disable auto-loading on chdir

it can cause a dead loop when you chdir and a buffer is from the
previous dir.
This commit is contained in:
Peter Cai 2022-08-14 18:39:47 -04:00
parent 0e1e5ce1de
commit 05ce66a920
2 changed files with 7 additions and 13 deletions

View File

@ -31,6 +31,10 @@ set autoindent
" Syntax highlighting
set syntax=on
" LaTeX
let g:vimtex_view_general_viewer = 'okular'
let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
let g:special_filetype_pattern = 'neo-tree\|toggleterm\|minimap'
" Show line numbers on non-toolbar buffers

View File

@ -148,19 +148,6 @@ return require('packer').startup({function(use)
require('neo-tree.sources.manager').show('filesystem')
end,
})
-- Autoload when directory changed
local last_cwd = vim.fn.getcwd()
vim.api.nvim_create_autocmd({ 'DirChanged' }, {
callback = function()
local cwd = vim.fn.getcwd()
if (cwd == last_cwd) then
return
end
last_cwd = cwd
require("persisted").load()
end
})
end,
}
@ -174,6 +161,9 @@ return require('packer').startup({function(use)
})
end,
}
-- LaTeX plugin
use "lervag/vimtex"
end,
config = {
display = {