Skip to content

Commit eff30a5

Browse files
committed
Added nvim-tree
1 parent b7d5cc8 commit eff30a5

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

init.lua

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@ vim.g.mapleader = ' '
9191
vim.g.maplocalleader = ' '
9292

9393
-- Set to true if you have a Nerd Font installed and selected in the terminal
94-
vim.g.have_nerd_font = false
94+
vim.g.have_nerd_font = true
95+
--
96+
-- Setups called for by nvim-tree
97+
vim.g.loaded_netrw = 1
98+
vim.g.loaded_netrwPlugin = 1
99+
vim.opt.termguicolors = true
95100

96101
-- [[ Setting options ]]
97102
-- See `:help vim.opt`
@@ -102,7 +107,7 @@ vim.g.have_nerd_font = false
102107
vim.opt.number = true
103108
-- You can also add relative line numbers, to help with jumping.
104109
-- Experiment for yourself to see if you like it!
105-
-- vim.opt.relativenumber = true
110+
vim.opt.relativenumber = true
106111

107112
-- Enable mouse mode, can be useful for resizing splits for example!
108113
vim.opt.mouse = 'a'
@@ -167,6 +172,9 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagn
167172
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
168173
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
169174

175+
-- NvimTree Keymap
176+
-- vim.keymap.set('n', '<C-n>',
177+
170178
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
171179
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
172180
-- is not what someone will guess without a bit more experience.
@@ -227,7 +235,11 @@ vim.opt.rtp:prepend(lazypath)
227235
require('lazy').setup({
228236
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
229237
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
230-
238+
{
239+
'nvim-tree/nvim-tree.lua',
240+
opts = {},
241+
},
242+
'williamboman/mason.nvim',
231243
-- NOTE: Plugins can also be added by using a table,
232244
-- with the first argument being the link and the following
233245
-- keys can be used to configure plugin behavior/loading/etc.
@@ -238,6 +250,7 @@ require('lazy').setup({
238250
-- require('Comment').setup({})
239251

240252
-- "gc" to comment visual regions/lines
253+
241254
{ 'numToStr/Comment.nvim', opts = {} },
242255

243256
-- Here is a more advanced example where we pass configuration

0 commit comments

Comments
 (0)