auto open nvim-tree

This commit is contained in:
Christoph J. Scherr 2023-09-22 14:10:16 +02:00 committed by PlexSheep
parent 38656d0cd3
commit c0a6972398
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', 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' -- Go to last loc when opening a buffer, see ':h last-position-jump'
vim.api.nvim_create_autocmd('BufReadPost', { vim.api.nvim_create_autocmd('BufReadPost', {
group = augroup('last_loc'), group = augroup('last_loc'),
@ -79,7 +87,7 @@ vim.api.nvim_create_autocmd('BufWritePre', {
-- Disable conceallevel for specific file-types. -- Disable conceallevel for specific file-types.
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
group = augroup('fix_conceallevel'), group = augroup('fix_conceallevel'),
pattern = { 'markdown' }, pattern = { 'latex', 'tex' },
callback = function() callback = function()
vim.opt_local.conceallevel = 0 vim.opt_local.conceallevel = 0
end, end,