diff --git a/init.lua b/init.lua index ef7af7c..f510866 100644 --- a/init.lua +++ b/init.lua @@ -84,6 +84,13 @@ I hope you enjoy your Neovim journey, P.S. You can delete this when you're done too. It's your config now! :) --]] +-- disable netrw at the very start of your init.lua +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +-- optionally enable 24-bit colour +vim.opt.termguicolors = true + -- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) @@ -189,6 +196,8 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +vim.keymap.set('n', 'tt', 'NvimTreeToggle', { desc = 'Toggle Nvim[T]ree' }) + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -245,13 +254,13 @@ require('lazy').setup({ { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', opts = { - signs = { + --[[ signs = { add = { text = '+' }, change = { text = '~' }, delete = { text = '_' }, topdelete = { text = '‾' }, changedelete = { text = '~' }, - }, + }, ]] }, }, @@ -413,6 +422,11 @@ require('lazy').setup({ vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) + vim.keymap.set('n', 'ff', builtin.find_files, { desc = 'Telescope find files' }) + vim.keymap.set('n', 'fg', builtin.live_grep, { desc = 'Telescope live grep' }) + vim.keymap.set('n', 'fb', builtin.buffers, { desc = 'Telescope buffers' }) + vim.keymap.set('n', 'fh', builtin.help_tags, { desc = 'Telescope help tags' }) + -- Slightly advanced example of overriding default behavior and theme vim.keymap.set('n', '/', function() -- You can pass additional configuration to Telescope to change the theme, layout, etc. diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 1ef7e59..62754c6 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -25,14 +25,14 @@ return { }, }, { - 'NeogitOrg/neogit', + 'nvim-tree/nvim-tree.lua', + version = '*', + lazy = false, dependencies = { - 'nvim-lua/plenary.nvim', -- required - 'sindrets/diffview.nvim', -- optional - Diff integration - - -- Only one of these is needed. - 'nvim-telescope/telescope.nvim', -- optional + 'nvim-tree/nvim-web-devicons', }, - config = true, + config = function() + require('nvim-tree').setup {} + end, }, }