summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/nvim/init.lua1
-rw-r--r--.config/nvim/lua/justsaumit/bufferline-config.lua4
-rw-r--r--.config/nvim/lua/justsaumit/keymaps.lua2
-rw-r--r--.config/nvim/lua/justsaumit/nvim-tree-config.lua23
-rw-r--r--.config/nvim/lua/justsaumit/plugins.lua4
-rw-r--r--.config/nvim/plugin/packer_compiled.lua5
6 files changed, 38 insertions, 1 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index 83b3a38..fdd446d 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -5,6 +5,7 @@ require("justsaumit.colorscheme")
require("justsaumit.treesitter-config")
require("justsaumit.lualine-config")
require("justsaumit.bufferline-config")
+require("justsaumit.nvim-tree-config")
require("justsaumit.lastplace-config")
require("justsaumit.autopairs")
print ("while(!(succeed = try() ) );")
diff --git a/.config/nvim/lua/justsaumit/bufferline-config.lua b/.config/nvim/lua/justsaumit/bufferline-config.lua
index 8430154..43a8bcb 100644
--- a/.config/nvim/lua/justsaumit/bufferline-config.lua
+++ b/.config/nvim/lua/justsaumit/bufferline-config.lua
@@ -60,6 +60,10 @@ for i = 1, 9 do
end, opts)
end
+--Ctrl+W to close a buffer
+keymap("n", "W", ":bdelete!<CR>", opts)
+
+
--Tab or Ctrl+Tab for Forward Cycle //terminals don't see a difference between <Tab> and <C-Tab>
--Shift+Tab for Backward Cycle
keymap("n", "<Tab>", ":BufferLineCycleNext<CR>", opts)
diff --git a/.config/nvim/lua/justsaumit/keymaps.lua b/.config/nvim/lua/justsaumit/keymaps.lua
index 76bd4b9..8d9b31b 100644
--- a/.config/nvim/lua/justsaumit/keymaps.lua
+++ b/.config/nvim/lua/justsaumit/keymaps.lua
@@ -18,6 +18,8 @@ vim.g.maplocalleader = " "
-- Normal --
--Save file with Ctrl+S
keymap("n", "<C-s>", ":w<CR>", opts)
+--Toggle nvim-tree
+keymap("n", "<m-e>", ":NvimTreeToggle<CR>", opts)
-- Better window navigation for split
keymap("n", "<C-h>", "<C-w>h", opts)
diff --git a/.config/nvim/lua/justsaumit/nvim-tree-config.lua b/.config/nvim/lua/justsaumit/nvim-tree-config.lua
new file mode 100644
index 0000000..07a8af4
--- /dev/null
+++ b/.config/nvim/lua/justsaumit/nvim-tree-config.lua
@@ -0,0 +1,23 @@
+-- examples for your init.lua
+
+-- 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,
+ },
+})
diff --git a/.config/nvim/lua/justsaumit/plugins.lua b/.config/nvim/lua/justsaumit/plugins.lua
index 0a8b4fc..b95438b 100644
--- a/.config/nvim/lua/justsaumit/plugins.lua
+++ b/.config/nvim/lua/justsaumit/plugins.lua
@@ -55,9 +55,11 @@ return packer.startup(function(use)
--Web-devicons
use "kyazdani42/nvim-web-devicons"
--Lualine
- use {'nvim-lualine/lualine.nvim',requires = { 'kyazdani42/nvim-web-devicons', opt = true }}
+ use {'nvim-lualine/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true }}
--Bufferline
use {'akinsho/bufferline.nvim', tag = "v2.*", requires = 'kyazdani42/nvim-web-devicons'}
+--Nvim-tree File explorer for nvim
+ use {'kyazdani42/nvim-tree.lua', requires = { 'kyazdani42/nvim-web-devicons'}}
--HTML
use 'windwp/nvim-ts-autotag'
--cmp
diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua
index 6f54caa..adb17a6 100644
--- a/.config/nvim/plugin/packer_compiled.lua
+++ b/.config/nvim/plugin/packer_compiled.lua
@@ -89,6 +89,11 @@ _G.packer_plugins = {
path = "/home/saumit/.local/share/nvim/site/pack/packer/start/nvim-lastplace",
url = "https://github.com/ethanholz/nvim-lastplace"
},
+ ["nvim-tree.lua"] = {
+ loaded = true,
+ path = "/home/saumit/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
+ url = "https://github.com/kyazdani42/nvim-tree.lua"
+ },
["nvim-treesitter"] = {
loaded = true,
path = "/home/saumit/.local/share/nvim/site/pack/packer/start/nvim-treesitter",