diff --git a/nvim/after/plugin/tree.lua b/nvim/after/plugin/tree.lua new file mode 100644 index 0000000..1ae7265 --- /dev/null +++ b/nvim/after/plugin/tree.lua @@ -0,0 +1,19 @@ +require("nvim-tree").setup({ + git = { enable = false }, + renderer = { + icons = { + show = { + folder_arrow = false + }, + glyphs = { + default = "⚬", + folder = { + default = "▸", + open = "▾", + empty = "▹", + empty_open = "▿", + } + }, + } + } +}) diff --git a/nvim/init.lua b/nvim/init.lua index 71897d6..bf01b16 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -7,6 +7,11 @@ vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal vim.g.have_nerd_font = false +-- for some reason vim-tree needs this to happen very early on and no I do not +-- know why +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + require("plugins") require("prefs") require("keys") diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index af09dca..def9985 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -3,6 +3,7 @@ print("Loading plugins") vim.cmd [[packadd packer.nvim]] return require('packer').startup(function(use) + -- the plugin that manages the plugins use 'wbthomason/packer.nvim' -- this thing finds files or something @@ -14,24 +15,40 @@ return require('packer').startup(function(use) } } + -- parses code use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' } + -- lets you look at parse trees use { 'nvim-treesitter/playground' } + -- it's a colorscheme use { "rose-pine/neovim", as = "rose-pine" } -- hmmmm try this? -- https://github.com/ThePrimeagen/harpoon/tree/harpoon2 + -- visualizes vim's undo tree use { "mbbill/undotree" } + -- a git client use { "tpope/vim-fugitive" } + -- show git status per-line in a gutter column use { "lewis6991/gitsigns.nvim" } + + -- a file browser + vim.g.loaded_netrw = 1 + vim.g.loaded_netrwPlugin = 1 + use { "nvim-tree/nvim-tree.lua" } + + -- helps you configure lsp servers + use { + "neovim/nvim-lspconfig" + } end) diff --git a/nvim/lua/prefs.lua b/nvim/lua/prefs.lua index f321030..41ef3b9 100644 --- a/nvim/lua/prefs.lua +++ b/nvim/lua/prefs.lua @@ -81,4 +81,6 @@ vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) - +-- set the cwd of the buffer to the directory of the buffer's file +-- when entering a buffer. +vim.opt.autochdir = true