switch to gitssigns
This commit is contained in:
parent
a56478039e
commit
355d26c305
6 changed files with 79 additions and 15 deletions
|
@ -12,6 +12,7 @@ require('autocompletion')
|
||||||
require('treesitterconfig')
|
require('treesitterconfig')
|
||||||
require('troubleconfig')
|
require('troubleconfig')
|
||||||
require('null-ls-config')
|
require('null-ls-config')
|
||||||
|
require('gitsigns-config')
|
||||||
require('filemanager')
|
require('filemanager')
|
||||||
require('notes')
|
require('notes')
|
||||||
require('zenmode')
|
require('zenmode')
|
||||||
|
|
|
@ -30,6 +30,31 @@ cmp.setup({
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Use buffer source for `vimwiki`
|
||||||
|
cmp.setup.cmdline('vimwiki', {
|
||||||
|
sources = {
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
|
{ name = 'buffer' }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
cmp.setup.cmdline('md', {
|
||||||
|
sources = {
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
|
{ name = 'buffer' }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
cmp.setup.cmdline('tex', {
|
||||||
|
sources = {
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
|
{ name = 'buffer' }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
-- Use buffer source for `/`
|
-- Use buffer source for `/`
|
||||||
cmp.setup.cmdline('/', {
|
cmp.setup.cmdline('/', {
|
||||||
sources = {
|
sources = {
|
||||||
|
|
41
nvim/lua/gitsigns-config.lua
Normal file
41
nvim/lua/gitsigns-config.lua
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
require('gitsigns').setup({
|
||||||
|
signs = {
|
||||||
|
add = {hl = 'GitSignsAdd' , text = '│', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
|
||||||
|
change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||||
|
delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||||
|
topdelete = {hl = 'GitSignsDelete', text = '‾', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||||
|
changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||||
|
},
|
||||||
|
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||||
|
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||||
|
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||||
|
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||||
|
watch_gitdir = {
|
||||||
|
interval = 1000,
|
||||||
|
follow_files = true
|
||||||
|
},
|
||||||
|
attach_to_untracked = true,
|
||||||
|
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||||
|
current_line_blame_opts = {
|
||||||
|
virt_text = true,
|
||||||
|
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||||
|
delay = 1000,
|
||||||
|
ignore_whitespace = false,
|
||||||
|
},
|
||||||
|
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
|
||||||
|
sign_priority = 6,
|
||||||
|
update_debounce = 100,
|
||||||
|
status_formatter = nil, -- Use default
|
||||||
|
max_file_length = 40000, -- Disable if file is longer than this (in lines)
|
||||||
|
preview_config = {
|
||||||
|
-- Options passed to nvim_open_win
|
||||||
|
border = 'single',
|
||||||
|
style = 'minimal',
|
||||||
|
relative = 'cursor',
|
||||||
|
row = 0,
|
||||||
|
col = 1
|
||||||
|
},
|
||||||
|
yadm = {
|
||||||
|
enable = false
|
||||||
|
},
|
||||||
|
})
|
|
@ -1,12 +1,16 @@
|
||||||
require("null-ls").setup({
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
|
null_ls.setup({
|
||||||
sources = {
|
sources = {
|
||||||
-- FORMATTING
|
-- FORMATTING
|
||||||
require("null-ls").builtins.formatting.stylua,
|
null_ls.builtins.formatting.stylua,
|
||||||
require("null-ls").builtins.formatting.eslint,
|
null_ls.builtins.formatting.eslint,
|
||||||
require("null-ls").builtins.formatting.prettierd,
|
null_ls.builtins.formatting.prettierd,
|
||||||
-- DIAGNOSTICS
|
-- DIAGNOSTICS
|
||||||
require("null-ls").builtins.diagnostics.eslint,
|
null_ls.builtins.diagnostics.eslint,
|
||||||
-- COMPLETIONS
|
-- COMPLETIONS
|
||||||
require("null-ls").builtins.completion.spell,
|
null_ls.builtins.completion.spell,
|
||||||
|
-- CODE ACTIONS
|
||||||
|
null_ls.builtins.code_actions.gitsigns
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
-- SETUP FO VARIOUS PLUGIN OPTIONS
|
-- SETUP FO VARIOUS PLUGIN OPTIONS
|
||||||
|
|
||||||
-- GITGUTTER SETUP
|
|
||||||
-- =========================
|
|
||||||
vim.api.nvim_set_var('gitgutter_sign_added', '∙')
|
|
||||||
vim.api.nvim_set_var('gitgutter_sign_modified', '∙')
|
|
||||||
vim.api.nvim_set_var('gitgutter_sign_removed', '∙')
|
|
||||||
vim.api.nvim_set_var('gitgutter_sign_modified_removed', '∙')
|
|
||||||
|
|
||||||
vim.cmd [[
|
vim.cmd [[
|
||||||
augroup VimDiff
|
augroup VimDiff
|
||||||
autocmd!
|
autocmd!
|
||||||
|
|
|
@ -48,8 +48,8 @@ Plug 'vimwiki/vimwiki'
|
||||||
-- git
|
-- git
|
||||||
Plug 'tpope/vim-fugitive'
|
Plug 'tpope/vim-fugitive'
|
||||||
|
|
||||||
-- vim gitgutter
|
-- git signs
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'lewis6991/gitsigns.nvim'
|
||||||
|
|
||||||
-- COLORS
|
-- COLORS
|
||||||
-- ===================
|
-- ===================
|
||||||
|
|
Loading…
Add table
Reference in a new issue