diff --git a/nvim/cheatsheet.txt b/nvim/cheatsheet.txt index 3a16fab..1ecdfdf 100644 --- a/nvim/cheatsheet.txt +++ b/nvim/cheatsheet.txt @@ -1 +1,6 @@ +## Telescope @custom: Search, Preview and Open file | ff + +## Formatter @custom: +Format current buffer | f +Format and write current buffer | F diff --git a/nvim/init.vim b/nvim/init.vim index 4a163f0..05eb79b 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -16,4 +16,6 @@ augroup FormatAutogroup autocmd BufWritePost * FormatWrite augroup END +so "keybinding.vim" + lua require('plugins') diff --git a/nvim/keybinding.vim b/nvim/keybinding.vim new file mode 100644 index 0000000..b7348b8 --- /dev/null +++ b/nvim/keybinding.vim @@ -0,0 +1,2 @@ +nnoremap f :Format +nnoremap F :FormatWrite diff --git a/nvim/lua/barbar-config.lua b/nvim/lua/barbar-config.lua new file mode 100644 index 0000000..11c04e1 --- /dev/null +++ b/nvim/lua/barbar-config.lua @@ -0,0 +1,16 @@ +local map = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +-- Move to previous/next +map('n', '', 'BufferPrevious', opts) +-- Goto buffer in position... +map('n', '', 'BufferGoto 1', opts) +map('n', '', 'BufferGoto 2', opts) +map('n', '', 'BufferGoto 3', opts) +map('n', '', 'BufferGoto 4', opts) +map('n', '', 'BufferGoto 5', opts) +map('n', '', 'BufferGoto 6', opts) +map('n', '', 'BufferGoto 7', opts) +map('n', '', 'BufferGoto 8', opts) +map('n', '', 'BufferGoto 9', opts) +map('n', '', 'BufferLast', opts) diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 7de08d6..a0ee9aa 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -28,7 +28,10 @@ return require("packer").startup(function(use) }, }) - use({ "romgrk/barbar.nvim", requires = "nvim-web-devicons" }) + use({ + "romgrk/barbar.nvim", + requires = { "nvim-web-devicons", "lewis6991/gitsigns.nvim" }, + }) use("nvim-treesitter/nvim-treesitter") @@ -87,14 +90,15 @@ return require("packer").startup(function(use) require("nvim-tree-config") require("nvim-cmp-config") require("autoclose-config") - require("image-config") + require("barbar-config") + --require("image-config") require("telescope-config") -- require('ale-config') require("formatter-config") require("lualine").setup() require("virt-column").setup() - if packer_bootstrap then + if packer_bootstrap then require("packer").sync() end end)