From 4d3c4b5ecd937a928bc2b5df3f7451d07439ac1d Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Sat, 3 May 2025 19:03:16 +0300 Subject: A few small changes to nvim config --- .config/nvim/lua/plugins/blink-cmp.lua | 43 +++++++++++++++++++++++++++++++++- .config/nvim/lua/plugins/harpoon.lua | 6 ++++- .config/nvim/lua/plugins/octo.lua | 28 +++++++++++++++++----- .config/nvim/lua/plugins/snacks.lua | 2 +- 4 files changed, 70 insertions(+), 9 deletions(-) (limited to '.config/nvim/lua/plugins') 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', }, -- cgit v1.3.1