diff --git a/lua/config/options.lua b/lua/config/options.lua index f2606b2..639a5ae 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -3,29 +3,29 @@ vim.cmd('language en_US.utf-8') local opt = vim.opt local indent = 2 -opt.termguicolors = true -- Enable colors in terminal -opt.hlsearch = true --Set highlight on search -opt.number = true --Make line numbers default +opt.termguicolors = true -- Enable colors in terminal +opt.hlsearch = true --Set highlight on search +opt.number = true --Make line numbers default opt.listchars:append('eol:↴') -- opt.listchars:append("space: ") -- opt.listchars:append 'space:⋅' opt.listchars:append('trail: ') opt.listchars:append('tab:→ ') opt.relativenumber = false --Make relative number default -opt.mouse = 'a' --Enable mouse mode -opt.breakindent = true --Enable break indent -opt.undofile = true --Save undo history -opt.ignorecase = true --Case insensitive searching unless /C or capital in search -opt.smartcase = true -- Smart case -opt.updatetime = 300 --Decrease update time -opt.signcolumn = 'yes' -- Always show sign column -opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. +opt.mouse = 'a' --Enable mouse mode +opt.breakindent = true --Enable break indent +opt.undofile = true --Save undo history +opt.ignorecase = true --Case insensitive searching unless /C or capital in search +opt.smartcase = true -- Smart case +opt.updatetime = 300 --Decrease update time +opt.signcolumn = 'yes' -- Always show sign column +opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete. opt.ttimeoutlen = 10 -opt.showmode = false -- Do not need to show the mode. We use the statusline instead. -opt.scrolloff = 999 -- Lines of context -opt.joinspaces = false -- No double spaces with join after a dot -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.showmode = false -- Do not need to show the mode. We use the statusline instead. +opt.scrolloff = 999 -- Lines of context +opt.joinspaces = false -- No double spaces with join after a dot +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.list = true opt.hidden = true opt.winborder = 'none' @@ -118,16 +118,16 @@ vim.diagnostic.config({ signs = { text = { [vim.diagnostic.severity.ERROR] = '', -- Nerd Font Error Icon - [vim.diagnostic.severity.WARN] = '', -- Nerd Font Warning Icon - [vim.diagnostic.severity.INFO] = '', -- Nerd Font Info Icon - [vim.diagnostic.severity.HINT] = '', -- Nerd Font Hint Icon (example) + [vim.diagnostic.severity.WARN] = '', -- Nerd Font Warning Icon + [vim.diagnostic.severity.INFO] = '', -- Nerd Font Info Icon + [vim.diagnostic.severity.HINT] = '', -- Nerd Font Hint Icon (example) }, -- Define the highlight group to use for the sign text for each severity texthl = { [vim.diagnostic.severity.ERROR] = 'DiagnosticSignError', - [vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn', - [vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo', - [vim.diagnostic.severity.HINT] = 'DiagnosticSignHint', + [vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn', + [vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo', + [vim.diagnostic.severity.HINT] = 'DiagnosticSignHint', }, -- Optional: Highlight the line number column numhl = { @@ -143,9 +143,9 @@ vim.diagnostic.config({ -- Other diagnostic configurations (optional examples) virtual_text = 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 - severity_sort = true, -- Sort diagnostics by severity + severity_sort = true, -- Sort diagnostics by severity }) -- Window border for floating windows diff --git a/lua/my_keymappings.lua b/lua/my_keymappings.lua index d6ffec9..eaf3877 100644 --- a/lua/my_keymappings.lua +++ b/lua/my_keymappings.lua @@ -61,9 +61,9 @@ vim.keymap.set({ 'n', 'x' }, 'P', '"+P', { desc = 'Paste from system cli vim.keymap.set('v', 'v', function() local mode = vim.fn.mode() 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 - 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, { noremap = true, silent = true }) diff --git a/lua/plugins/aider.lua b/lua/plugins/aider.lua index 1ef5a37..52cb8bf 100644 --- a/lua/plugins/aider.lua +++ b/lua/plugins/aider.lua @@ -28,5 +28,5 @@ return { }, }, config = true, - enabled = false + enabled = false, } diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index d50c09b..63c7f26 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -30,7 +30,7 @@ return { -- 'echasnovski/mini.pick', -- for file_selector provider mini.pick -- 'nvim-telescope/telescope.nvim', -- for file_selector provider telescope -- '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 -- 'zbirenbaum/copilot.lua', -- for providers='copilot' { diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index 09198f0..e268fa5 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -9,9 +9,9 @@ return { 'fang2hou/blink-copilot', opts = { 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" - } + }, }, 'dmitmel/cmp-cmdline-history', 'onsails/lspkind.nvim', @@ -26,7 +26,7 @@ return { -- make sure to set opts so that lazy.nvim calls blink.compat's setup opts = {}, }, - 'rcarriga/cmp-dap' + 'rcarriga/cmp-dap', }, -- use a release tag to download pre-built binaries @@ -69,7 +69,7 @@ return { 'snippets', 'path', 'buffer', - } + }, }, providers = { @@ -82,7 +82,7 @@ return { -- Local options override global ones -- Final settings: max_completions = 3, max_attempts = 2, kind = "Copilot" max_completions = 3, -- Override global max_completions - } + }, }, lazydev = { name = 'LazyDev', @@ -90,15 +90,15 @@ return { -- make lazydev completions top priority (see `:h blink.cmp`) 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 module = 'blink.compat.source', - async = true + async = true, }, cmdline_history = { name = 'cmdline_history', module = 'blink.compat.source', - score_offset = -50 + score_offset = -50, }, dap = { name = 'dap', @@ -115,12 +115,16 @@ return { -- default to all visible buffers get_bufnrs = function() return vim - .iter(vim.api.nvim_list_wins()) - :map(function(win) return vim.api.nvim_win_get_buf(win) end) - :filter(function(buf) return vim.bo[buf].buftype ~= 'nofile' end) - :totable() + .iter(vim.api.nvim_list_wins()) + :map(function(win) + return vim.api.nvim_win_get_buf(win) + end) + :filter(function(buf) + return vim.bo[buf].buftype ~= 'nofile' + end) + :totable() end, - } + }, }, }, }, @@ -129,9 +133,13 @@ return { sources = function() local type = vim.fn.getcmdtype() -- Search forward and backward - if type == '/' or type == '?' then return { 'buffer' } end + if type == '/' or type == '?' then + return { 'buffer' } + end -- Commands - if type == ':' or type == '@' then return { 'cmdline', 'buffer', 'cmdline_history' } end + if type == ':' or type == '@' then + return { 'cmdline', 'buffer', 'cmdline_history' } + end return {} end, completion = { @@ -142,30 +150,29 @@ return { list = { selection = { auto_insert = false, - preselect = false - } + preselect = false, + }, }, menu = { auto_show = true, -- Inherits from top level `completion.menu.auto_show` config when not set - } + }, }, keymap = { [''] = { 'select_next', 'fallback' }, [''] = { 'select_prev', 'fallback' }, [''] = { 'accept', 'fallback' }, [''] = { 'cancel' }, - } + }, }, completion = { list = { selection = { auto_insert = false, - preselect = false - } + preselect = false, + }, }, - accept = - { + accept = { dot_repeat = false, }, menu = { @@ -213,25 +220,25 @@ return { end return hl end, - } - } + }, + }, }, }, documentation = { auto_show = true, auto_show_delay_ms = 500, - treesitter_highlighting = true + treesitter_highlighting = true, }, }, -- experimental signature help support signature = { enabled = true }, snippets = { - preset = 'luasnip' + preset = 'luasnip', }, }, -- allows extending the providers array elsewhere in your config -- without having to redefine it opts_extend = { 'sources.default' }, - enabled = false + enabled = false, } diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 8abc8b5..c04d06c 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -99,7 +99,7 @@ return { window = { documentation = { - winhighlight = 'Normal:CmpDocumentation' + winhighlight = 'Normal:CmpDocumentation', }, completion = { winhighlight = 'Normal:Pmenu,FloatBorder:Pmenu,Search:None', @@ -111,8 +111,7 @@ return { fields = { 'kind', 'abbr', 'menu' }, expandable_indicator = false, format = function(entry, vim_item) - local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50, show_labelDetails = true })( - entry, vim_item) + local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50, show_labelDetails = true })(entry, vim_item) local strings = vim.split(kind.kind, '%s', { trimempty = true }) kind.kind = ' ' .. (strings[1] or '') .. ' ' kind.menu = ' (' .. (strings[2] or '') .. ')' @@ -130,19 +129,19 @@ return { { name = 'cmdline_history' }, { name = 'path' }, { name = 'buffer' }, - } + }, }) -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = { - { name = 'cmdline', priority = 200 }, - { name = 'path', priority = 3 }, + { name = 'cmdline', priority = 200 }, + { name = 'path', 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, } diff --git a/lua/plugins/codium.lua b/lua/plugins/codium.lua index 7654ef5..64f9a98 100644 --- a/lua/plugins/codium.lua +++ b/lua/plugins/codium.lua @@ -6,5 +6,5 @@ return { config = function() require('codeium').setup({}) end, - enabled = vim.fn.hostname() == 'perryLinux64' + enabled = vim.fn.hostname() == 'perryLinux64', } diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index f96c56b..d65085a 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -1,25 +1,24 @@ -return { - 'zbirenbaum/copilot.lua', - cmd = 'Copilot', - event = 'InsertEnter', - config = function() - require('copilot').setup({ - filetypes = { - yaml = false, - markdown = false, - python = true, - help = false, - gitcommit = false, - gitrebase = false, - hgcommit = false, - svn = false, - cvs = false, - cpp = true, - ['.'] = false, - }, - suggestion = { enabled = false, auto_trigger = false }, - panel = { enabled = false }, - }) - end, -} - +return { + 'zbirenbaum/copilot.lua', + cmd = 'Copilot', + event = 'InsertEnter', + config = function() + require('copilot').setup({ + filetypes = { + yaml = false, + markdown = false, + python = true, + help = false, + gitcommit = false, + gitrebase = false, + hgcommit = false, + svn = false, + cvs = false, + cpp = true, + ['.'] = false, + }, + suggestion = { enabled = false, auto_trigger = false }, + panel = { enabled = false }, + }) + end, +} diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 23885c8..a3bb97b 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -2,7 +2,7 @@ return { 'lewis6991/gitsigns.nvim', branch = 'main', config = function() - require('gitsigns').setup { + require('gitsigns').setup({ current_line_blame = false, current_line_blame_opts = { virt_text = true, @@ -13,56 +13,53 @@ return { on_attach = function(bufnr) local gitsigns = require('gitsigns') - -- Navigation vim.keymap.set('n', ']c', function() - if vim.wo.diff then - vim.cmd.normal({ ']c', bang = true }) - else - gitsigns.nav_hunk('next') - end - end, - { desc = 'Next hunk' } - ) + if vim.wo.diff then + vim.cmd.normal({ ']c', bang = true }) + else + gitsigns.nav_hunk('next') + end + end, { desc = 'Next hunk' }) vim.keymap.set('n', '[c', function() - if vim.wo.diff then - vim.cmd.normal({ '[c', bang = true }) - else - gitsigns.nav_hunk('prev') - end - end, - { desc = 'Previous hunk' } - ) + if vim.wo.diff then + vim.cmd.normal({ '[c', bang = true }) + else + gitsigns.nav_hunk('prev') + end + end, { desc = 'Previous hunk' }) -- Actions vim.keymap.set('n', 'hs', gitsigns.stage_hunk, { desc = 'Stage hunk' }) vim.keymap.set('n', 'hr', gitsigns.reset_hunk, { desc = 'Reset hunk' }) vim.keymap.set('v', 'hs', function() - gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) - end, - { desc = 'Stage hunk' } - ) + gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) + end, { desc = 'Stage hunk' }) vim.keymap.set('v', 'hr', function() - gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) - end, - { desc = 'Reset hunk' } - ) + gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) + end, { desc = 'Reset hunk' }) vim.keymap.set('n', 'hS', gitsigns.stage_buffer, { desc = 'Stage buffer' }) vim.keymap.set('n', 'hR', gitsigns.reset_buffer, { desc = 'Reset buffer' }) vim.keymap.set('n', 'hp', gitsigns.preview_hunk, { desc = 'Preview hunk' }) vim.keymap.set('n', 'hi', gitsigns.preview_hunk_inline, { desc = 'Preview hunk inline' }) - vim.keymap.set('n', 'hb', function() gitsigns.blame_line({ full = true }) end, { desc = 'Blame line' }) + vim.keymap.set('n', 'hb', function() + gitsigns.blame_line({ full = true }) + end, { desc = 'Blame line' }) vim.keymap.set('n', 'hd', gitsigns.diffthis, { desc = 'Diff this' }) - vim.keymap.set('n', 'hD', function() gitsigns.diffthis('~') end, { desc = 'Diff this (cached)' }) + vim.keymap.set('n', 'hD', function() + gitsigns.diffthis('~') + end, { desc = 'Diff this (cached)' }) - vim.keymap.set('n', 'hQ', function() gitsigns.setqflist('all') end, { desc = 'Set quickfix list all' }) + vim.keymap.set('n', 'hQ', function() + gitsigns.setqflist('all') + end, { desc = 'Set quickfix list all' }) vim.keymap.set('n', 'hq', gitsigns.setqflist, { desc = 'Set quickfix list' }) -- Toggles @@ -72,7 +69,7 @@ return { -- Text object vim.keymap.set({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk') - end - } - end + end, + }) + end, } diff --git a/lua/plugins/grug-far.lua b/lua/plugins/grug-far.lua index dfc3395..5e6c7ef 100644 --- a/lua/plugins/grug-far.lua +++ b/lua/plugins/grug-far.lua @@ -1,19 +1,16 @@ return { 'MagicDuck/grug-far.nvim', config = function() - require('grug-far').setup({ - }); + require('grug-far').setup({}) end, - keys = - { + keys = { { '', function() require('grug-far').open() end, desc = 'GrugFar', - mode = { 'n', 'v' } - } - } - + mode = { 'n', 'v' }, + }, + }, } diff --git a/lua/plugins/iron.lua b/lua/plugins/iron.lua index 3dfa469..ce10ed5 100644 --- a/lua/plugins/iron.lua +++ b/lua/plugins/iron.lua @@ -1,63 +1,63 @@ -return { - 'Vigemus/iron.nvim', - branch = 'master', - config = function() - local iron = require('iron.core') - - iron.setup({ - config = { - -- Whether a repl should be discarded or not - scratch_repl = true, - -- Your repl definitions come here - repl_definition = { - sh = { - -- Can be a table or a function that - -- returns a table (see below) - command = { 'zsh' }, - }, - python = { - command = { 'python3' }, -- or { "ipython", "--no-autoindent" } - format = require('iron.fts.common').bracketed_paste_python, - }, - }, - -- How the repl window will be displayed - -- See below for more information - repl_open_cmd = require('iron.view').split.vertical("50%") - }, - -- Iron doesn't set keymaps by default anymore. - -- You can set them here or manually add keymaps to the functions in iron.core - keymaps = { - send_motion = 'sc', - visual_send = 'sc', - send_file = 'sf', - send_line = 'sl', - send_paragraph = 'sp', - send_until_cursor = 'su', - send_mark = 'sm', - mark_motion = 'mc', - mark_visual = 'mc', - remove_mark = 'md', - cr = 's', - interrupt = 's', - exit = 'sq', - clear = 'cl', - }, - -- If the highlight is on, you can change how it looks - -- For the available options, check nvim_set_hl - highlight = { - italic = true, - }, - 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 - end, - cmd = { - 'IronRepl', - 'IronRestart', - 'IronFocus', - 'IronHide', - 'IronRepl', - 'IronReplHere', - }, -} +return { + 'Vigemus/iron.nvim', + branch = 'master', + config = function() + local iron = require('iron.core') + + iron.setup({ + config = { + -- Whether a repl should be discarded or not + scratch_repl = true, + -- Your repl definitions come here + repl_definition = { + sh = { + -- Can be a table or a function that + -- returns a table (see below) + command = { 'zsh' }, + }, + python = { + command = { 'python3' }, -- or { "ipython", "--no-autoindent" } + format = require('iron.fts.common').bracketed_paste_python, + }, + }, + -- How the repl window will be displayed + -- See below for more information + repl_open_cmd = require('iron.view').split.vertical('50%'), + }, + -- Iron doesn't set keymaps by default anymore. + -- You can set them here or manually add keymaps to the functions in iron.core + keymaps = { + send_motion = 'sc', + visual_send = 'sc', + send_file = 'sf', + send_line = 'sl', + send_paragraph = 'sp', + send_until_cursor = 'su', + send_mark = 'sm', + mark_motion = 'mc', + mark_visual = 'mc', + remove_mark = 'md', + cr = 's', + interrupt = 's', + exit = 'sq', + clear = 'cl', + }, + -- If the highlight is on, you can change how it looks + -- For the available options, check nvim_set_hl + highlight = { + italic = true, + }, + 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 + end, + cmd = { + 'IronRepl', + 'IronRestart', + 'IronFocus', + 'IronHide', + 'IronRepl', + 'IronReplHere', + }, +} diff --git a/lua/plugins/lazydev.lua b/lua/plugins/lazydev.lua index 9710f42..e44d7b2 100644 --- a/lua/plugins/lazydev.lua +++ b/lua/plugins/lazydev.lua @@ -14,5 +14,5 @@ return { { 'Bilal2453/luvit-meta', lazy = true, - } + }, } diff --git a/lua/plugins/lsp/server.lua b/lua/plugins/lsp/server.lua index 7c5e0e2..0d7b773 100644 --- a/lua/plugins/lsp/server.lua +++ b/lua/plugins/lsp/server.lua @@ -1,6 +1,5 @@ local M = {} - M.setup_server = function(lspconfig, capabilities, on_attach) -- lspconfig['pyright'].setup { -- capabilities = capabilities, @@ -137,7 +136,6 @@ M.setup_server = function(lspconfig, capabilities, on_attach) } lspconfig.neocmake.setup({}) end - end return M diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 142723c..be88142 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -2,30 +2,20 @@ local lspKeys = function(client, bufnr) local options = { noremap = true, silent = false, buffer = bufnr } vim.keymap.set('n', ',', vim.diagnostic.goto_prev, vim.tbl_extend('error', options, { desc = 'Diag prev' })) vim.keymap.set('n', ';', vim.diagnostic.goto_next, vim.tbl_extend('error', options, { desc = 'Diag next' })) - vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, - vim.tbl_extend('error', options, { desc = 'Code action' })) + vim.keymap.set({ 'n', 'x' }, 'a', vim.lsp.buf.code_action, vim.tbl_extend('error', options, { desc = 'Code action' })) vim.keymap.set('n', 'e', vim.lsp.buf.declaration, vim.tbl_extend('error', options, { desc = 'Declaration' })) - vim.keymap.set('n', 'h', - function() - vim.lsp.buf.hover({ border = 'rounded' }) - end, - vim.tbl_extend('error', options, { desc = 'Hover' })) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, - vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, - vim.tbl_extend('error', options, { desc = 'Incoming calls' })) + vim.keymap.set('n', 'h', function() + vim.lsp.buf.hover({ border = 'rounded' }) + end, vim.tbl_extend('error', options, { desc = 'Hover' })) + vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, vim.tbl_extend('error', options, { desc = 'Outgoing calls' })) + vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, vim.tbl_extend('error', options, { desc = 'Incoming calls' })) vim.keymap.set('n', 'm', vim.lsp.buf.rename, vim.tbl_extend('error', options, { desc = 'Rename' })) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, - vim.tbl_extend('error', options, { desc = 'Type definition' })) - vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, - vim.tbl_extend('error', options, { desc = 'Signature help' })) - vim.keymap.set('n', 'v', - function() - vim.diagnostic.open_float({ border = 'rounded' }) - end, - vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', - vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, vim.tbl_extend('error', options, { desc = 'Type definition' })) + vim.keymap.set({ 'n', 'i', 'x' }, '', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' })) + vim.keymap.set('n', 'v', function() + vim.diagnostic.open_float({ border = 'rounded' }) + end, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) + vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) if client.supports_method('inlayHintProvider') then vim.keymap.set('n', 'i', function() @@ -59,7 +49,7 @@ return { 'Fildo7525/pretty_hover', { 'creativenull/efmls-configs-nvim', - branch = 'main' + branch = 'main', }, 'SmiteshP/nvim-navic', }, diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 342b7af..94b4da8 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -45,7 +45,7 @@ return { cond = function() return package.loaded['nvim-navic'] and require('nvim-navic').is_available() end, - color = { fg = colors.vulgaris.blue } + color = { fg = colors.vulgaris.blue }, }, }, lualine_y = { @@ -122,7 +122,7 @@ return { tabs_color = { -- Same values as the general color option can be used here. active = { bg = 'orange', fg = 'black' }, - inactive = { bg = 'grey'}, + inactive = { bg = 'grey' }, }, }, }, diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 995e4a0..4bd91b6 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -36,7 +36,7 @@ return { 'stylua', 'gersemi', 'cmakelang', - 'ruff' + 'ruff', }, }) end, diff --git a/lua/plugins/render-markdown.lua b/lua/plugins/render-markdown.lua index 125da72..8d260e5 100644 --- a/lua/plugins/render-markdown.lua +++ b/lua/plugins/render-markdown.lua @@ -5,5 +5,5 @@ return { ---@type render.md.UserConfig opts = { completions = { blink = { enabled = true } }, - } + }, } diff --git a/lua/plugins/workspaces.lua b/lua/plugins/workspaces.lua index 9fbd5e9..9ff8cf0 100644 --- a/lua/plugins/workspaces.lua +++ b/lua/plugins/workspaces.lua @@ -41,5 +41,5 @@ return { end, }, }, - enabled = false + enabled = false, } diff --git a/lua/themes/bamboo.lua b/lua/themes/bamboo.lua index 5ce2467..78168ca 100644 --- a/lua/themes/bamboo.lua +++ b/lua/themes/bamboo.lua @@ -5,7 +5,7 @@ return { config = function() local colors = require('bamboo.palette') require('bamboo').setup({ - dim_inactive = false, -- Dim inactive windows/buffers + dim_inactive = false, -- Dim inactive windows/buffers lualine = { transparent = false, -- lualine center bar transparency }, diff --git a/.stylua.toml b/stylua.toml similarity index 100% rename from .stylua.toml rename to stylua.toml