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
|
" Syntax highlighting
|
||||||
set syntax=on
|
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'
|
let g:special_filetype_pattern = 'neo-tree\|toggleterm\|minimap'
|
||||||
|
|
||||||
" Show line numbers on non-toolbar buffers
|
" Show line numbers on non-toolbar buffers
|
||||||
|
|
|
@ -148,19 +148,6 @@ return require('packer').startup({function(use)
|
||||||
require('neo-tree.sources.manager').show('filesystem')
|
require('neo-tree.sources.manager').show('filesystem')
|
||||||
end,
|
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,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,6 +161,9 @@ return require('packer').startup({function(use)
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- LaTeX plugin
|
||||||
|
use "lervag/vimtex"
|
||||||
end,
|
end,
|
||||||
config = {
|
config = {
|
||||||
display = {
|
display = {
|
||||||
|
|
Loading…
Reference in New Issue