summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins')
-rw-r--r--.config/nvim/lua/plugins/git.lua65
-rw-r--r--.config/nvim/lua/plugins/treesitter.lua1
2 files changed, 1 insertions, 65 deletions
diff --git a/.config/nvim/lua/plugins/git.lua b/.config/nvim/lua/plugins/git.lua
index d94893d..a435df7 100644
--- a/.config/nvim/lua/plugins/git.lua
+++ b/.config/nvim/lua/plugins/git.lua
@@ -24,69 +24,4 @@ return {
},
},
},
- {
- "lewis6991/gitsigns.nvim",
- dependencies = { "folke/which-key.nvim" },
- event = { "BufReadPre", "BufNewFile" },
- opts = {
- on_attach = function(bufnr)
- local gs = require("gitsigns")
- local wk = require("which-key")
-
- wk.register({
- ["]c"] = {
- function()
- if vim.wo.diff then return "]c" end
- vim.schedule(gs.next_hunk)
- return "<Ignore>"
- end,
- "Next hunk",
- },
- ["[c"] = {
- function()
- if vim.wo.diff then return "[c" end
- vim.schedule(gs.prev_hunk)
- return "<Ignore>"
- end,
- "Previous hunk",
- },
- }, {expr=true})
-
- wk.register({
- ["<leader>h"] = {
- name = "+Gitsigns",
- s = { gs.stage_hunk, "Stage hunk" },
- r = { gs.reset_hunk, "Reset hunk" },
- S = { gs.stage_buffer, "Stage buffer" },
- u = { gs.undo_stage_hunk, "Undo stage hunk" },
- R = { gs.reset_buffer, "Reset buffer" },
- p = { gs.preview_hunk, "Preview hunk" },
- b = { function() gs.blame_line({full=true}) end, "Blame line" },
- B = { gs.toggle_current_line_blame, "Toggle current line blame" },
- d = { gs.diffthis, "Diff current buffer" },
- D = { function() gs.diffthis("~") end, "TODO" },
- x = { gs.toggle_deleted, "Toggle deleted" },
- },
- })
-
- wk.register({
- ["<leader>h"] = {
- name = "+Gitsigns",
- s = {
- function() gs.stage_hunk({vim.fn.line("."), vim.fn.line("v")}) end,
- "Stage selected lines",
- },
- r = {
- function() gs.reset_hunk({vim.fn.line("."), vim.fn.line("v")}) end,
- "Reset selected lines",
- },
- },
- }, {mode="v"})
-
- wk.register({
- ["ih"] = { ":<C-U>Gitsigns select_hunk<CR>", "Select hunk" },
- }, {mode={ "o", "x" }})
- end,
- },
- },
}
diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua
index e07c895..17a498b 100644
--- a/.config/nvim/lua/plugins/treesitter.lua
+++ b/.config/nvim/lua/plugins/treesitter.lua
@@ -18,6 +18,7 @@ return {
"lua",
"markdown",
"python",
+ "qmljs",
"regex",
"rust",
"scss",