diff --git a/lazy-lock.json b/lazy-lock.json index 93af781..17941bb 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -5,35 +5,33 @@ "blink.compat": { "branch": "main", "commit": "1454f14a8d855a578ceeba77c62538fa1459a67c" }, "catppuccin": { "branch": "main", "commit": "426dbebe06b5c69fd846ceb17b42e12f890aedf1" }, "cloak.nvim": { "branch": "main", "commit": "648aca6d33ec011dc3166e7af3b38820d01a71e4" }, - "codecompanion.nvim": { "branch": "main", "commit": "0d618f9de6a807b2abe2f69cb4e02fd1623e6224" }, - "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" }, + "conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "elixir-tools.nvim": { "branch": "main", "commit": "b51b48edc668924a6b2f6610f9a0aff34741d20e" }, "emoji.nvim": { "branch": "main", "commit": "a79e45d35853bb6446638f4d74c6f778ddebd8e3" }, "fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "gitlab-duo": { "branch": "main", "commit": "cb750761acf8dc17f4f1051d1b4ade6c0aaeb432" }, - "gitlab.nvim": { "branch": "main", "commit": "19c688309a8a101d7506c626ba12a16ac93baf21" }, - "gitsigns.nvim": { "branch": "main", "commit": "8d82c240f190fc33723d48c308ccc1ed8baad69d" }, - "go.nvim": { "branch": "master", "commit": "ed77921e3f0bdf9e52cf9fab2e0f4c69ef2a7e04" }, - "guihua.lua": { "branch": "master", "commit": "d178056728548ed8a99cce94de47b7500bd6889a" }, + "gitlab.nvim": { "branch": "main", "commit": "f01ccbdaef7e8460af72c75be65f5f359928a0b4" }, + "gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" }, + "go.nvim": { "branch": "master", "commit": "5c741a26f5df77c95d42d8f48e7008aea10e5f4f" }, + "guihua.lua": { "branch": "master", "commit": "7c364432c2f9153ed068f4eab1989edd9f3fd302" }, "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, "kulala.nvim": { "branch": "main", "commit": "6656c9d332735ca6a27725e0fb45a1715c4372d9" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "lsp_signature.nvim": { "branch": "master", "commit": "a65b38f260cc3470a05b4afb84c8d868617d476d" }, + "lsp_signature.nvim": { "branch": "master", "commit": "f40bcf203812beaf26766ec0bc169a7f429fd730" }, "lspkind.nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" }, - "lualine.nvim": { "branch": "master", "commit": "a905eeebc4e63fdc48b5135d3bf8aea5618fb21c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "0a3b42c3e503df87aef6d6513e13148381495c3a" }, - "mason.nvim": { "branch": "main", "commit": "b03fb0f20bc1d43daf558cda981a2be22e73ac42" }, - "mini.nvim": { "branch": "main", "commit": "418ef4930ddabe80f449c6f1323f8b6abb172d1c" }, + "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1423254f58a3407a5afd5ade0ccd901f3eecc6ba" }, + "mason.nvim": { "branch": "main", "commit": "cb8445f8ce85d957416c106b780efd51c6298f89" }, + "mini.nvim": { "branch": "main", "commit": "48555f1615f08c6318150aacb52bf7d61a5af798" }, "neoscroll.nvim": { "branch": "master", "commit": "c8d29979cb0cb3a2437a8e0ae683fd82f340d3b8" }, - "neotest": { "branch": "master", "commit": "fd0b7986dd0ae04e38ec7dc0c78a432e3820839c" }, + "neotest": { "branch": "master", "commit": "ad991822b7076b1d940b33a9d6d0d30416d5df81" }, "neotest-elixir": { "branch": "master", "commit": "a242aebeaa6997c1c149138ff77f6cacbe33b6fc" }, "neotest-go": { "branch": "main", "commit": "59b50505053f9c45a9febb79e11a56206c3e3901" }, "neotest-jest": { "branch": "main", "commit": "0e7979d51301dfae5ef839d771bd28cf593fde3f" }, "neotest-python": { "branch": "master", "commit": "e6df4f1892f6137f58135917db24d1655937d831" }, "neotest-rust": { "branch": "main", "commit": "2c9941d4a358839918fac21d20fc8fef0e1ad05f" }, - "neovim-tips": { "branch": "master", "commit": "a43725396a81bd73afcb6a13a94ea3c842bad32f" }, + "neovim-tips": { "branch": "master", "commit": "1339a0da1ff59fab8cfc07661ef92aa8c7d07f79" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-colorizer.lua": { "branch": "master", "commit": "5cfe7fffbd01e17b3c1e14af85d5febdef88bd8c" }, @@ -44,7 +42,7 @@ "nvim-devdocs": { "branch": "master", "commit": "668e25f06da43c7b5e95c2419c9864076bb3bd9c" }, "nvim-jqx": { "branch": "master", "commit": "07393e80fa8097e82f9038fec05e948fe8a60fd1" }, "nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" }, - "nvim-lspconfig": { "branch": "master", "commit": "4b7fbaa239c5db6b36f424a4521ca9f1a401be33" }, + "nvim-lspconfig": { "branch": "master", "commit": "cd576dd72d31ddffcbfa6d064c0dd697ca218758" }, "nvim-man": { "branch": "master", "commit": "7fe6b3b78c71c9ef834c49e3dcbd955f7ed5c6cb" }, "nvim-navic": { "branch": "master", "commit": "f5eba192f39b453675d115351808bd51276d9de5" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, @@ -54,21 +52,21 @@ "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, "nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" }, "nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" }, - "nvim-web-devicons": { "branch": "master", "commit": "c72328a5494b4502947a022fe69c0c47e53b6aa6" }, + "nvim-web-devicons": { "branch": "master", "commit": "4fc505ac7bd7692824a142e96e5f529c133862f8" }, "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, - "octo.nvim": { "branch": "master", "commit": "65550fa020775fb18e6eacab86b80145560bfd9c" }, + "octo.nvim": { "branch": "master", "commit": "bbd903ce905c301ac516d64c33b2511a05f6b59b" }, "overseer.nvim": { "branch": "master", "commit": "f818eefff81f4b12fb7cf236f1b6c16768a2fcbc" }, "package-info.nvim": { "branch": "master", "commit": "9725099fb118bab8360e560c1219bff60763b7e1" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "pr-description.nvim": { "branch": "main", "commit": "76fbca834059448a88cb682e4bc064f49cb9f7a3" }, "profile.nvim": { "branch": "master", "commit": "30433d7513f0d14665c1cfcea501c90f8a63e003" }, "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, - "refactoring.nvim": { "branch": "master", "commit": "6784b54587e6d8a6b9ea199318512170ffb9e418" }, - "render-markdown.nvim": { "branch": "main", "commit": "0fd43fb4b1f073931c4b481f5f3b7cea3749e190" }, - "smart-splits.nvim": { "branch": "master", "commit": "ba2850ff3d3b09785a7105c69d06a12117d4b97d" }, + "refactoring.nvim": { "branch": "master", "commit": "29bada48407a9e00d670207d00bbdc0c46c5dc58" }, + "render-markdown.nvim": { "branch": "main", "commit": "629eb9533ec989d9d5c6cab8f3ad5372422c24e0" }, + "smart-splits.nvim": { "branch": "master", "commit": "80be31a3d2e37d32bd37794da72a4f69fce7a85f" }, "smartcolumn.nvim": { "branch": "main", "commit": "b9cdbdf42f7ac5a659204cd5926017c7ff724a19" }, "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" }, "telescope-terraform.nvim": { "branch": "main", "commit": "072c97023797ca1a874668aaa6ae0b74425335df" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index e0b5a93..83cd13c 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -36,6 +36,97 @@ keymap.set("n", "[", "tabprevious", { desc = "Previous Tab keymap.set("n", "gt", "tabnext", { desc = "Next Tab" }) keymap.set("n", "gT", "tabprevious", { desc = "Previous Tab" }) +-- Box-drawing & arrow picker (insert at cursor) +local box_chars = { + { text = "─ horizontal", char = "─" }, + { text = "│ vertical", char = "│" }, + { text = "┌ corner top-left", char = "┌" }, + { text = "┐ corner top-right", char = "┐" }, + { text = "└ corner bot-left", char = "└" }, + { text = "┘ corner bot-right", char = "┘" }, + { text = "├ tee right", char = "├" }, + { text = "┤ tee left", char = "┤" }, + { text = "┬ tee down", char = "┬" }, + { text = "┴ tee up", char = "┴" }, + { text = "┼ cross", char = "┼" }, + { text = "╭ round top-left", char = "╭" }, + { text = "╮ round top-right", char = "╮" }, + { text = "╰ round bot-left", char = "╰" }, + { text = "╯ round bot-right", char = "╯" }, + { text = "═ double horizontal", char = "═" }, + { text = "║ double vertical", char = "║" }, + { text = "▶ arrow right", char = "▶" }, + { text = "◀ arrow left", char = "◀" }, + { text = "▲ arrow up", char = "▲" }, + { text = "▼ arrow down", char = "▼" }, + { text = "→ thin arrow right", char = "→" }, + { text = "← thin arrow left", char = "←" }, + { text = "↑ thin arrow up", char = "↑" }, + { text = "↓ thin arrow down", char = "↓" }, +} + +keymap.set({ "n", "i" }, "ub", function() + local mode = vim.api.nvim_get_mode().mode + Snacks.picker.pick({ + source = "box_chars", + items = box_chars, + format = "text", + layout = { preset = "select" }, + confirm = function(picker, item) + picker:close() + if not item then return end + vim.schedule(function() + if mode:sub(1, 1) == "i" then + vim.api.nvim_put({ item.char }, "c", false, true) + vim.cmd("startinsert") + else + vim.api.nvim_put({ item.char }, "c", true, true) + end + end) + end, + }) +end, { desc = "Pick box-drawing char" }) + +-- Wrap selected lines in a box +local function box_wrap(opts) + local s_line = opts.line1 + local e_line = opts.line2 + local lines = vim.api.nvim_buf_get_lines(0, s_line - 1, e_line, false) + + local max = 0 + for i, l in ipairs(lines) do + lines[i] = l:gsub("%s+$", "") + local w = vim.fn.strdisplaywidth(lines[i]) + if w > max then max = w end + end + + local style = opts.args ~= "" and opts.args or "round" + local styles = { + round = { tl = "╭", tr = "╮", bl = "╰", br = "╯", h = "─", v = "│" }, + sharp = { tl = "┌", tr = "┐", bl = "└", br = "┘", h = "─", v = "│" }, + double = { tl = "╔", tr = "╗", bl = "╚", br = "╝", h = "═", v = "║" }, + } + local s = styles[style] or styles.round + + local out = { s.tl .. s.h:rep(max + 2) .. s.tr } + for _, l in ipairs(lines) do + local pad = max - vim.fn.strdisplaywidth(l) + table.insert(out, s.v .. " " .. l .. string.rep(" ", pad) .. " " .. s.v) + end + table.insert(out, s.bl .. s.h:rep(max + 2) .. s.br) + + vim.api.nvim_buf_set_lines(0, s_line - 1, e_line, false, out) +end + +vim.api.nvim_create_user_command("Box", box_wrap, { + range = true, + nargs = "?", + complete = function() return { "round", "sharp", "double" } end, + desc = "Wrap selected lines in a box (round|sharp|double)", +}) + +keymap.set("v", "ub", ":Box", { desc = "Box-wrap selection" }) + -- Sesh - tmux session picker keymap.set("n", "fs", function() vim.fn.system([[ diff --git a/lua/plugins/codecompanion.lua b/lua/plugins/codecompanion.lua deleted file mode 100644 index 9e14cbc..0000000 --- a/lua/plugins/codecompanion.lua +++ /dev/null @@ -1,63 +0,0 @@ -return { - "olimorris/codecompanion.nvim", - lazy = false, - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - }, - opts = { - strategies = { - chat = { - adapter = "llama_server", - }, - inline = { - adapter = "llama_server", - }, - }, - adapters = { - http = { - llama_server = function() - return require("codecompanion.adapters").extend("openai_compatible", { - name = "llama_server", - env = { - url = "http://127.0.0.1:8080", - api_key = "sk-no-key-required", -- pragma: allowlist secret - }, - schema = { - model = { - default = "local-model", - }, - stream = { - default = true, - }, - }, - -- Disable Qwen3 thinking mode for cleaner inline responses - parameters = { - stop = { "", "" }, - }, - }) - end, - -- DeepSeek R1 with reasoning support - deepseek_local = function() - return require("codecompanion.adapters").extend("deepseek", { - name = "deepseek_local", - env = { - url = "http://127.0.0.1:8080", - api_key = "sk-no-key-required", -- pragma: allowlist secret - }, - schema = { - model = { - default = "local-model", - }, - }, - }) - end, - }, - }, - }, - keys = { - { "cc", "CodeCompanionChat Toggle", desc = "Toggle CodeCompanion Chat" }, - { "ca", "CodeCompanionActions", desc = "CodeCompanion Actions" }, - { "ci", "CodeCompanion", mode = { "n", "v" }, desc = "Inline CodeCompanion" }, - }, -} diff --git a/lua/plugins/gitlab-duo.lua b/lua/plugins/gitlab-duo.lua deleted file mode 100644 index e6a2b6d..0000000 --- a/lua/plugins/gitlab-duo.lua +++ /dev/null @@ -1,73 +0,0 @@ -return { - "https://gitlab.com/gitlab-org/editor-extensions/gitlab.vim.git", - name = "gitlab-duo", - enabled = false, - event = { "BufReadPre", "BufNewFile" }, - ft = { - "go", - "javascript", - "typescript", - "python", - "ruby", - "lua", - "rust", - "c", - "cpp", - "java", - "php", - }, - cond = function() - -- Check if glab is available or GITLAB_TOKEN is set - if vim.env.GITLAB_TOKEN and vim.env.GITLAB_TOKEN ~= "" then - return true - end - local glab_check = vim.fn.system("command -v glab 2>/dev/null") - return glab_check ~= "" - end, - init = function() - local function get_gitlab_token() - if vim.env.GITLAB_TOKEN and vim.env.GITLAB_TOKEN ~= "" then - return vim.env.GITLAB_TOKEN - end - local token = vim.fn.system("glab config get -h gitlab.com token 2>/dev/null"):gsub("%s+", "") - if token ~= "" then - return token - end - local auth_output = vim.fn.system("glab auth status -t 2>&1") - token = auth_output:match("Token:%s*(%S+)") - return token - end - - local token = get_gitlab_token() - if token then - vim.env.GITLAB_TOKEN = token - end - end, - opts = { - statusline = { - enabled = true, - }, - code_suggestions = { - auto_filetypes = { - "go", - "javascript", - "typescript", - "python", - "ruby", - "lua", - "rust", - "c", - "cpp", - "java", - "php", - }, - ghost_text = { - enabled = true, - toggle_enabled = "", - accept_suggestion = "", - clear_suggestions = "", - stream = true, - }, - }, - }, -} diff --git a/lua/plugins/luasnip.lua b/lua/plugins/luasnip.lua index 2d88bc5..b227f3c 100644 --- a/lua/plugins/luasnip.lua +++ b/lua/plugins/luasnip.lua @@ -160,7 +160,7 @@ return { ), }) - vim.keymap.set({ "i" }, "", function() + vim.keymap.set({ "i" }, "", function() luasnip.expand() end, { silent = true }) vim.keymap.set({ "i", "s" }, "", function() diff --git a/lua/plugins/nvim-silicon.lua b/lua/plugins/nvim-silicon.lua index f6d3924..2756be3 100644 --- a/lua/plugins/nvim-silicon.lua +++ b/lua/plugins/nvim-silicon.lua @@ -4,7 +4,7 @@ return { cmd = "Silicon", config = function() require("silicon").setup({ - font = "JetBrainsMono Nerd Font=34;Noto Color Emoji=34", + -- font = "JetBrainsMono Nerd Font=34;Noto Color Emoji=34", theme = "Dracula", background = "#AAAAFF", shadow_color = "#555555", @@ -14,8 +14,8 @@ return { shadow_blur_radius = 0, shadow_offset_x = 0, shadow_offset_y = 0, - line_number = false, -- Use false to avoid --no-line-number flag - round_corner = false, -- Use false to avoid --no-round-corner flag + line_number = false, -- Use false to avoid --no-line-number flag + round_corner = false, -- Use false to avoid --no-round-corner flag window_controls = false, -- Use false to avoid --no-window-controls flag output = function() return "~/Pictures/silicon-" .. os.date("%Y-%m-%d-%H%M%S") .. ".png" diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua index 4a826bb..6b50fa3 100644 --- a/lua/plugins/todo-comments.lua +++ b/lua/plugins/todo-comments.lua @@ -2,7 +2,6 @@ return { "folke/todo-comments.nvim", lazy = false, dependencies = { "nvim-lua/plenary.nvim", "folke/snacks.nvim" }, - -- TODO: help opts = {}, keys = { {