diff --git a/.config/nvim/lsp/asm_lsp.lua b/.config/nvim/lsp/asm_lsp.lua index caddea0..84c633f 100644 --- a/.config/nvim/lsp/asm_lsp.lua +++ b/.config/nvim/lsp/asm_lsp.lua @@ -1,7 +1,6 @@ -- https://github.com/bergercookie/asm-lsp return { - mason = false, cmd = { 'asm-lsp' }, filetypes = { 'asm', 'vmasm' }, root_markers = { '.asm-lsp.toml', '.git' }, diff --git a/.config/nvim/lsp/clangd.lua b/.config/nvim/lsp/clangd.lua index 01ae2e1..dc5519d 100644 --- a/.config/nvim/lsp/clangd.lua +++ b/.config/nvim/lsp/clangd.lua @@ -58,7 +58,6 @@ local function symbol_info() end return { - mason = false, cmd = { 'clangd', '--background-index', @@ -100,7 +99,7 @@ return { symbol_info() end, { desc = 'Show symbol info' }) - vim.keymap.set('n', 'H', 'ClangdSwitchSourceHeader', { desc = '[H]eader and Source Switcher' }) + vim.keymap.set('n', 'H', 'ClangdSwitchSourceHeader', { desc = '[H]eader and Source Switcher' }) vim.keymap.set('n', 'K', 'lua require("pretty_hover").hover()', { desc = 'Documentation Hover' }) -- TODO: do I need pretty_hover? maybe that's what causes issues? end, diff --git a/.config/nvim/lsp/zls.lua b/.config/nvim/lsp/zls.lua index 32120d3..94e2d26 100644 --- a/.config/nvim/lsp/zls.lua +++ b/.config/nvim/lsp/zls.lua @@ -1,7 +1,6 @@ -- https://github.com/zigtools/zls return { - mason = false, cmd = { 'zls' }, filetypes = { 'zig', 'zir' }, root_markers = { 'zls.json', 'build.zig', '.git' }, diff --git a/.config/nvim/lua/keymaps.lua b/.config/nvim/lua/keymaps.lua index 3677269..950d212 100644 --- a/.config/nvim/lua/keymaps.lua +++ b/.config/nvim/lua/keymaps.lua @@ -51,8 +51,6 @@ set('i', '', '', { desc = 'Ctrl + Backspace to delete word' }) set('n', '', 'nohlsearch', { silent = true }) set({ 'i', 'c' }, '', paste) set('n', 'z', toggle_zen, { desc = '[Z]en Mode', silent = true }) -set('n', '', 'bprevious', { desc = 'Prev Buffer' }) -set('n', '', 'bnext', { desc = 'Next Buffer' }) set('n', '', 'e #', { desc = 'Switch to Other Buffer' }) unbind({ 'i', 'n', 'v' }, '') @@ -123,13 +121,6 @@ local keymaps = { { 'n', 'D', cursor_diagnostics, { desc = '[D]iagnostics under cursor' } }, } -for _, ft in ipairs({ 'c', 'h', 'cpp', 'hpp' }) do - keymaps[ft] = { - { 'n', 'H', 'ClangdSwitchSourceHeader', { desc = '[H]eader and Source Switcher' } }, - { 'n', 'K', 'lua require("pretty_hover").hover()', { desc = 'Documentation Hover' } }, - } -end - local function set_keymaps(tbl, bufnr) for _, keymap in ipairs(tbl) do local mode = keymap[1] diff --git a/.config/nvim/lua/plugins/blink-cmp.lua b/.config/nvim/lua/plugins/blink-cmp.lua index 08b5f44..14fc978 100644 --- a/.config/nvim/lua/plugins/blink-cmp.lua +++ b/.config/nvim/lua/plugins/blink-cmp.lua @@ -71,7 +71,7 @@ return { lazydev = { name = 'LazyDev', module = 'lazydev.integrations.blink', - score_offset = 100, -- prioritize lazydev + score_offset = 100, -- show at a higher priority than lsp }, git = { module = 'blink-cmp-git', @@ -118,12 +118,14 @@ return { Method = '󰊕', Function = '󰊕', Constructor = '󰒓', + -- Constructor = " ", Field = '󰜢', Variable = '󰆦', Property = '󰖷', Class = '󱡠', + -- Class = " ", Interface = '󱡠', Struct = '󱡠', Module = '󰅩', @@ -137,8 +139,11 @@ return { Constant = '󰏿', Snippet = '', + -- Snippet = "󱄽 ", Color = '󰏘', + -- Color = " ", File = '󰈔', + -- File = " ", Reference = '󰬲', Folder = '󰉋', Event = '󱐋', @@ -152,3 +157,39 @@ return { -- TODO: pressing backk (deleting), should re-show completion menu -- TODO: ghost text only for LLMs? } + +-- From LazyVim +-- Array = " ", +-- Boolean = "󰨙 ", +-- Codeium = "󰘦 ", +-- Control = " ", +-- Collapsed = " ", +-- Copilot = " ", +-- Enum = " ", +-- EnumMember = " ", +-- Event = " ", +-- Field = " ", +-- Folder = " ", +-- Function = "󰊕 ", +-- Interface = " ", +-- Key = " ", +-- Keyword = " ", +-- Method = "󰊕 ", +-- Module = " ", +-- Namespace = "󰦮 ", +-- Null = " ", +-- Number = "󰎠 ", +-- Object = " ", +-- Operator = " ", +-- Package = " ", +-- Property = " ", +-- Reference = " ", +-- String = " ", +-- Struct = "󰆼 ", +-- Supermaven = " ", +-- TabNine = "󰏚 ", +-- Text = " ", +-- TypeParameter = " ", +-- Unit = " ", +-- Value = " ", +-- Variable = "󰀫 ", diff --git a/.config/nvim/lua/plugins/harpoon.lua b/.config/nvim/lua/plugins/harpoon.lua index 9f20935..b54248d 100644 --- a/.config/nvim/lua/plugins/harpoon.lua +++ b/.config/nvim/lua/plugins/harpoon.lua @@ -17,7 +17,11 @@ return { }, config = function() local harpoon = require('harpoon') - harpoon:setup() + harpoon:setup({ + settings = { + save_on_toggle = true, + }, + }) vim.keymap.set('n', 'a', function() harpoon:list():add() diff --git a/.config/nvim/lua/plugins/octo.lua b/.config/nvim/lua/plugins/octo.lua index ccb518d..025c488 100644 --- a/.config/nvim/lua/plugins/octo.lua +++ b/.config/nvim/lua/plugins/octo.lua @@ -26,10 +26,26 @@ return { { '@', '', mode = 'i', ft = 'octo', silent = true }, { '#', '', mode = 'i', ft = 'octo', silent = true }, }, - opts = { - enable_builtin = true, - -- default_to_projects_v2 = true, - default_merge_method = 'squash', - picker = 'snacks', - }, + opts = function() + -- Keep some empty windows in sessions + vim.api.nvim_create_autocmd('ExitPre', { + group = vim.api.nvim_create_augroup('octo_exit_pre', { clear = true }), + callback = function(_) + local keep = { 'octo' } + for _, win in ipairs(vim.api.nvim_list_wins()) do + local buf = vim.api.nvim_win_get_buf(win) + if vim.tbl_contains(keep, vim.bo[buf].filetype) then + vim.bo[buf].buftype = '' -- set buftype to empty to keep the window + end + end + end, + }) + + return { + enable_builtin = true, + -- default_to_projects_v2 = true, + default_merge_method = 'squash', + picker = 'snacks', + } + end, } diff --git a/.config/nvim/lua/plugins/snacks.lua b/.config/nvim/lua/plugins/snacks.lua index 112723e..0105947 100644 --- a/.config/nvim/lua/plugins/snacks.lua +++ b/.config/nvim/lua/plugins/snacks.lua @@ -134,7 +134,7 @@ return { { 'nh', function() - Snacks.picker.notifications({ layout = 'telescope' }) + Snacks.picker.notifications({ layout = 'dropdown' }) end, desc = '[N]otification [H]istory', },