From c02043fee2bdb7b84dd7aaf0465d1075ff86a088 Mon Sep 17 00:00:00 2001 From: Andre Henriques Date: Thu, 6 Jul 2023 18:09:04 +0100 Subject: [PATCH] update to various, and added neogit --- after/plugin/keys.lua | 1 + lua/andr3/init.lua | 1 + lua/andr3/lsp.lua | 3 ++- lua/andr3/neogit.lua | 2 ++ lua/andr3/packer.lua | 2 ++ 5 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 lua/andr3/neogit.lua diff --git a/after/plugin/keys.lua b/after/plugin/keys.lua index 27eb90b..67ce60a 100644 --- a/after/plugin/keys.lua +++ b/after/plugin/keys.lua @@ -7,6 +7,7 @@ local opts = { noremap=true } vim.keymap.set('n', 'f', function () vim.cmd('Telescope find_files') end, { remap = true }) vim.keymap.set('n', '/', function () vim.cmd('Telescope live_grep') end, { remap = true }) +vim.keymap.set('n', 'b', function () vim.cmd('Telescope buffers') end, { remap = true }) vim.keymap.set('n', 'ge', 'G0', { remap = true }) vim.keymap.set('n', 'gh', '0', { remap = true }) diff --git a/lua/andr3/init.lua b/lua/andr3/init.lua index c5cac97..493d4cb 100644 --- a/lua/andr3/init.lua +++ b/lua/andr3/init.lua @@ -4,4 +4,5 @@ else require('andr3.set') require('andr3.packer') require('andr3.lsp') + require('andr3.neogit') end diff --git a/lua/andr3/lsp.lua b/lua/andr3/lsp.lua index ff26868..b79a617 100644 --- a/lua/andr3/lsp.lua +++ b/lua/andr3/lsp.lua @@ -117,12 +117,13 @@ saga.setup{ } keymap("n", "sf", "Lspsaga lsp_finder", { silent = true }) +keymap("n", "t", "terminal", { silent = true }) keymap({"n","v"}, "ca", function () saga.code_action() end, {}) keymap("n", "gr", "Lspsaga rename", { silent = true }) keymap("n", "gd", "Lspsaga peek_definition", { silent = true }) --keymap("n", "cd", "Lspsaga show_line_diagnostics", { silent = true }) keymap("n", "cd", "Lspsaga show_cursor_diagnostics", { silent = true }) -keymap('n', 'e', 'lua vim.diagnostic.open_float()', { silent = true }) +keymap('n', 'e', 'lua vim.diagnostic.open_float()', { silent = true }) keymap("n", "[e", "Lspsaga diagnostic_jump_prev", { silent = true }) keymap("n", "]e", "Lspsaga diagnostic_jump_next", { silent = true }) diff --git a/lua/andr3/neogit.lua b/lua/andr3/neogit.lua new file mode 100644 index 0000000..7403464 --- /dev/null +++ b/lua/andr3/neogit.lua @@ -0,0 +1,2 @@ +local neogit = require('neogit') +neogit.setup {} diff --git a/lua/andr3/packer.lua b/lua/andr3/packer.lua index 3c0e2bb..97c1a37 100644 --- a/lua/andr3/packer.lua +++ b/lua/andr3/packer.lua @@ -23,6 +23,8 @@ return require('packer').startup(function() use 'MunifTanjim/prettier.nvim' + use { 'NeogitOrg/neogit', requires = 'nvim-lua/plenary.nvim' } + use 'hrsh7th/cmp-nvim-lsp' use 'hrsh7th/cmp-buffer' use 'hrsh7th/cmp-path'