Remove toggleterm, project, replace nvim-tree with neotree

This commit is contained in:
Evie Litherland-Smith 2023-02-16 11:25:35 +00:00
parent 64744744bd
commit 0db7e54067
6 changed files with 35 additions and 97 deletions

View file

@ -0,0 +1,17 @@
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
require("neo-tree").setup({
close_if_last_window = true,
window = {
mapping = {
["Z"] = "expand_all_nodes",
},
},
filesystem = {
follow_current_file = true,
group_empty_dirs = true,
},
buffers = {
follow_current_file = true,
group_empty_dirs = true,
},
})

View file

@ -1,54 +0,0 @@
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.opt.termguicolors = true
require("nvim-tree").setup({
disable_netrw = true,
hijack_netrw = true,
hijack_cursor = true,
sync_root_with_cwd = true,
respect_buf_cwd = true,
update_focused_file = {
enable = true,
update_root = true,
},
diagnostics = {
enable = true,
show_on_dirs = true,
show_on_open_dirs = false,
},
git = {
enable = true,
show_on_dirs = true,
show_on_open_dirs = false,
},
modified = {
enable = true,
show_on_dirs = true,
show_on_open_dirs = false,
},
view = {
float = {
enable = true,
},
centralize_selection = true,
},
renderer = {
add_trailing = true,
group_empty = true,
full_name = true,
highlight_git = true,
highlight_modified = "all",
indent_markers = {
enable = true,
},
icons = {
show = {
git = false,
modified = false,
},
},
},
filters = {
dotfiles = true,
},
})

View file

@ -29,4 +29,3 @@ require("telescope").setup({
require("telescope").load_extension("fzf")
require("telescope").load_extension("notify")
require("telescope").load_extension("projects")

View file

@ -1,18 +0,0 @@
require("toggleterm").setup({
shade_terminals = false,
direction = "float",
close_on_exit = true,
float_opts = {
border = "double",
winblend = 0,
},
})
local Terminal = require("toggleterm.terminal").Terminal
local lazygit = Terminal:new({ cmd = "lazygit", hidden = true })
function _Lazygit_toggle()
lazygit:toggle()
end
vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _Lazygit_toggle()<CR>", { noremap = true, silent = true })

View file

@ -11,15 +11,14 @@ vim.keymap.set("n", "<leader>f;", "<cmd>Telescope builtin<cr>")
vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>")
vim.keymap.set("n", "<leader>fb", "<cmd>Telescope buffers<cr>")
vim.keymap.set("n", "<leader>fg", "<cmd>Telescope live_grep<cr>")
vim.keymap.set("n", "<leader>fp", "<cmd>Telescope projects<cr>")
vim.keymap.set("n", "<leader>fa", "<cmd>Telescope aerial<cr>")
vim.keymap.set("n", "<leader>fl", "<cmd>Telescope lsp_document_symbols<cr>")
vim.keymap.set("n", "<leader>fe", "<cmd>Telescope diagnostics<cr>")
vim.keymap.set("n", "<leader>fs", "<cmd>Telescope treesitter<cr>")
vim.keymap.set("n", "<leader>fz", "<cmd>Telescope current_buffer_fuzzy_find<cr>")
-- Nvim-tree
vim.keymap.set("n", "<leader>n", "<cmd>NvimTreeToggle<cr>")
-- Neotree
vim.keymap.set("n", "<leader>n", "<cmd>Neotree<cr>")
-- Trouble
vim.keymap.set("n", "<leader>xx", "<cmd>TroubleToggle<cr>")

View file

@ -5,6 +5,8 @@ vim.cmd([[
augroup end
]])
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
require("packer").startup({
function(use)
use("wbthomason/packer.nvim")
@ -70,33 +72,26 @@ require("packer").startup({
end,
})
use({
"kyazdani42/nvim-tree.lua",
config = function()
require("config.nvim-tree")
end,
})
use({
"ahmedkhalf/project.nvim",
config = function()
require("config.project")
end,
})
use({
"akinsho/toggleterm.nvim",
tag = "v2.*",
config = function()
require("config.toggleterm")
end,
})
use({
"nvim-telescope/telescope-fzf-native.nvim",
run = "make",
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
requires = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
},
config = function ()
require("config.neotree")
end
})
use({
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
requires = {
{ "nvim-lua/plenary.nvim" },
{
"nvim-telescope/telescope-fzf-native.nvim",
run = "make",
},
},
config = function()
require("config.telescope")