This commit is contained in:
Sebastian 2025-07-04 14:22:47 +02:00
parent 1b949bdb01
commit a90ea1f671
18 changed files with 1361 additions and 1210 deletions

View file

@ -0,0 +1,74 @@
-- Autocompletion
return {
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
dependencies = {
{
'L3MON4D3/LuaSnip',
build = (function()
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
return
end
return 'make install_jsregexp'
end)(),
config = function()
require('luasnip.loaders.from_lua').load { paths = { '~/.config/nvim/snippets/' } }
end,
},
'saadparwaiz1/cmp_luasnip',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
},
config = function()
local cmp = require 'cmp'
local luasnip = require 'luasnip'
luasnip.config.setup {}
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
completion = { completeopt = 'menu,menuone,noinsert' },
preselect = require('cmp').PreselectMode.None,
mapping = cmp.mapping.preset.insert {
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-j>'] = cmp.mapping.select_next_item(),
['<C-k>'] = cmp.mapping.select_prev_item(),
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.confirm({ select = true })
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
['<C-Space>'] = cmp.mapping.complete {},
['<C-l>'] = cmp.mapping(function()
if luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
end
end, { 'i', 's' }),
['<C-h>'] = cmp.mapping(function()
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end
end, { 'i', 's' }),
},
sources = {
{
name = 'lazydev',
group_index = 0,
},
{ name = 'luasnip', priority = 1000 },
{ name = 'nvim_lsp', priority = 800 },
{ name = 'path', priority = 300 },
},
}
end,
}

19
lua/plugins/core.lua Normal file
View file

@ -0,0 +1,19 @@
-- Core plugins
return {
'tpope/vim-sleuth',
{
'lewis6991/gitsigns.nvim',
opts = {
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
},
},
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
}

View file

@ -0,0 +1,44 @@
-- Code formatting
return {
'stevearc/conform.nvim',
event = { 'BufWritePre' },
cmd = { 'ConformInfo' },
keys = {
{
'<leader>f',
function()
require('conform').format { async = true, lsp_format = 'fallback' }
end,
mode = '',
desc = '[F]ormat buffer',
},
},
opts = {
notify_on_error = false,
formatters = {
csharpier = {
command = 'csharpier',
args = { 'format', '$FILENAME' },
stdin = false,
tmpfile_format = '.cs',
},
},
format_on_save = function(bufnr)
local disable_filetypes = { c = true, cpp = true }
local lsp_format_opt
if disable_filetypes[vim.bo[bufnr].filetype] then
lsp_format_opt = 'never'
else
lsp_format_opt = 'fallback'
end
return {
timeout_ms = 500,
lsp_format = lsp_format_opt,
}
end,
formatters_by_ft = {
lua = { 'stylua' },
-- cs = { 'csharpier' },
},
},
}

63
lua/plugins/harpoon.lua Normal file
View file

@ -0,0 +1,63 @@
-- Harpoon for quick file navigation
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local harpoon = require 'harpoon'
harpoon:setup()
vim.keymap.set('n', '<leader>A', function()
harpoon:list():add()
end, { desc = 'Add a file to harpoon' })
vim.keymap.set('n', '<leader>a', function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end, { desc = 'Open harpoon nav' })
vim.keymap.set('n', '<leader>1', function()
harpoon:list():select(1)
end, { desc = 'Go to file 1' })
vim.keymap.set('n', '<leader>2', function()
harpoon:list():select(2)
end, { desc = 'Go to file 2' })
vim.keymap.set('n', '<leader>3', function()
harpoon:list():select(3)
end, { desc = 'Go to file 3' })
vim.keymap.set('n', '<leader>4', function()
harpoon:list():select(4)
end, { desc = 'Go to file 4' })
vim.keymap.set('n', '<leader>5', function()
harpoon:list():select(5)
end, { desc = 'Go to file 5' })
vim.keymap.set('n', '<C-S-P>', function()
harpoon:list():prev()
end)
vim.keymap.set('n', '<C-S-N>', function()
harpoon:list():next()
end)
local conf = require('telescope.config').values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require('telescope.pickers')
.new({}, {
prompt_title = 'Harpoon',
finder = require('telescope.finders').new_table {
results = file_paths,
},
previewer = conf.file_previewer {},
sorter = conf.generic_sorter {},
})
:find()
end
vim.keymap.set('n', '<leader>z', function()
toggle_telescope(harpoon:list())
end, { desc = 'Open harpoon window in telescope' })
end,
}

