Add gitsigns.nvim

This commit is contained in:
Dave Gallant
2022-01-07 21:34:22 -05:00
parent 248adee70b
commit fe0cb4e2a0
3 changed files with 18 additions and 88 deletions

24
flake.lock generated
View File

@@ -78,11 +78,11 @@
},
"locked": {
"dir": "contrib",
"lastModified": 1641414078,
"narHash": "sha256-jUt4yGclE0627CxsaSlgGr8LH+Ek9dSpCHACv917N5c=",
"lastModified": 1641520266,
"narHash": "sha256-u80ASs6Nv7G3lx3SYf/SODArunkfyaKDCsq58jzy2+8=",
"owner": "neovim",
"repo": "neovim",
"rev": "09d270bcea5f81a0772e387244cc841e280a5339",
"rev": "e58071c92c98fa54fcb29ab87ac6de7c02ede27b",
"type": "github"
},
"original": {
@@ -99,11 +99,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1641456891,
"narHash": "sha256-OXtbN9CkI0qpFIqBDA/GsIlM3qEEtMuPJANrYzj0Q34=",
"lastModified": 1641543268,
"narHash": "sha256-+hlQi+iCGMfogRweYkuwPluhnPXdKeJe+4tlJdBkfA8=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "cc577df89d0e968470b48f84a2b05bd13d1b7ecc",
"rev": "615aee1060084ce95aed2f9af9d223bf1cdaa80e",
"type": "github"
},
"original": {
@@ -130,11 +130,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1641230035,
"narHash": "sha256-hFyqihERaTbLxCOlugy/rpp22VLtLh8SPRnA2uu3F/8=",
"lastModified": 1641528457,
"narHash": "sha256-FyU9E63n1W7Ql4pMnhW2/rO9OftWZ37pLppn/c1aisY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "78cd22c1b8604de423546cd49bfe264b786eca13",
"rev": "ff377a78794d412a35245e05428c8f95fef3951f",
"type": "github"
},
"original": {
@@ -162,11 +162,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1641230035,
"narHash": "sha256-hFyqihERaTbLxCOlugy/rpp22VLtLh8SPRnA2uu3F/8=",
"lastModified": 1641528457,
"narHash": "sha256-FyU9E63n1W7Ql4pMnhW2/rO9OftWZ37pLppn/c1aisY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "78cd22c1b8604de423546cd49bfe264b786eca13",
"rev": "ff377a78794d412a35245e05428c8f95fef3951f",
"type": "github"
},
"original": {

View File

@@ -361,8 +361,8 @@ in
plugins = with pkgs.vimPlugins; [
completion-nvim
copilot-vim
git-blame-nvim
gitlinker-nvim
gitsigns-nvim
gruvbox-nvim
lualine-nvim
nvim-lspconfig
@@ -373,12 +373,10 @@ in
packer-nvim
plenary-nvim
supertab
/* telescope-fzy-native-nvim */ # remove until latest fixes are pulled in
trouble-nvim
telescope-fzy-native-nvim
vim-commentary
vim-markdown
vim-repeat
vim-signify
vim-sneak
vim-surround
];

View File

@@ -135,7 +135,7 @@ vim.cmd([[autocmd BufWritePre *.nix lua vim.lsp.buf.formatting_sync()]])
require("packer").startup(function()
use({ "ms-jpq/coq_nvim", branch = "coq" }) -- main one
use({ "ms-jpq/coq.artifacts", branch = "artifacts" }) -- 9000+ Snippets
use({ "nvim-telescope/telescope.nvim", branch = "master" })
use({ "petertriho/nvim-scrollbar", branch = "main" })
end)
-------------------------------------------------------------------------------
@@ -154,16 +154,15 @@ require("lualine").setup({
-- nvim-tree
require'nvim-tree'.setup {}
-- gitsigns
require('gitsigns').setup()
-- treesitter
require("nvim-treesitter.configs").setup({
ensure_installed = "all",
highlight = {
enable = true,
custom_captures = {
-- ["<capture group>"] = "<highlight group>",
-- ["keyword"] = "TSString",
},
},
indent = {
@@ -187,67 +186,6 @@ vim.api.nvim_exec(
true
)
-- trouble
require("trouble").setup({
{
position = "bottom",
height = 10,
width = 50,
icons = true,
mode = "lsp_workspace_diagnostics",
fold_open = "",
fold_closed = "",
action_keys = {
close = "q",
cancel = "<esc>",
refresh = "r",
jump = { "<cr>", "<tab>" },
open_split = { "<c-x>" },
open_vsplit = { "<c-v>" },
open_tab = { "<c-t>" },
jump_close = { "o" },
toggle_mode = "m",
toggle_preview = "P",
hover = "K",
preview = "p",
close_folds = { "zM", "zm" },
open_folds = { "zR", "zr" },
toggle_fold = { "zA", "za" },
previous = "k",
next = "j",
},
indent_lines = true,
auto_open = false,
auto_close = false,
auto_preview = true,
auto_fold = false,
signs = {
error = "",
warning = "",
hint = "",
information = "",
other = "",
},
use_lsp_diagnostic_signs = false,
},
})
vim.api.nvim_set_keymap("n", "<leader>xx", "<cmd>Trouble<cr>", { silent = true, noremap = true })
vim.api.nvim_set_keymap(
"n",
"<leader>xw",
"<cmd>Trouble lsp_workspace_diagnostics<cr>",
{ silent = true, noremap = true }
)
vim.api.nvim_set_keymap(
"n",
"<leader>xd",
"<cmd>Trouble lsp_document_diagnostics<cr>",
{ silent = true, noremap = true }
)
vim.api.nvim_set_keymap("n", "<leader>xl", "<cmd>Trouble loclist<cr>", { silent = true, noremap = true })
vim.api.nvim_set_keymap("n", "<leader>xq", "<cmd>Trouble quickfix<cr>", { silent = true, noremap = true })
vim.api.nvim_set_keymap("n", "gR", "<cmd>Trouble lsp_references<cr>", { silent = true, noremap = true })
-- vim-markdown
vim.g.vim_markdown_override_foldtext = 0
vim.g.vim_markdown_no_default_key_mappings = 1
@@ -270,12 +208,6 @@ vim.api.nvim_set_keymap("n", "<leader>n", "<cmd>NvimTreeToggle<cr>", { noremap =
vim.api.nvim_set_keymap("n", "<leader>r", "<cmd>NvimTreeRefresh<cr>", { noremap = true })
vim.api.nvim_set_keymap("n", "<leader>nf", "<cmd>NvimTreeFindFile<cr>", { noremap = true })
-- syntastic
vim.g.syntastic_always_populate_loc_list = 1
vim.g.syntastic_auto_loc_list = 1
vim.g.syntastic_check_on_open = 1
vim.g.syntastic_check_on_wq = 0
-- completion-nvim
vim.cmd([[autocmd BufEnter * lua require'completion'.on_attach()]])