update ibl

This commit is contained in:
Christoph J. Scherr 2023-10-01 16:26:22 +02:00
parent 1058bae518
commit 8784b4890c
2 changed files with 120 additions and 57 deletions

View File

@ -6,9 +6,9 @@ local is_windows = vim.loop.os_uname().sysname == 'Windows_NT'
return { return {
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
{ 'nmac427/guess-indent.nvim', lazy = false, priority = 50, config = true }, { 'nmac427/guess-indent.nvim', lazy = false, priority = 50, config = true },
{ 'tweekmonster/helpful.vim', cmd = 'HelpfulVersion' }, { 'tweekmonster/helpful.vim', cmd = 'HelpfulVersion' },
{ 'lambdalisue/suda.vim', lazy = false, event = 'BufRead' }, { 'lambdalisue/suda.vim', lazy = false, event = 'BufRead' },
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
{ {
@ -17,9 +17,9 @@ return {
cond = not is_windows, cond = not is_windows,
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ '<C-h>', '<cmd>TmuxNavigateLeft<CR>', mode = { 'n', 't' }, silent = true, desc = 'Jump to left pane' }, { '<C-h>', '<cmd>TmuxNavigateLeft<CR>', mode = { 'n', 't' }, silent = true, desc = 'Jump to left pane' },
{ '<C-j>', '<cmd>TmuxNavigateDown<CR>', mode = { 'n', 't' }, silent = true, desc = 'Jump to lower pane' }, { '<C-j>', '<cmd>TmuxNavigateDown<CR>', mode = { 'n', 't' }, silent = true, desc = 'Jump to lower pane' },
{ '<C-k>', '<cmd>TmuxNavigateUp<CR>', mode = { 'n', 't' }, silent = true, desc = 'Jump to upper pane' }, { '<C-k>', '<cmd>TmuxNavigateUp<CR>', mode = { 'n', 't' }, silent = true, desc = 'Jump to upper pane' },
{ '<C-l>', '<cmd>TmuxNavigateRight<CR>', mode = { 'n', 't' }, silent = true, desc = 'Jump to right pane' }, { '<C-l>', '<cmd>TmuxNavigateRight<CR>', mode = { 'n', 't' }, silent = true, desc = 'Jump to right pane' },
}, },
init = function() init = function()
@ -189,16 +189,16 @@ return {
'ggandor/leap.nvim', 'ggandor/leap.nvim',
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ 'gl', '<Plug>(leap-forward-to)', mode = { 'n', 'x', 'o' }, desc = 'Leap forward to' }, { 'gl', '<Plug>(leap-forward-to)', mode = { 'n', 'x', 'o' }, desc = 'Leap forward to' },
{ 'gL', '<Plug>(leap-backward-to)', mode = { 'n', 'x', 'o' }, desc = 'Leap backward to' }, { 'gL', '<Plug>(leap-backward-to)', mode = { 'n', 'x', 'o' }, desc = 'Leap backward to' },
{ '<leader>wgl', '<Plug>(leap-from-window)', mode = { 'n', 'x', 'o' }, desc = 'Leap to windows' }, { '<leader>wgl', '<Plug>(leap-from-window)', mode = { 'n', 'x', 'o' }, desc = 'Leap to windows' },
}, },
config = function () config = function()
local leap = require('leap') local leap = require('leap')
leap.opts.case_sensitive = false leap.opts.case_sensitive = false
leap.opts.safe_labels = { 'f', 'n', 'u', 't', 'g', 'ö', 'w', 'b', 'm' } leap.opts.safe_labels = { 'f', 'n', 'u', 't', 'g', 'ö', 'w', 'b', 'm' }
leap.opts.labels = { 'a', 's', 'f', 'n', 'j', 'k', 'r', 'e', 'r', 'm', leap.opts.labels = { 'a', 's', 'f', 'n', 'j', 'k', 'r', 'e', 'r', 'm',
'ö', 'b', 'v', 'u', 'z', 'w', '2', '3', '4', '5', '6', 'ö', 'b', 'v', 'u', 'z', 'w', '2', '3', '4', '5', '6',
'7', '8', '9' } '7', '8', '9' }
end, end,
}, },
@ -286,15 +286,32 @@ return {
dependencies = 'nvim-telescope/telescope.nvim', dependencies = 'nvim-telescope/telescope.nvim',
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ ']t', function() require('todo-comments').jump_next() end, desc = 'Next todo comment' }, { ']t', function() require('todo-comments').jump_next() end, desc = 'Next todo comment' },
{ '[t', function() require('todo-comments').jump_prev() end, desc = 'Previous todo comment' }, { '[t', function() require('todo-comments').jump_prev() end, desc = 'Previous todo comment' },
{ '<LocalLeader>dt', '<cmd>TodoTelescope<CR>', desc = 'todo' }, { '<LocalLeader>dt', '<cmd>TodoTelescope<CR>', desc = 'todo' },
{ '<leader>xt', '<cmd>TodoTrouble<CR>', desc = 'Todo (Trouble)' }, { '<leader>xt', '<cmd>TodoTrouble<CR>', desc = 'Todo (Trouble)' },
{ '<leader>xT', '<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>', desc = 'Todo/Fix/Fixme (Trouble)' }, { '<leader>xT', '<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>', desc = 'Todo/Fix/Fixme (Trouble)' },
{ '<leader>St', '<cmd>TodoTelescope<cr>', desc = 'Todo' }, { '<leader>St', '<cmd>TodoTelescope<cr>', desc = 'Todo' },
{ '<leader>ST', '<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>', desc = 'Todo/Fix/Fixme' }, { '<leader>ST', '<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>', desc = 'Todo/Fix/Fixme' },
},
opts = {
signs = true,
keywords = {
FIX = {
icon = "", -- icon used for the sign, and in search results
color = "error", -- can be a hex color, or a named color (see below)
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
-- signs = false, -- configure signs for some keywords individually
},
TODO = { icon = "", color = "info" },
HACK = { icon = "", color = "warning" },
SECURITY = { icon = "󰒃 ", color = "warning" },
WARN = { icon = "", color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = "", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
NOTE = { icon = "", color = "hint", alt = { "INFO" } },
TEST = { icon = "", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
},
}, },
opts = { signs = false },
}, },
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
@ -304,12 +321,24 @@ return {
opts = { use_diagnostic_signs = true }, opts = { use_diagnostic_signs = true },
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ '<leader>e', '<cmd>TroubleToggle document_diagnostics<CR>', noremap = true, desc = 'Document Diagnostics' }, {
{ '<leader>r', '<cmd>TroubleToggle workspace_diagnostics<CR>', noremap = true, desc = 'Workspace Diagnostics' }, '<leader>e',
{ '<leader>xx', '<cmd>TroubleToggle document_diagnostics<cr>', desc = 'Document Diagnostics (Trouble)' }, '<cmd>TroubleToggle document_diagnostics<CR>',
noremap = true,
desc =
'Document Diagnostics'
},
{
'<leader>r',
'<cmd>TroubleToggle workspace_diagnostics<CR>',
noremap = true,
desc =
'Workspace Diagnostics'
},
{ '<leader>xx', '<cmd>TroubleToggle document_diagnostics<cr>', desc = 'Document Diagnostics (Trouble)' },
{ '<leader>xX', '<cmd>TroubleToggle workspace_diagnostics<cr>', desc = 'Workspace Diagnostics (Trouble)' }, { '<leader>xX', '<cmd>TroubleToggle workspace_diagnostics<cr>', desc = 'Workspace Diagnostics (Trouble)' },
{ '<leader>xQ', '<cmd>TroubleToggle quickfix<cr>', desc = 'Quickfix List (Trouble)' }, { '<leader>xQ', '<cmd>TroubleToggle quickfix<cr>', desc = 'Quickfix List (Trouble)' },
{ '<leader>xL', '<cmd>TroubleToggle loclist<cr>', desc = 'Location List (Trouble)' }, { '<leader>xL', '<cmd>TroubleToggle loclist<cr>', desc = 'Location List (Trouble)' },
{ {
'[q', '[q',
function() function()
@ -414,7 +443,7 @@ return {
end end
local mappings = { local mappings = {
{ '-', pick_window, desc = 'Pick window' }, { '-', pick_window, desc = 'Pick window' },
{ '<leader>wp', pick_window, desc = 'Pick window' }, { '<leader>wp', pick_window, desc = 'Pick window' },
{ '<leader>ww', swap_window, desc = 'Swap picked window' }, { '<leader>ww', swap_window, desc = 'Swap picked window' },
} }
@ -451,12 +480,23 @@ return {
cmd = { 'ZkNew', 'ZkNotes', 'ZkTags', 'ZkMatch' }, cmd = { 'ZkNew', 'ZkNotes', 'ZkTags', 'ZkMatch' },
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ '<leader>zn', "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", desc = 'Zk New' }, { '<leader>zn', "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", desc = 'Zk New' },
{ '<leader>zo', "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", desc = 'Zk Notes' }, { '<leader>zo', "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", desc = 'Zk Notes' },
{ '<leader>zt', '<Cmd>ZkTags<CR>', desc = 'Zk Tags' }, { '<leader>zt', '<Cmd>ZkTags<CR>', desc = 'Zk Tags' },
{ '<leader>zf', "<Cmd>ZkNotes { sort = { 'modified' }, match = vim.fn.input('Search: ') }<CR>", desc = 'Zk Search' }, { '<leader>zf', "<Cmd>ZkNotes { sort = { 'modified' }, match = vim.fn.input('Search: ') }<CR>", desc = 'Zk Search' },
{ '<leader>zf', ":'<,'>ZkMatch<CR>", mode = 'x', desc = 'Zk Match' }, {
{ '<leader>zb', '<Cmd>ZkBacklinks<CR>', desc = 'Zk Backlinks' }, '<leader>zf',
":'<,'>ZkMatch<CR>",
mode = 'x',
desc =
'Zk Match'
},
{
'<leader>zb',
'<Cmd>ZkBacklinks<CR>',
desc =
'Zk Backlinks'
},
{ '<leader>zl', '<Cmd>ZkLinks<CR>', desc = 'Zk Links' }, { '<leader>zl', '<Cmd>ZkLinks<CR>', desc = 'Zk Links' },
}, },
opts = { picker = 'telescope' }, opts = { picker = 'telescope' },
@ -468,7 +508,13 @@ return {
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ '<Leader>Sp', function() require('spectre').toggle() end, desc = 'Spectre', }, { '<Leader>Sp', function() require('spectre').toggle() end, desc = 'Spectre', },
{ '<Leader>Sp', function() require('spectre').open_visual({ select_word = true }) end, mode = 'x', desc = 'Spectre Word' }, {
'<Leader>Sp',
function() require('spectre').open_visual({ select_word = true }) end,
mode = 'x',
desc =
'Spectre Word'
},
}, },
opts = { opts = {
mapping = { mapping = {

View File

@ -5,9 +5,11 @@ return {
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
{ 'nvim-tree/nvim-web-devicons', lazy = false }, { 'nvim-tree/nvim-web-devicons', lazy = false },
{ 'MunifTanjim/nui.nvim', lazy = false }, { 'MunifTanjim/nui.nvim', lazy = false },
{ {
'akinsho/bufferline.nvim', lazy = false, version = "*", 'akinsho/bufferline.nvim',
lazy = false,
version = "*",
dependencies = 'nvim-tree/nvim-web-devicons' dependencies = 'nvim-tree/nvim-web-devicons'
}, },
@ -22,12 +24,24 @@ return {
}, },
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ '<S-Enter>', function() require('noice').redirect(tostring(vim.fn.getcmdline())) end, mode = 'c', desc = 'Redirect Cmdline' }, { '<S-Enter>', function() require('noice').redirect(tostring(vim.fn.getcmdline())) end, mode = 'c',
{ '<leader>Snl', function() require('noice').cmd('last') end, desc = 'Noice Last Message' }, desc =
{ '<leader>Snh', function() require('noice').cmd('history') end, desc = 'Noice History' }, 'Redirect Cmdline' },
{ '<leader>Sna', function() require('noice').cmd('all') end, desc = 'Noice All' }, { '<leader>Snl', function() require('noice').cmd('last') end, desc =
{ '<c-f>', function() if not require('noice.lsp').scroll(4) then return '<c-f>' end end, silent = true, expr = true, desc = 'Scroll forward', mode = {'i', 'n', 's'} }, 'Noice Last Message' },
{ '<c-b>', function() if not require('noice.lsp').scroll(-4) then return '<c-b>' end end, silent = true, expr = true, desc = 'Scroll backward', mode = {'i', 'n', 's'}}, { '<leader>Snh', function() require('noice').cmd('history') end, desc =
'Noice History' },
{ '<leader>Sna', function() require('noice').cmd('all') end, desc = 'Noice All' },
{ '<c-f>', function() if not require('noice.lsp').scroll(4) then return '<c-f>' end end, silent = true,
expr = true,
desc =
'Scroll forward', mode = {
'i', 'n', 's' } },
{ '<c-b>', function() if not require('noice.lsp').scroll(-4) then return '<c-b>' end end, silent = true,
expr = true,
desc =
'Scroll backward', mode = {
'i', 'n', 's' } },
}, },
---@type NoiceConfig ---@type NoiceConfig
opts = { opts = {
@ -141,7 +155,7 @@ return {
else else
vim.b.navic_winbar = true vim.b.navic_winbar = true
vim.opt_local.winbar = '%#NavicIconsFile# %t %* ' vim.opt_local.winbar = '%#NavicIconsFile# %t %* '
.. "%{%v:lua.require'nvim-navic'.get_location()%}" .. "%{%v:lua.require'nvim-navic'.get_location()%}"
end end
end, end,
desc = 'Toggle structure panel', desc = 'Toggle structure panel',
@ -224,30 +238,33 @@ return {
keys = { keys = {
{ '<Leader>ue', '<cmd>IndentBlanklineToggle<CR>' }, { '<Leader>ue', '<cmd>IndentBlanklineToggle<CR>' },
}, },
main = "ibl",
opts = { opts = {
show_trailing_blankline_indent = false, remove_blankline_trail = false,
disable_with_nolist = true, disable_with_nolist = true,
show_foldtext = false, show_foldtext = false,
char_priority = 100, char_priority = 100,
show_current_context = true, show_current_context = true,
show_current_context_start = false, show_current_context_start = false,
filetype_exclude = { exclude = {
'lspinfo', filetypes = {
'checkhealth', 'lspinfo',
'git', 'checkhealth',
'gitcommit', 'git',
'help', 'gitcommit',
'man', 'help',
'lazy', 'man',
'alpha', 'lazy',
'dashboard', 'alpha',
'terminal', 'dashboard',
'TelescopePrompt', 'terminal',
'TelescopeResults', 'TelescopePrompt',
'neo-tree', 'TelescopeResults',
'Outline', 'neo-tree',
'mason', 'Outline',
'Trouble', 'mason',
'Trouble',
}
}, },
}, },
}, },