format lua files

This commit is contained in:
Oliver Hartmann 2025-04-09 22:22:12 +02:00
parent 584ad307d6
commit 2b21ea5e4e
20 changed files with 213 additions and 226 deletions

View File

@ -3,29 +3,29 @@ vim.cmd('language en_US.utf-8')
local opt = vim.opt local opt = vim.opt
local indent = 2 local indent = 2
opt.termguicolors = true -- Enable colors in terminal opt.termguicolors = true -- Enable colors in terminal
opt.hlsearch = true --Set highlight on search opt.hlsearch = true --Set highlight on search
opt.number = true --Make line numbers default opt.number = true --Make line numbers default
opt.listchars:append('eol:↴') opt.listchars:append('eol:↴')
-- opt.listchars:append("space: ") -- opt.listchars:append("space: ")
-- opt.listchars:append 'space:⋅' -- opt.listchars:append 'space:⋅'
opt.listchars:append('trail: ') opt.listchars:append('trail: ')
opt.listchars:append('tab:→ ') opt.listchars:append('tab:→ ')
opt.relativenumber = false --Make relative number default opt.relativenumber = false --Make relative number default
opt.mouse = 'a' --Enable mouse mode opt.mouse = 'a' --Enable mouse mode
opt.breakindent = true --Enable break indent opt.breakindent = true --Enable break indent
opt.undofile = true --Save undo history opt.undofile = true --Save undo history
opt.ignorecase = true --Case insensitive searching unless /C or capital in search opt.ignorecase = true --Case insensitive searching unless /C or capital in search
opt.smartcase = true -- Smart case opt.smartcase = true -- Smart case
opt.updatetime = 300 --Decrease update time opt.updatetime = 300 --Decrease update time
opt.signcolumn = 'yes' -- Always show sign column opt.signcolumn = 'yes' -- Always show sign column
opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete.
opt.ttimeoutlen = 10 opt.ttimeoutlen = 10
opt.showmode = false -- Do not need to show the mode. We use the statusline instead. opt.showmode = false -- Do not need to show the mode. We use the statusline instead.
opt.scrolloff = 999 -- Lines of context opt.scrolloff = 999 -- Lines of context
opt.joinspaces = false -- No double spaces with join after a dot opt.joinspaces = false -- No double spaces with join after a dot
opt.showmatch = true -- Show matching braces opt.showmatch = true -- Show matching braces
opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line
opt.list = true opt.list = true
opt.hidden = true opt.hidden = true
opt.winborder = 'none' opt.winborder = 'none'
@ -118,16 +118,16 @@ vim.diagnostic.config({
signs = { signs = {
text = { text = {
[vim.diagnostic.severity.ERROR] = '', -- Nerd Font Error Icon [vim.diagnostic.severity.ERROR] = '', -- Nerd Font Error Icon
[vim.diagnostic.severity.WARN] = '', -- Nerd Font Warning Icon [vim.diagnostic.severity.WARN] = '', -- Nerd Font Warning Icon
[vim.diagnostic.severity.INFO] = '', -- Nerd Font Info Icon [vim.diagnostic.severity.INFO] = '', -- Nerd Font Info Icon
[vim.diagnostic.severity.HINT] = '', -- Nerd Font Hint Icon (example) [vim.diagnostic.severity.HINT] = '', -- Nerd Font Hint Icon (example)
}, },
-- Define the highlight group to use for the sign text for each severity -- Define the highlight group to use for the sign text for each severity
texthl = { texthl = {
[vim.diagnostic.severity.ERROR] = 'DiagnosticSignError', [vim.diagnostic.severity.ERROR] = 'DiagnosticSignError',
[vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn', [vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn',
[vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo', [vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo',
[vim.diagnostic.severity.HINT] = 'DiagnosticSignHint', [vim.diagnostic.severity.HINT] = 'DiagnosticSignHint',
}, },
-- Optional: Highlight the line number column -- Optional: Highlight the line number column
numhl = { numhl = {
@ -143,9 +143,9 @@ vim.diagnostic.config({
-- Other diagnostic configurations (optional examples) -- Other diagnostic configurations (optional examples)
virtual_text = false, virtual_text = false,
virtual_lines = false, virtual_lines = false,
underline = true, -- Enable underlining diagnostics underline = true, -- Enable underlining diagnostics
update_in_insert = false, -- Don't update diagnostics in insert mode update_in_insert = false, -- Don't update diagnostics in insert mode
severity_sort = true, -- Sort diagnostics by severity severity_sort = true, -- Sort diagnostics by severity
}) })
-- Window border for floating windows -- Window border for floating windows

View File

@ -61,9 +61,9 @@ vim.keymap.set({ 'n', 'x' }, '<leader>P', '"+P', { desc = 'Paste from system cli
vim.keymap.set('v', 'v', function() vim.keymap.set('v', 'v', function()
local mode = vim.fn.mode() local mode = vim.fn.mode()
if mode == 'v' then if mode == 'v' then
vim.api.nvim_feedkeys('V', 'n', true) -- Switch to Visual Line mode vim.api.nvim_feedkeys('V', 'n', true) -- Switch to Visual Line mode
elseif mode == 'V' then elseif mode == 'V' then
vim.api.nvim_feedkeys('v', 'n', true) -- Switch to regular Visual mode vim.api.nvim_feedkeys('v', 'n', true) -- Switch to regular Visual mode
end end
end, { noremap = true, silent = true }) end, { noremap = true, silent = true })

View File

@ -28,5 +28,5 @@ return {
}, },
}, },
config = true, config = true,
enabled = false enabled = false,
} }

View File

@ -30,7 +30,7 @@ return {
-- 'echasnovski/mini.pick', -- for file_selector provider mini.pick -- 'echasnovski/mini.pick', -- for file_selector provider mini.pick
-- 'nvim-telescope/telescope.nvim', -- for file_selector provider telescope -- 'nvim-telescope/telescope.nvim', -- for file_selector provider telescope
-- 'hrsh7th/nvim-cmp', -- autocompletion for avante commands and mentions -- 'hrsh7th/nvim-cmp', -- autocompletion for avante commands and mentions
'ibhagwan/fzf-lua', -- for file_selector provider fzf 'ibhagwan/fzf-lua', -- for file_selector provider fzf
'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons 'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons
-- 'zbirenbaum/copilot.lua', -- for providers='copilot' -- 'zbirenbaum/copilot.lua', -- for providers='copilot'
{ {

View File

@ -9,9 +9,9 @@ return {
'fang2hou/blink-copilot', 'fang2hou/blink-copilot',
opts = { opts = {
max_completions = 1, -- Global default for max completions max_completions = 1, -- Global default for max completions
max_attempts = 2, -- Global default for max attempts max_attempts = 2, -- Global default for max attempts
-- `kind` is not set, so the default value is "Copilot" -- `kind` is not set, so the default value is "Copilot"
} },
}, },
'dmitmel/cmp-cmdline-history', 'dmitmel/cmp-cmdline-history',
'onsails/lspkind.nvim', 'onsails/lspkind.nvim',
@ -26,7 +26,7 @@ return {
-- make sure to set opts so that lazy.nvim calls blink.compat's setup -- make sure to set opts so that lazy.nvim calls blink.compat's setup
opts = {}, opts = {},
}, },
'rcarriga/cmp-dap' 'rcarriga/cmp-dap',
}, },
-- use a release tag to download pre-built binaries -- use a release tag to download pre-built binaries
@ -69,7 +69,7 @@ return {
'snippets', 'snippets',
'path', 'path',
'buffer', 'buffer',
} },
}, },
providers = { providers = {
@ -82,7 +82,7 @@ return {
-- Local options override global ones -- Local options override global ones
-- Final settings: max_completions = 3, max_attempts = 2, kind = "Copilot" -- Final settings: max_completions = 3, max_attempts = 2, kind = "Copilot"
max_completions = 3, -- Override global max_completions max_completions = 3, -- Override global max_completions
} },
}, },
lazydev = { lazydev = {
name = 'LazyDev', name = 'LazyDev',
@ -90,15 +90,15 @@ return {
-- make lazydev completions top priority (see `:h blink.cmp`) -- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100, score_offset = 100,
}, },
codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264 codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264
name = 'codeium', -- IMPORTANT: use the same name as you would for nvim-cmp name = 'codeium', -- IMPORTANT: use the same name as you would for nvim-cmp
module = 'blink.compat.source', module = 'blink.compat.source',
async = true async = true,
}, },
cmdline_history = { cmdline_history = {
name = 'cmdline_history', name = 'cmdline_history',
module = 'blink.compat.source', module = 'blink.compat.source',
score_offset = -50 score_offset = -50,
}, },
dap = { dap = {
name = 'dap', name = 'dap',
@ -115,12 +115,16 @@ return {
-- default to all visible buffers -- default to all visible buffers
get_bufnrs = function() get_bufnrs = function()
return vim return vim
.iter(vim.api.nvim_list_wins()) .iter(vim.api.nvim_list_wins())
:map(function(win) return vim.api.nvim_win_get_buf(win) end) :map(function(win)
:filter(function(buf) return vim.bo[buf].buftype ~= 'nofile' end) return vim.api.nvim_win_get_buf(win)
:totable() end)
:filter(function(buf)
return vim.bo[buf].buftype ~= 'nofile'
end)
:totable()
end, end,
} },
}, },
}, },
}, },
@ -129,9 +133,13 @@ return {
sources = function() sources = function()
local type = vim.fn.getcmdtype() local type = vim.fn.getcmdtype()
-- Search forward and backward -- Search forward and backward
if type == '/' or type == '?' then return { 'buffer' } end if type == '/' or type == '?' then
return { 'buffer' }
end
-- Commands -- Commands
if type == ':' or type == '@' then return { 'cmdline', 'buffer', 'cmdline_history' } end if type == ':' or type == '@' then
return { 'cmdline', 'buffer', 'cmdline_history' }
end
return {} return {}
end, end,
completion = { completion = {
@ -142,30 +150,29 @@ return {
list = { list = {
selection = { selection = {
auto_insert = false, auto_insert = false,
preselect = false preselect = false,
} },
}, },
menu = { menu = {
auto_show = true, -- Inherits from top level `completion.menu.auto_show` config when not set auto_show = true, -- Inherits from top level `completion.menu.auto_show` config when not set
} },
}, },
keymap = { keymap = {
['<down>'] = { 'select_next', 'fallback' }, ['<down>'] = { 'select_next', 'fallback' },
['<up>'] = { 'select_prev', 'fallback' }, ['<up>'] = { 'select_prev', 'fallback' },
['<CR>'] = { 'accept', 'fallback' }, ['<CR>'] = { 'accept', 'fallback' },
['<C-e>'] = { 'cancel' }, ['<C-e>'] = { 'cancel' },
} },
}, },
completion = { completion = {
list = { list = {
selection = { selection = {
auto_insert = false, auto_insert = false,
preselect = false preselect = false,
} },
}, },
accept = accept = {
{
dot_repeat = false, dot_repeat = false,
}, },
menu = { menu = {
@ -213,25 +220,25 @@ return {
end end
return hl return hl
end, end,
} },
} },
}, },
}, },
documentation = { documentation = {
auto_show = true, auto_show = true,
auto_show_delay_ms = 500, auto_show_delay_ms = 500,
treesitter_highlighting = true treesitter_highlighting = true,
}, },
}, },
-- experimental signature help support -- experimental signature help support
signature = { enabled = true }, signature = { enabled = true },
snippets = { snippets = {
preset = 'luasnip' preset = 'luasnip',
}, },
}, },
-- allows extending the providers array elsewhere in your config -- allows extending the providers array elsewhere in your config
-- without having to redefine it -- without having to redefine it
opts_extend = { 'sources.default' }, opts_extend = { 'sources.default' },
enabled = false enabled = false,
} }

View File

@ -99,7 +99,7 @@ return {
window = { window = {
documentation = { documentation = {
winhighlight = 'Normal:CmpDocumentation' winhighlight = 'Normal:CmpDocumentation',
}, },
completion = { completion = {
winhighlight = 'Normal:Pmenu,FloatBorder:Pmenu,Search:None', winhighlight = 'Normal:Pmenu,FloatBorder:Pmenu,Search:None',
@ -111,8 +111,7 @@ return {
fields = { 'kind', 'abbr', 'menu' }, fields = { 'kind', 'abbr', 'menu' },
expandable_indicator = false, expandable_indicator = false,
format = function(entry, vim_item) format = function(entry, vim_item)
local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50, show_labelDetails = true })( local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50, show_labelDetails = true })(entry, vim_item)
entry, vim_item)
local strings = vim.split(kind.kind, '%s', { trimempty = true }) local strings = vim.split(kind.kind, '%s', { trimempty = true })
kind.kind = ' ' .. (strings[1] or '') .. ' ' kind.kind = ' ' .. (strings[1] or '') .. ' '
kind.menu = ' (' .. (strings[2] or '') .. ')' kind.menu = ' (' .. (strings[2] or '') .. ')'
@ -130,19 +129,19 @@ return {
{ name = 'cmdline_history' }, { name = 'cmdline_history' },
{ name = 'path' }, { name = 'path' },
{ name = 'buffer' }, { name = 'buffer' },
} },
}) })
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', { cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(), mapping = cmp.mapping.preset.cmdline(),
sources = { sources = {
{ name = 'cmdline', priority = 200 }, { name = 'cmdline', priority = 200 },
{ name = 'path', priority = 3 }, { name = 'path', priority = 3 },
{ name = 'cmdline_history', priority = 3 }, { name = 'cmdline_history', priority = 3 },
{ name = 'buffer', priority = 3 } { name = 'buffer', priority = 3 },
}, },
matching = { disallow_symbol_nonprefix_matching = false } matching = { disallow_symbol_nonprefix_matching = false },
}) })
end end,
} }

View File

@ -6,5 +6,5 @@ return {
config = function() config = function()
require('codeium').setup({}) require('codeium').setup({})
end, end,
enabled = vim.fn.hostname() == 'perryLinux64' enabled = vim.fn.hostname() == 'perryLinux64',
} }

View File

@ -1,25 +1,24 @@
return { return {
'zbirenbaum/copilot.lua', 'zbirenbaum/copilot.lua',
cmd = 'Copilot', cmd = 'Copilot',
event = 'InsertEnter', event = 'InsertEnter',
config = function() config = function()
require('copilot').setup({ require('copilot').setup({
filetypes = { filetypes = {
yaml = false, yaml = false,
markdown = false, markdown = false,
python = true, python = true,
help = false, help = false,
gitcommit = false, gitcommit = false,
gitrebase = false, gitrebase = false,
hgcommit = false, hgcommit = false,
svn = false, svn = false,
cvs = false, cvs = false,
cpp = true, cpp = true,
['.'] = false, ['.'] = false,
}, },
suggestion = { enabled = false, auto_trigger = false }, suggestion = { enabled = false, auto_trigger = false },
panel = { enabled = false }, panel = { enabled = false },
}) })
end, end,
} }

View File

@ -2,7 +2,7 @@ return {
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
branch = 'main', branch = 'main',
config = function() config = function()
require('gitsigns').setup { require('gitsigns').setup({
current_line_blame = false, current_line_blame = false,
current_line_blame_opts = { current_line_blame_opts = {
virt_text = true, virt_text = true,
@ -13,56 +13,53 @@ return {
on_attach = function(bufnr) on_attach = function(bufnr)
local gitsigns = require('gitsigns') local gitsigns = require('gitsigns')
-- Navigation -- Navigation
vim.keymap.set('n', ']c', function() vim.keymap.set('n', ']c', function()
if vim.wo.diff then if vim.wo.diff then
vim.cmd.normal({ ']c', bang = true }) vim.cmd.normal({ ']c', bang = true })
else else
gitsigns.nav_hunk('next') gitsigns.nav_hunk('next')
end end
end, end, { desc = 'Next hunk' })
{ desc = 'Next hunk' }
)
vim.keymap.set('n', '[c', function() vim.keymap.set('n', '[c', function()
if vim.wo.diff then if vim.wo.diff then
vim.cmd.normal({ '[c', bang = true }) vim.cmd.normal({ '[c', bang = true })
else else
gitsigns.nav_hunk('prev') gitsigns.nav_hunk('prev')
end end
end, end, { desc = 'Previous hunk' })
{ desc = 'Previous hunk' }
)
-- Actions -- Actions
vim.keymap.set('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'Stage hunk' }) vim.keymap.set('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'Stage hunk' })
vim.keymap.set('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'Reset hunk' }) vim.keymap.set('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'Reset hunk' })
vim.keymap.set('v', '<leader>hs', function() vim.keymap.set('v', '<leader>hs', function()
gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') })
end, end, { desc = 'Stage hunk' })
{ desc = 'Stage hunk' }
)
vim.keymap.set('v', '<leader>hr', function() vim.keymap.set('v', '<leader>hr', function()
gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') })
end, end, { desc = 'Reset hunk' })
{ desc = 'Reset hunk' }
)
vim.keymap.set('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'Stage buffer' }) vim.keymap.set('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'Stage buffer' })
vim.keymap.set('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'Reset buffer' }) vim.keymap.set('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'Reset buffer' })
vim.keymap.set('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'Preview hunk' }) vim.keymap.set('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'Preview hunk' })
vim.keymap.set('n', '<leader>hi', gitsigns.preview_hunk_inline, { desc = 'Preview hunk inline' }) vim.keymap.set('n', '<leader>hi', gitsigns.preview_hunk_inline, { desc = 'Preview hunk inline' })
vim.keymap.set('n', '<leader>hb', function() gitsigns.blame_line({ full = true }) end, { desc = 'Blame line' }) vim.keymap.set('n', '<leader>hb', function()
gitsigns.blame_line({ full = true })
end, { desc = 'Blame line' })
vim.keymap.set('n', '<leader>hd', gitsigns.diffthis, { desc = 'Diff this' }) vim.keymap.set('n', '<leader>hd', gitsigns.diffthis, { desc = 'Diff this' })
vim.keymap.set('n', '<leader>hD', function() gitsigns.diffthis('~') end, { desc = 'Diff this (cached)' }) vim.keymap.set('n', '<leader>hD', function()
gitsigns.diffthis('~')
end, { desc = 'Diff this (cached)' })
vim.keymap.set('n', '<leader>hQ', function() gitsigns.setqflist('all') end, { desc = 'Set quickfix list all' }) vim.keymap.set('n', '<leader>hQ', function()
gitsigns.setqflist('all')
end, { desc = 'Set quickfix list all' })
vim.keymap.set('n', '<leader>hq', gitsigns.setqflist, { desc = 'Set quickfix list' }) vim.keymap.set('n', '<leader>hq', gitsigns.setqflist, { desc = 'Set quickfix list' })
-- Toggles -- Toggles
@ -72,7 +69,7 @@ return {
-- Text object -- Text object
vim.keymap.set({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>') vim.keymap.set({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
end end,
} })
end end,
} }

View File

@ -1,19 +1,16 @@
return { return {
'MagicDuck/grug-far.nvim', 'MagicDuck/grug-far.nvim',
config = function() config = function()
require('grug-far').setup({ require('grug-far').setup({})
});
end, end,
keys = keys = {
{
{ {
'<C-f>', '<C-f>',
function() function()
require('grug-far').open() require('grug-far').open()
end, end,
desc = 'GrugFar', desc = 'GrugFar',
mode = { 'n', 'v' } mode = { 'n', 'v' },
} },
} },
} }

View File

@ -1,63 +1,63 @@
return { return {
'Vigemus/iron.nvim', 'Vigemus/iron.nvim',
branch = 'master', branch = 'master',
config = function() config = function()
local iron = require('iron.core') local iron = require('iron.core')
iron.setup({ iron.setup({
config = { config = {
-- Whether a repl should be discarded or not -- Whether a repl should be discarded or not
scratch_repl = true, scratch_repl = true,
-- Your repl definitions come here -- Your repl definitions come here
repl_definition = { repl_definition = {
sh = { sh = {
-- Can be a table or a function that -- Can be a table or a function that
-- returns a table (see below) -- returns a table (see below)
command = { 'zsh' }, command = { 'zsh' },
}, },
python = { python = {
command = { 'python3' }, -- or { "ipython", "--no-autoindent" } command = { 'python3' }, -- or { "ipython", "--no-autoindent" }
format = require('iron.fts.common').bracketed_paste_python, format = require('iron.fts.common').bracketed_paste_python,
}, },
}, },
-- How the repl window will be displayed -- How the repl window will be displayed
-- See below for more information -- See below for more information
repl_open_cmd = require('iron.view').split.vertical("50%") repl_open_cmd = require('iron.view').split.vertical('50%'),
}, },
-- Iron doesn't set keymaps by default anymore. -- Iron doesn't set keymaps by default anymore.
-- You can set them here or manually add keymaps to the functions in iron.core -- You can set them here or manually add keymaps to the functions in iron.core
keymaps = { keymaps = {
send_motion = '<space>sc', send_motion = '<space>sc',
visual_send = '<space>sc', visual_send = '<space>sc',
send_file = '<space>sf', send_file = '<space>sf',
send_line = '<space>sl', send_line = '<space>sl',
send_paragraph = '<space>sp', send_paragraph = '<space>sp',
send_until_cursor = '<space>su', send_until_cursor = '<space>su',
send_mark = '<space>sm', send_mark = '<space>sm',
mark_motion = '<space>mc', mark_motion = '<space>mc',
mark_visual = '<space>mc', mark_visual = '<space>mc',
remove_mark = '<space>md', remove_mark = '<space>md',
cr = '<space>s<cr>', cr = '<space>s<cr>',
interrupt = '<space>s<space>', interrupt = '<space>s<space>',
exit = '<space>sq', exit = '<space>sq',
clear = '<space>cl', clear = '<space>cl',
}, },
-- If the highlight is on, you can change how it looks -- If the highlight is on, you can change how it looks
-- For the available options, check nvim_set_hl -- For the available options, check nvim_set_hl
highlight = { highlight = {
italic = true, italic = true,
}, },
ignore_blank_lines = true, -- ignore blank lines when sending visual select lines ignore_blank_lines = true, -- ignore blank lines when sending visual select lines
}) })
-- iron also has a list of commands, see :h iron-commands for all available commands -- iron also has a list of commands, see :h iron-commands for all available commands
end, end,
cmd = { cmd = {
'IronRepl', 'IronRepl',
'IronRestart', 'IronRestart',
'IronFocus', 'IronFocus',
'IronHide', 'IronHide',
'IronRepl', 'IronRepl',
'IronReplHere', 'IronReplHere',
}, },
} }