112
lua/plugins/lsp.lua Normal file
View file

@ -0,0 +1,112 @@
-- LSP configuration
return {
{
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
},
},
},
{ 'Bilal2453/luvit-meta', lazy = true },
{
'neovim/nvim-lspconfig',
dependencies = {
{ 'williamboman/mason.nvim', config = true },
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
{ 'j-hui/fidget.nvim', opts = {} },
'hrsh7th/cmp-nvim-lsp',
},
config = function()
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
callback = function(event)
local map = function(keys, func, desc, mode)
mode = mode or 'n'
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
end
map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' })
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
local client = vim.lsp.get_client_by_id(event.data.client_id)
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.document_highlight,
})
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.clear_references,
})
vim.api.nvim_create_autocmd('LspDetach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
callback = function(event2)
vim.lsp.buf.clear_references()
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
end,
})
end
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
map('<leader>th', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
end, '[T]oggle Inlay [H]ints')
end
end,
})
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
local servers = {
omnisharp = {
cmd = { 'omnisharp-mono' },
},
lua_ls = {
settings = {
Lua = {
completion = {
callSnippet = 'Replace',
},
},
},
},
}
require('mason').setup()
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'stylua',
'csharpier',
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
require('mason-lspconfig').setup {
handlers = {
function(server_name)
local server = servers[server_name] or {}
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
require('lspconfig')[server_name].setup(server)
end,
},
}
end,
},
}

60
lua/plugins/telescope.lua Normal file
View file

@ -0,0 +1,60 @@
-- Telescope fuzzy finder
return {
'nvim-telescope/telescope.nvim',
event = 'VimEnter',
branch = '0.1.x',
dependencies = {
'nvim-lua/plenary.nvim',
{
'nvim-telescope/telescope-fzf-native.nvim',
build = 'make',
cond = function()
return vim.fn.executable 'make' == 1
end,
},
{ 'nvim-telescope/telescope-ui-select.nvim' },
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
},
config = function()
require('telescope').setup {
extensions = {
['ui-select'] = {
require('telescope.themes').get_dropdown(),
},
},
}
pcall(require('telescope').load_extension, 'fzf')
pcall(require('telescope').load_extension, 'ui-select')
local builtin = require 'telescope.builtin'
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
vim.keymap.set('n', '<leader>/', function()
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
winblend = 10,
previewer = false,
})
end, { desc = '[/] Fuzzily search in current buffer' })
vim.keymap.set('n', '<leader>s/', function()
builtin.live_grep {
grep_open_files = true,
prompt_title = 'Live Grep in Open Files',
}
end, { desc = '[S]earch [/] in Open Files' })
vim.keymap.set('n', '<leader>sn', function()
builtin.find_files { cwd = vim.fn.stdpath 'config' }
end, { desc = '[S]earch [N]eovim files' })
end,
}

233
lua/plugins/theme.lua Normal file
View file

