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:
parent
0e1e5ce1de
commit
05ce66a920
|
@ -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
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue