summaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authoradam <56338480+adastx@users.noreply.github.com>2022-10-09 21:48:44 +0200
committeradam <56338480+adastx@users.noreply.github.com>2022-10-09 21:49:14 +0200
commit1e5b6df23f9610786ffc0c04ac9bfd1c0b778352 (patch)
tree02de7f335941a20d3581a770a7183a30926ff261 /.config/nvim
parent66c6c22387b76e0e547302d402e1a37924cc1ba7 (diff)
nvim: cleaner git support for dotfiles
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/lua/mappings.lua2
-rw-r--r--.config/nvim/lua/plugins.lua8
-rw-r--r--.config/nvim/lua/setup/gitsigns.lua8
3 files changed, 16 insertions, 2 deletions
diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua
index 69e21a6..2d1222c 100644
--- a/.config/nvim/lua/mappings.lua
+++ b/.config/nvim/lua/mappings.lua
@@ -48,7 +48,7 @@ map('n', '<leader>xN', '<cmd>lua vim.diagnostic.goto_prev()<cr>', opts)
map('n', '<leader>xx', '<cmd>Telescope lsp_code_actions<cr>', opts)
map('n', '<leader>xX', '<cmd>Telescope lsp_range_code_actions<cr>', opts)
-map('n', '<leader>co', ':copen<CR>', opts)
+map('n', '<leader>co', ':cwindow<CR>', opts)
map('n', ']q', ':cnext<CR>', opts)
map('n', '[q', ':cprevious<CR>', opts)
map('n', '[Q', ':cfirst<CR>', opts)
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
index 2e6b3ff..cf27f1f 100644
--- a/.config/nvim/lua/plugins.lua
+++ b/.config/nvim/lua/plugins.lua
@@ -65,7 +65,7 @@ return require('packer').startup(function(use)
event = { "BufRead", "BufNewFile" },
wants = "plenary.nvim",
config = function()
- require('gitsigns').setup()
+ require 'setup.gitsigns'
end,
}
@@ -136,6 +136,12 @@ return require('packer').startup(function(use)
}
use {
+ "tpope/vim-fugitive",
+ config = "vim.cmd [[call FugitiveDetect('~/.cfg')]]",
+ cmd = { 'G', 'Ggrep' },
+ }
+
+ use {
"b3nj5m1n/kommentary",
event = { "BufRead", "BufNewFile" },
config = function()
diff --git a/.config/nvim/lua/setup/gitsigns.lua b/.config/nvim/lua/setup/gitsigns.lua
new file mode 100644
index 0000000..7894125
--- /dev/null
+++ b/.config/nvim/lua/setup/gitsigns.lua
@@ -0,0 +1,8 @@
+require('gitsigns').setup {
+ worktrees = {
+ {
+ toplevel = vim.env.HOME,
+ gitdir = vim.env.HOME .. '/.cfg'
+ }
+ }
+}