@ -0,0 +1,233 @@
-- Custom theme
return {
{
name = 'vague-theme',
dir = vim.fn.stdpath('config'),
config = function()
-- Vague theme
local function setup_vague_theme()
vim.cmd 'highlight clear'
if vim.fn.exists 'syntax_on' == 1 then
vim.cmd 'syntax reset'
end
vim.o.background = 'dark'
vim.g.colors_name = 'vague'
local c = {
black = '#000000',
dark_gray = '#1b1c1d',
gray = '#2d2d30',
light_gray = '#5c5c6e',
white = '#cdcdcd',
foreground = '#be8c8c',
cursor = '#c2c2c2',
line_bg = '#282830',
active_fg = '#deb896',
focus_fg = '#ddb795',
property = '#b6c4dc',
number = '#C2966B',
parameter = '#b8a2ba',
class = '#b06767',
namespace = '#748fa7',
keyword = '#7894AB',
control_kw = '#748fa7',
interface = '#d57d7d',
func = '#be8c8c',
operator = '#CDCDCD',
string = '#deb896',
comment = '#8c8c8c',
error = '#d2788c',
warning = '#e6be8c',
info = '#61a0c4',
}
local function hi(group, fg, bg, attr)
local cmd = 'highlight ' .. group
if fg and fg ~= '' then
cmd = cmd .. ' guifg=' .. fg
end
if bg and bg ~= '' then
cmd = cmd .. ' guibg=' .. bg
end
if attr and attr ~= '' then
cmd = cmd .. ' gui=' .. attr
end
vim.cmd(cmd)
end
-- Basic highlights
hi('Normal', c.white, c.black, '')
hi('Cursor', c.black, c.cursor, '')
hi('CursorLine', '', c.line_bg, '')
hi('CursorColumn', '', c.line_bg, '')
hi('LineNr', c.light_gray, '', '')
hi('CursorLineNr', c.focus_fg, '', 'bold')
hi('Visual', '', '#3d3d3d28', '')
hi('VisualNOS', '', '#3d3d3d28', '')
hi('Search', c.black, c.number, '')
hi('IncSearch', c.black, c.active_fg, '')
hi('MatchParen', '', '#0064001a', '')
hi('VertSplit', c.gray, '', '')
hi('WinSeparator', c.gray, '', '')
hi('StatusLine', c.active_fg, c.black, '')
hi('StatusLineNC', c.foreground, c.black, '')
hi('TabLine', c.foreground, c.black, '')
hi('TabLineFill', '', c.black, '')
hi('TabLineSel', c.active_fg, c.black, 'bold')
hi('Pmenu', c.warning, c.black, '')
hi('PmenuSel', c.active_fg, '#232426', '')
hi('PmenuSbar', '', c.gray, '')
hi('PmenuThumb', '', c.light_gray, '')
hi('FloatBorder', c.gray, '', '')
hi('NormalFloat', c.white, c.black, '')
hi('Folded', c.comment, '#8484841c', '')
hi('FoldColumn', c.light_gray, '', '')
hi('DiffAdd', '', '#587c0c4c', '')
hi('DiffChange', '', '#0c7d9d52', '')
hi('DiffDelete', '', '#94151b54', '')
hi('DiffText', '', '#bcbcbc14', '')
hi('DiagnosticError', c.error, '', '')
hi('DiagnosticWarn', c.warning, '', '')
hi('DiagnosticInfo', c.info, '', '')
hi('DiagnosticHint', c.comment, '', '')
hi('ErrorMsg', c.error, '', '')
hi('WarningMsg', c.warning, '', '')
hi('ModeMsg', c.active_fg, '', '')
hi('MoreMsg', c.active_fg, '', '')
hi('Question', c.active_fg, '', '')
-- Syntax
hi('Comment', c.comment, '', 'italic')
hi('Constant', c.number, '', '')
hi('String', c.string, '', '')
hi('Character', c.string, '', '')
hi('Number', c.number, '', '')
hi('Boolean', c.number, '', '')
hi('Float', c.number, '', '')
hi('Identifier', c.property, '', '')
hi('Function', c.func, '', '')
hi('Statement', c.keyword, '', '')
hi('Conditional', c.control_kw, '', '')
hi('Repeat', c.control_kw, '', '')
hi('Label', c.keyword, '', '')
hi('Operator', c.operator, '', '')
hi('Keyword', c.keyword, '', '')
hi('Exception', c.control_kw, '', '')
hi('PreProc', c.keyword, '', '')
hi('Include', c.keyword, '', '')
hi('Define', c.keyword, '', '')
hi('Macro', c.keyword, '', '')
hi('PreCondit', c.keyword, '', '')
hi('Type', c.class, '', '')
hi('StorageClass', c.keyword, '', '')
hi('Structure', c.class, '', '')
hi('Typedef', c.class, '', '')
hi('Special', c.operator, '', '')
hi('SpecialChar', c.operator, '', '')
hi('Tag', c.class, '', '')
hi('Delimiter', c.operator, '', '')
hi('SpecialComment', c.comment, '', 'bold')
hi('Debug', c.error, '', '')
-- TreeSitter
hi('@variable', c.white, '', '')
hi('@variable.builtin', c.class, '', '')
hi('@variable.parameter', c.parameter, '', '')
hi('@variable.member', c.property, '', '')
hi('@constant', c.number, '', '')
hi('@constant.builtin', c.number, '', '')
hi('@constant.macro', c.keyword, '', '')
hi('@string', c.string, '', '')
hi('@string.escape', c.operator, '', '')
hi('@string.special', c.operator, '', '')
hi('@character', c.string, '', '')
hi('@character.special', c.operator, '', '')
hi('@number', c.number, '', '')
hi('@boolean', c.number, '', '')
hi('@float', c.number, '', '')
hi('@function', c.func, '', '')
hi('@function.builtin', c.func, '', '')
hi('@function.call', c.func, '', '')
hi('@function.macro', c.func, '', '')
hi('@method', c.func, '', '')
hi('@method.call', c.func, '', '')
hi('@constructor', c.class, '', '')
hi('@parameter', c.parameter, '', '')
hi('@keyword', c.keyword, '', '')
hi('@keyword.function', c.keyword, '', '')
hi('@keyword.operator', c.keyword, '', '')
hi('@keyword.return', c.control_kw, '', '')
hi('@keyword.conditional', c.control_kw, '', '')
hi('@keyword.repeat', c.control_kw, '', '')
hi('@keyword.exception', c.control_kw, '', '')
hi('@operator', c.operator, '', '')
hi('@punctuation.delimiter', c.operator, '', '')
hi('@punctuation.bracket', c.operator, '', '')
hi('@punctuation.special', c.operator, '', '')
hi('@type', c.class, '', '')
hi('@type.builtin', c.class, '', '')
hi('@type.definition', c.class, '', '')
hi('@type.qualifier', c.keyword, '', '')
hi('@property', c.property, '', '')
hi('@field', c.property, '', '')
hi('@namespace', c.namespace, '', '')
hi('@module', c.namespace, '', '')
hi('@label', c.keyword, '', '')
hi('@comment', c.comment, '', 'italic')
hi('@tag', c.class, '', '')
hi('@tag.attribute', c.property, '', '')
hi('@tag.delimiter', c.operator, '', '')
-- LSP
hi('@lsp.type.class', c.class, '', '')
hi('@lsp.type.interface', c.interface, '', '')
hi('@lsp.type.namespace', c.namespace, '', '')
hi('@lsp.type.parameter', c.parameter, '', '')
hi('@lsp.type.property', c.property, '', '')
hi('@lsp.type.variable', c.white, '', '')
hi('@lsp.type.function', c.func, '', '')
hi('@lsp.type.method', c.func, '', '')
hi('@lsp.type.macro', c.func, '', '')
hi('@lsp.mod.defaultLibrary', c.func, '', '')
hi('LspSignatureActiveParameter', c.parameter, '', 'bold')
hi('LspCodeLens', c.comment, '', '')
hi('LspInlayHint', c.comment, '', 'italic')
-- Telescope
hi('TelescopeNormal', c.white, c.black, '')
hi('TelescopeBorder', c.gray, '', '')
hi('TelescopeSelection', c.active_fg, '#232426', '')
hi('TelescopeSelectionCaret', c.active_fg, '', '')
hi('TelescopeMatching', c.number, '', '')
-- Which-key
hi('WhichKey', c.property, '', '')
hi('WhichKeyGroup', c.class, '', '')
hi('WhichKeyDesc', c.white, '', '')
hi('WhichKeyFloat', '', c.black, '')
hi('WhichKeyBorder', c.gray, '', '')
-- Terminal colors
vim.g.terminal_color_0 = c.black
vim.g.terminal_color_1 = '#cd3131'
vim.g.terminal_color_2 = '#0dbc79'
vim.g.terminal_color_3 = '#e5e510'
vim.g.terminal_color_4 = '#2472c8'
vim.g.terminal_color_5 = '#bc3fbc'
vim.g.terminal_color_6 = '#11a8cd'
vim.g.terminal_color_7 = '#e5e5e5'
vim.g.terminal_color_8 = '#666666'
vim.g.terminal_color_9 = '#f14c4c'
vim.g.terminal_color_10 = '#23d18b'
vim.g.terminal_color_11 = '#f5f543'
vim.g.terminal_color_12 = '#3b8eea'
vim.g.terminal_color_13 = '#d670d6'
vim.g.terminal_color_14 = '#29b8db'
vim.g.terminal_color_15 = '#e5e5e5'
end
setup_vague_theme()
end,
},
}

