Updating git stuff
This commit is contained in:
parent
b1954a147a
commit
bbe1cbdd2d
5 changed files with 119 additions and 48 deletions
98
lua/plugins/git.lua
Normal file
98
lua/plugins/git.lua
Normal file
|
@ -0,0 +1,98 @@
|
|||
return {
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {
|
||||
watch_gitdir = {
|
||||
interval = 100
|
||||
},
|
||||
signs = {
|
||||
add = { hl = "GitGutterAdd" },
|
||||
change = { hl = "GitGutterChange" },
|
||||
delete = { hl = "GitGutterDelete" },
|
||||
topdelete = { hl = "GitGutterDelete" },
|
||||
changedelete = { hl = "GitGutterChangeDelete" }
|
||||
},
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 0,
|
||||
ignore_whitespace = false,
|
||||
},
|
||||
-- on_attach = function()
|
||||
-- local gs = package.loaded.gitsigns
|
||||
-- set_nmap('<leader>tb', gs.toggle_current_line_blame)
|
||||
-- end
|
||||
}
|
||||
},
|
||||
{
|
||||
"Neogitorg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
opts = {
|
||||
integrations = {
|
||||
diffview = true
|
||||
},
|
||||
sections = {
|
||||
recent = false
|
||||
}
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>gs", function()
|
||||
require('neogit').open({ kind = "vsplit" })
|
||||
end }
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
"sindrets/diffview.nvim",
|
||||
opts = {
|
||||
diff_binaries = false,
|
||||
enhanced_diff_hl = true,
|
||||
git_cmd = { "git" },
|
||||
use_icons = true,
|
||||
icons = {
|
||||
folder_closed = "",
|
||||
folder_open = "",
|
||||
},
|
||||
signs = {
|
||||
fold_closed = "",
|
||||
fold_open = "",
|
||||
},
|
||||
view = {
|
||||
merge_tool = {
|
||||
layout = "diff3_mixed",
|
||||
disable_diagnostics = true,
|
||||
},
|
||||
},
|
||||
file_panel = {
|
||||
listing_style = "tree",
|
||||
tree_options = {
|
||||
flatten_dirs = true,
|
||||
folder_statuses = "only_folded",
|
||||
},
|
||||
win_config = {
|
||||
position = "left",
|
||||
width = 35,
|
||||
},
|
||||
},
|
||||
file_history_panel = {
|
||||
log_options = {
|
||||
git = {
|
||||
single_file = {
|
||||
diff_merges = "combined",
|
||||
},
|
||||
multi_file = {
|
||||
diff_merges = "first-parent",
|
||||
},
|
||||
}
|
||||
},
|
||||
win_config = {
|
||||
position = "bottom",
|
||||
height = 16,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
return {
|
||||
"tpope/vim-fugitive",
|
||||
}
|
|
@ -76,6 +76,22 @@ local servers = {
|
|||
},
|
||||
}
|
||||
|
||||
vim.lsp.handlers["textDocument/publishDiagnostics"] =
|
||||
vim.lsp.with(
|
||||
vim.lsp.diagnostic.on_publish_diagnostics,
|
||||
{
|
||||
virtual_text = true,
|
||||
signs = true,
|
||||
update_in_insert = true
|
||||
}
|
||||
)
|
||||
|
||||
local signs = { "Error", "Warn", "Hint", "Info" }
|
||||
for _, type in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = "▊ ", texthl = hl, numhl = hl })
|
||||
end
|
||||
|
||||
-- LSP config
|
||||
-- Took lots of inspiration from this kickstart lua file: https://github.com/hjr3/dotfiles/blob/main/.config/nvim/init.lua
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue