From b3a2dbac7944a76e15dbc1f630bb1f0aef4fbd87 Mon Sep 17 00:00:00 2001 From: Achhunna M Date: Tue, 24 Jan 2023 05:51:49 +0545 Subject: [PATCH] Update with nvim-tree and scrollbar --- init.lua | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/init.lua b/init.lua index f975c6cd..53e455f4 100644 --- a/init.lua +++ b/init.lua @@ -60,6 +60,18 @@ require('packer').startup(function(use) -- Fuzzy Finder Algorithm which requires local dependencies to be built. Only load if `make` is available use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', cond = vim.fn.executable 'make' == 1 } + -- Scrollbar + use("petertriho/nvim-scrollbar") + + -- nvim-tree file browser to replace Netrw + use { + 'nvim-tree/nvim-tree.lua', + requires = { + 'nvim-tree/nvim-web-devicons', -- optional, for file icons + }, + tag = 'nightly' + } + -- Add custom plugins to packer from ~/.config/nvim/lua/custom/plugins.lua local has_plugins, plugins = pcall(require, 'custom.plugins') if has_plugins then @@ -430,5 +442,36 @@ cmp.setup { }, } +-- Enable scrollbar +require("scrollbar").setup() + +-- disable netrw at the very start of your init.lua (strongly advised) +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +-- set termguicolors to enable highlight groups +vim.opt.termguicolors = true + +-- empty setup using defaults +require("nvim-tree").setup() + +-- OR setup with some options +require("nvim-tree").setup({ + sort_by = "case_sensitive", + view = { + adaptive_size = true, + mappings = { + list = { + { key = "u", action = "dir_up" }, + }, + }, + }, + renderer = { + group_empty = true, + }, + filters = { + dotfiles = true, + }, +}) -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et