View file

@ -0,0 +1,15 @@
-- Treesitter for syntax highlighting
return {
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
main = 'nvim-treesitter.configs',
opts = {
ensure_installed = { 'bash', 'c', 'c_sharp', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = { 'ruby' },
},
indent = { enable = true, disable = { 'ruby' } },
},
}

163
lua/plugins/ui.lua Normal file
View file

@ -0,0 +1,163 @@
-- UI plugins
return {
{
'folke/which-key.nvim',
event = 'VimEnter',
opts = {
icons = {
mappings = vim.g.have_nerd_font,
keys = vim.g.have_nerd_font and {} or {
Up = '<Up> ',
Down = '<Down> ',
Left = '<Left> ',
Right = '<Right> ',
C = '<C-…> ',
M = '<M-…> ',
D = '<D-…> ',
S = '<S-…> ',
CR = '<CR> ',
Esc = '<Esc> ',
ScrollWheelDown = '<ScrollWheelDown> ',
ScrollWheelUp = '<ScrollWheelUp> ',
NL = '<NL> ',
BS = '<BS> ',
Space = '<Space> ',
Tab = '<Tab> ',
F1 = '<F1>',
F2 = '<F2>',
F3 = '<F3>',
F4 = '<F4>',
F5 = '<F5>',
F6 = '<F6>',
F7 = '<F7>',
F8 = '<F8>',
F9 = '<F9>',
F10 = '<F10>',
F11 = '<F11>',
F12 = '<F12>',
},
},
spec = {
-- Groups
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
{ '<leader>d', group = '[D]ocument' },
{ '<leader>r', group = '[R]ename' },
{ '<leader>s', group = '[S]earch' },
{ '<leader>W', group = '[W]orkspace' },
{ '<leader>t', group = '[T]oggle' },
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
-- General keybinds
{ '<leader>w', desc = 'Save File' },
{ '<leader>pv', desc = 'Go back to Dir' },
{ '<leader>q', desc = 'Open diagnostic quickfix list' },
{ '<leader>f', desc = 'Format buffer', mode = { 'n', 'v' } },
-- LSP keybinds
{ '<leader>D', desc = 'Type Definition' },
{ '<leader>ds', desc = 'Document Symbols' },
{ '<leader>ws', desc = 'Workspace Symbols' },
{ '<leader>rn', desc = 'Rename' },
{ '<leader>ca', desc = 'Code Action', mode = { 'n', 'v' } },
{ '<leader>th', desc = 'Toggle Inlay Hints' },
-- Harpoon keybinds
{ '<leader>A', desc = 'Add file to harpoon' },
{ '<leader>a', desc = 'Open harpoon nav' },
{ '<leader>1', desc = 'Go to file 1' },
{ '<leader>2', desc = 'Go to file 2' },
{ '<leader>3', desc = 'Go to file 3' },
{ '<leader>4', desc = 'Go to file 4' },
{ '<leader>5', desc = 'Go to file 5' },
{ '<leader>z', desc = 'Open harpoon in telescope' },
-- Telescope search keybinds
{ '<leader>sh', desc = 'Search Help' },
{ '<leader>sk', desc = 'Search Keymaps' },
{ '<leader>sf', desc = 'Search Files' },
{ '<leader>ss', desc = 'Search Select Telescope' },
{ '<leader>sw', desc = 'Search current Word' },
{ '<leader>sg', desc = 'Search by Grep' },
{ '<leader>sd', desc = 'Search Diagnostics' },
{ '<leader>sr', desc = 'Search Resume' },
{ '<leader>s.', desc = 'Search Recent Files' },
{ '<leader><leader>', desc = 'Find existing buffers' },
{ '<leader>/', desc = 'Fuzzily search in current buffer' },
{ '<leader>s/', desc = 'Search in Open Files' },
{ '<leader>sn', desc = 'Search Neovim files' },
-- Debug keybinds
{ '<leader>b', desc = 'Debug: Toggle Breakpoint' },
{ '<leader>B', desc = 'Debug: Set Breakpoint' },
-- Git hunk actions
{ '<leader>hs', desc = 'Stage hunk', mode = { 'n', 'v' } },
{ '<leader>hr', desc = 'Reset hunk', mode = { 'n', 'v' } },
{ '<leader>hS', desc = 'Stage buffer' },
{ '<leader>hu', desc = 'Undo stage hunk' },
{ '<leader>hR', desc = 'Reset buffer' },
{ '<leader>hp', desc = 'Preview hunk' },
{ '<leader>hb', desc = 'Blame line' },
{ '<leader>hd', desc = 'Diff against index' },
{ '<leader>hD', desc = 'Diff against last commit' },
-- Git toggles
{ '<leader>tb', desc = 'Toggle git show blame line' },
{ '<leader>tD', desc = 'Toggle git show deleted' },
-- Function keys
{ '<F1>', desc = 'Debug: Step Into' },
{ '<F2>', desc = 'Debug: Step Over' },
{ '<F3>', desc = 'Debug: Step Out' },
{ '<F5>', desc = 'Debug: Start/Continue' },
{ '<F7>', desc = 'Debug: See last session result' },
-- Other important keybinds
{ '\\', desc = 'NeoTree reveal' },
{ 'gd', desc = 'Go to Definition' },
{ 'gr', desc = 'Go to References' },
{ 'gI', desc = 'Go to Implementation' },
{ 'gD', desc = 'Go to Declaration' },
{ ']c', desc = 'Next git change' },
{ '[c', desc = 'Previous git change' },
},
},
},
{
'echasnovski/mini.nvim',
config = function()
require('mini.ai').setup { n_lines = 500 }
require('mini.surround').setup()
local statusline = require 'mini.statusline'
statusline.setup { use_icons = vim.g.have_nerd_font }
statusline.section_location = function()
return '%2l:%-2v'
end
end,
},
{
'lukas-reineke/indent-blankline.nvim',
main = 'ibl',
event = 'BufReadPost',
config = function()
vim.api.nvim_set_hl(0, 'IblIndent', { fg = '#0a0a0a' })
vim.api.nvim_set_hl(0, 'IblScope', { fg = '#0e0e0e' })
require('ibl').setup({
indent = {
char = '',
highlight = 'IblIndent',
},
scope = {
enabled = true,
show_start = false,
show_end = false,
highlight = 'IblScope',
},
})
end,
},
}