[nvim] gitsigns
This commit is contained in:
8
nvim/lua/funcs.lua
Normal file
8
nvim/lua/funcs.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
function Contains(list, element)
|
||||
for _, v in ipairs(list) do
|
||||
if element == v then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
@@ -113,6 +113,8 @@ require("lspconfig").bashls.setup { capabilities = capabilities, handlers = hand
|
||||
}
|
||||
require("lspconfig").pyright.setup { capabilities = capabilities, handlers = handlers,
|
||||
on_attach = on_attach,
|
||||
-- more details on configuring pyright can be found here
|
||||
-- https://microsoft.github.io/pyright/#/settings?id=pyright-settings
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
IsYandex = Contains({"i113855042", "dmchumak-dev.sas.yp-c.yandex.net"}, vim.fn.hostname())
|
||||
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
@@ -28,3 +30,7 @@ vim.keymap.set("n", "<C-h>", "<C-w>h")
|
||||
vim.keymap.set("n", "<C-j>", "<C-w>j")
|
||||
vim.keymap.set("n", "<C-k>", "<C-w>k")
|
||||
vim.keymap.set("n", "<C-l>", "<C-w>l")
|
||||
|
||||
-- Keymap to copy to system buffer
|
||||
vim.keymap.set('n','<leader>y','"+yy')
|
||||
vim.keymap.set('v','<leader>y','"+y')
|
||||
|
||||
22
nvim/lua/plugins/gitsigns.lua
Normal file
22
nvim/lua/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
require('gitsigns').setup(
|
||||
{
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '-' },
|
||||
topdelete = { text = '▀' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '-' },
|
||||
topdelete = { text = '▀' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
vim.keymap.set('n', '<leader>vb', ':Gitsigns blame_line<CR>', {desc = "Blame current line (git/arc)"})
|
||||
@@ -64,6 +64,11 @@ local plugins = {
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
},
|
||||
-- GitSigns
|
||||
{
|
||||
dir = (IsYandex) and "~/arcadia/contrib/tier1/gitsigns.arc.nvim" or nil,
|
||||
url = (not IsYandex) and "lewis6991/gitsigns.nvim" or nil,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,3 +76,4 @@ require("lazy").setup(plugins)
|
||||
|
||||
require("plugins/telescope")
|
||||
require("plugins/completions")
|
||||
require("plugins/gitsigns")
|
||||
|
||||
Reference in New Issue
Block a user