View File

@ -14,5 +14,5 @@ return {
{ {
'Bilal2453/luvit-meta', 'Bilal2453/luvit-meta',
lazy = true, lazy = true,
} },
} }

View File

@ -1,6 +1,5 @@
local M = {} local M = {}
M.setup_server = function(lspconfig, capabilities, on_attach) M.setup_server = function(lspconfig, capabilities, on_attach)
-- lspconfig['pyright'].setup { -- lspconfig['pyright'].setup {
-- capabilities = capabilities, -- capabilities = capabilities,
@ -137,7 +136,6 @@ M.setup_server = function(lspconfig, capabilities, on_attach)
} }
lspconfig.neocmake.setup({}) lspconfig.neocmake.setup({})
end end
end end
return M return M

View File

@ -2,30 +2,20 @@ local lspKeys = function(client, bufnr)
local options = { noremap = true, silent = false, buffer = bufnr } local options = { noremap = true, silent = false, buffer = bufnr }
vim.keymap.set('n', '<space>,', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' })) vim.keymap.set('n', '<space>,', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' }))
vim.keymap.set('n', '<space>;', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' })) vim.keymap.set('n', '<space>;', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' }))
vim.keymap.set({ 'n', 'x' }, '<space>a', vim.lsp.buf.code_action, vim.keymap.set({ 'n', 'x' }, '<space>a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' }))
vim.tbl_extend('error', options, { desc = 'Code action' }))
vim.keymap.set('n', '<space>e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) vim.keymap.set('n', '<space>e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' }))
vim.keymap.set('n', '<space>h', vim.keymap.set('n', '<space>h', function()
function() vim.lsp.buf.hover({ border = 'rounded' })
vim.lsp.buf.hover({ border = 'rounded' }) end, vim.tbl_extend('error', options, { desc = 'Hover' }))
end, vim.keymap.set('n', '<space>c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' }))
vim.tbl_extend('error', options, { desc = 'Hover' })) vim.keymap.set('n', '<space>C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' }))
vim.keymap.set('n', '<space>c', vim.lsp.buf.outgoing_calls,
vim.tbl_extend('error', options, { desc = 'Outgoing calls' }))
vim.keymap.set('n', '<space>C', vim.lsp.buf.incoming_calls,
vim.tbl_extend('error', options, { desc = 'Incoming calls' }))
vim.keymap.set('n', '<space>m', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) vim.keymap.set('n', '<space>m', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' }))
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' }))
vim.tbl_extend('error', options, { desc = 'Type definition' })) vim.keymap.set({ 'n', 'i', 'x' }, '<C-k>', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' }))
vim.keymap.set({ 'n', 'i', 'x' }, '<C-k>', vim.lsp.buf.signature_help, vim.keymap.set('n', '<space>v', function()
vim.tbl_extend('error', options, { desc = 'Signature help' })) vim.diagnostic.open_float({ border = 'rounded' })
vim.keymap.set('n', '<space>v', end, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' }))
function() vim.keymap.set('n', '<A-o>', '<cmd>ClangdSwitchSourceHeader<CR>', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' }))
vim.diagnostic.open_float({ border = 'rounded' })
end,
vim.tbl_extend('error', options, { desc = 'Diagnostics Float' }))
vim.keymap.set('n', '<A-o>', '<cmd>ClangdSwitchSourceHeader<CR>',
vim.tbl_extend('error', options, { desc = 'Switch Source/Header' }))
if client.supports_method('inlayHintProvider') then if client.supports_method('inlayHintProvider') then
vim.keymap.set('n', '<space>i', function() vim.keymap.set('n', '<space>i', function()
@ -59,7 +49,7 @@ return {
'Fildo7525/pretty_hover', 'Fildo7525/pretty_hover',
{ {
'creativenull/efmls-configs-nvim', 'creativenull/efmls-configs-nvim',
branch = 'main' branch = 'main',
}, },
'SmiteshP/nvim-navic', 'SmiteshP/nvim-navic',
}, },

View File

@ -45,7 +45,7 @@ return {
cond = function() cond = function()
return package.loaded['nvim-navic'] and require('nvim-navic').is_available() return package.loaded['nvim-navic'] and require('nvim-navic').is_available()
end, end,
color = { fg = colors.vulgaris.blue } color = { fg = colors.vulgaris.blue },
}, },
}, },
lualine_y = { lualine_y = {
@ -122,7 +122,7 @@ return {
tabs_color = { tabs_color = {
-- Same values as the general color option can be used here. -- Same values as the general color option can be used here.
active = { bg = 'orange', fg = 'black' }, active = { bg = 'orange', fg = 'black' },
inactive = { bg = 'grey'}, inactive = { bg = 'grey' },
}, },
}, },
}, },

View File

@ -36,7 +36,7 @@ return {
'stylua', 'stylua',
'gersemi', 'gersemi',
'cmakelang', 'cmakelang',
'ruff' 'ruff',
}, },
}) })
end, end,

View File

@ -5,5 +5,5 @@ return {
---@type render.md.UserConfig ---@type render.md.UserConfig
opts = { opts = {
completions = { blink = { enabled = true } }, completions = { blink = { enabled = true } },
} },
} }

View File

@ -41,5 +41,5 @@ return {
end, end,
}, },
}, },
enabled = false enabled = false,
} }

View File

@ -5,7 +5,7 @@ return {
config = function() config = function()
local colors = require('bamboo.palette') local colors = require('bamboo.palette')
require('bamboo').setup({ require('bamboo').setup({
dim_inactive = false, -- Dim inactive windows/buffers dim_inactive = false, -- Dim inactive windows/buffers
lualine = { lualine = {
transparent = false, -- lualine center bar transparency transparent = false, -- lualine center bar transparency
}, },