|
|
|
@ -128,16 +128,16 @@ require('lazy').setup({
|
|
|
|
|
|
|
|
|
|
-- don't override the built-in and fugitive keymaps
|
|
|
|
|
local gs = package.loaded.gitsigns
|
|
|
|
|
vim.keymap.set({'n', 'v'}, ']c', function()
|
|
|
|
|
vim.keymap.set({ 'n', 'v' }, ']c', function()
|
|
|
|
|
if vim.wo.diff then return ']c' end
|
|
|
|
|
vim.schedule(function() gs.next_hunk() end)
|
|
|
|
|
return '<Ignore>'
|
|
|
|
|
end, {expr=true, buffer = bufnr, desc = "Jump to next hunk"})
|
|
|
|
|
vim.keymap.set({'n', 'v'}, '[c', function()
|
|
|
|
|
end, { expr = true, buffer = bufnr, desc = "Jump to next hunk" })
|
|
|
|
|
vim.keymap.set({ 'n', 'v' }, '[c', function()
|
|
|
|
|
if vim.wo.diff then return '[c' end
|
|
|
|
|
vim.schedule(function() gs.prev_hunk() end)
|
|
|
|
|
return '<Ignore>'
|
|
|
|
|
end, {expr=true, buffer = bufnr, desc = "Jump to previous hunk"})
|
|
|
|
|
end, { expr = true, buffer = bufnr, desc = "Jump to previous hunk" })
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -221,7 +221,7 @@ require('lazy').setup({
|
|
|
|
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
|
|
|
|
--
|
|
|
|
|
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
|
|
|
|
|
-- { import = 'custom.plugins' },
|
|
|
|
|
{ import = 'custom.plugins' },
|
|
|
|
|
}, {})
|
|
|
|
|
|
|
|
|
|
-- [[ Setting options ]]
|
|
|
|
@ -233,6 +233,7 @@ vim.o.hlsearch = false
|
|
|
|
|
|
|
|
|
|
-- Make line numbers default
|
|
|
|
|
vim.wo.number = true
|
|
|
|
|
vim.wo.relativenumber = true
|
|
|
|
|
|
|
|
|
|
-- Enable mouse mode
|
|
|
|
|
vim.o.mouse = 'a'
|
|
|
|
@ -254,6 +255,7 @@ vim.o.smartcase = true
|
|
|
|
|
|
|
|
|
|
-- Keep signcolumn on by default
|
|
|
|
|
vim.wo.signcolumn = 'yes'
|
|
|
|
|
vim.o.colorcolumn = '80'
|
|
|
|
|
|
|
|
|
|
-- Decrease update time
|
|
|
|
|
vim.o.updatetime = 250
|
|
|
|
@ -393,6 +395,11 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnos
|
|
|
|
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
|
|
|
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
|
|
|
|
|
|
|
|
|
-- Toggle diagnostics
|
|
|
|
|
require('toggle_lsp_diagnostics').init()
|
|
|
|
|
vim.keymap.set('n', '<leader>td', ':ToggleDiag<cr>', { desc = '[T]oggle [d]iagnostics' });
|
|
|
|
|
|
|
|
|
|
--vim.keymap.set('n', '<leader>td', require('toggle_lsp_diagnostics'))
|
|
|
|
|
-- [[ Configure LSP ]]
|
|
|
|
|
-- This function gets run when an LSP connects to a particular buffer.
|
|
|
|
|
local on_attach = function(_, bufnr)
|
|
|
|
|