From 2bf1b603339589867d8ae0ffe3fede23dc4699cc Mon Sep 17 00:00:00 2001 From: 0xfa1z Date: Sat, 6 Jul 2024 21:04:29 +0200 Subject: [PATCH] netrw tweaks --- init.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 88658ef3..756769de 100644 --- a/init.lua +++ b/init.lua @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -126,7 +126,7 @@ vim.opt.ignorecase = true vim.opt.smartcase = true -- Keep signcolumn on by default -vim.opt.signcolumn = 'yes' +vim.opt.signcolumn = 'number' -- Decrease update time vim.opt.updatetime = 250 @@ -190,6 +190,13 @@ 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' }) +-- Custom key mapping to open netrw +vim.api.nvim_set_keymap('n', 'e', ':Explore', { noremap = true, silent = true }) + +-- Enable netrw settings +vim.g.netrw_banner = 0 +vim.g.netrw_liststyle = 3 + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -227,6 +234,7 @@ vim.opt.rtp:prepend(lazypath) require('lazy').setup({ -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically + 'github/copilot.vim', -- GitHub Copilot integration -- NOTE: Plugins can also be added by using a table, -- with the first argument being the link and the following @@ -784,7 +792,7 @@ require('lazy').setup({ -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'vim' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none'