auto open nvim-tree

This commit is contained in:
Christoph J. Scherr 2023-09-22 14:10:16 +02:00
parent ed5563b210
commit 376288fe21
1 changed files with 9 additions and 1 deletions

View File

@ -14,6 +14,14 @@ vim.api.nvim_create_autocmd({ 'FocusGained', 'TermClose', 'TermLeave' }, {
command = 'checktime',
})
-- Open Neotree in new tabs
vim.api.nvim_create_autocmd({'TabNewEntered' }, {
group = augroup('automatic_neotree'),
callback = function()
vim.cmd('Neotree')
end,
})
-- Go to last loc when opening a buffer, see ':h last-position-jump'
vim.api.nvim_create_autocmd('BufReadPost', {
group = augroup('last_loc'),
@ -79,7 +87,7 @@ vim.api.nvim_create_autocmd('BufWritePre', {
-- Disable conceallevel for specific file-types.
vim.api.nvim_create_autocmd('FileType', {
group = augroup('fix_conceallevel'),
pattern = { 'markdown' },
pattern = { 'latex', 'tex' },
callback = function()
vim.opt_local.conceallevel = 0
end,