Clean up some unused plugins, re-enable nvim-tree auto open with new autocmd

This commit is contained in:
Evie Litherland-Smith 2023-02-10 09:27:22 +00:00
parent 9065722dc3
commit 48b37e0ac6
6 changed files with 21 additions and 48 deletions

View file

@ -1,17 +0,0 @@
local aerial = require('aerial')
aerial.setup {
-- backends = { "lsp", "treesitter", "markdown", "man" },
layout = {
default_direction = "float",
},
manage_folds = true,
close_on_select = true,
show_guides = true,
close_automatic_events = {
"unfocus", "switch_buffer", "unsupported"
},
float = {
relative = "win",
},
filter_kind = false,
}

View file

@ -1,10 +0,0 @@
require('lualine').setup {
options = {
icons_enabled = true,
},
sections = {
-- lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_x = { 'aerial', 'filetype' }
},
extensions = { 'aerial', 'fugitive', 'fzf', 'nvim-tree', 'toggleterm' }
}

View file

@ -28,9 +28,6 @@ require('nvim-tree').setup {
},
view = {
centralize_selection = true,
float = {
enable = true,
},
},
renderer = {
add_trailing = true,
@ -52,3 +49,21 @@ require('nvim-tree').setup {
dotfiles = true,
},
}
local function open_nvim_tree(data)
-- buffer is a real file on the disk
local real_file = vim.fn.filereadable(data.file) == 1
-- buffer is a [No Name]
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
if not real_file and not no_name then
return
end
-- open the tree, find the file but don't focus it
require("nvim-tree.api").tree.toggle({ focus = false, find_file = true, })
end
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })

View file

@ -28,6 +28,5 @@ require('telescope').setup {
}
require('telescope').load_extension('fzf')
require('telescope').load_extension('aerial')
require('telescope').load_extension('notify')
require('telescope').load_extension('projects')

View file

@ -22,9 +22,6 @@ require('packer').startup {
require 'config.tabby'
end
}
use {
"navarasu/onedark.nvim",
}
use {
'rcarriga/nvim-notify',
config = function()
@ -76,19 +73,8 @@ require('packer').startup {
require("refactoring").setup()
end
}
use {
'j-hui/fidget.nvim',
}
use {
'stevearc/aerial.nvim',
config = function()
require 'config.aerial'
end
}
use {
'tpope/vim-fugitive',
opt = true,
cmd = { 'G', 'Git' }
}
use {
'https://github.com/lewis6991/gitsigns.nvim.git',
@ -102,9 +88,6 @@ require('packer').startup {
require 'config.feline'
end
}
use {
'nvim-lualine/lualine.nvim',
}
use {
'kyazdani42/nvim-tree.lua',
config = function()

View file

@ -2,3 +2,6 @@
LOCAL_BIN="$HOME/.local/bin"
echo $PATH | grep -i "$LOCAL_BIN" - > /dev/null || export PATH=$PATH:$LOCAL_BIN
DOTFILES_BIN="$(dirname $(dirname $(readlink -f $0)))/bin"
echo $PATH | grep -i "$DOTFILES_BIN" - > /dev/null || export PATH=$PATH:$DOTFILES_BIN