From 54bafa94a72aac9caffe54afc7974836e635a6d3 Mon Sep 17 00:00:00 2001 From: pmcc Date: Mon, 5 Oct 2026 12:59:47 -0400 Subject: [PATCH] update --- dot_config/nvim/lua/config/lsp.lua | 2 +- dot_config/nvim/lua/plugins/bufferline.lua | 43 +++++++++++++++++++ dot_config/nvim/lua/plugins/illuminate.lua | 32 ++++++++++++++ dot_config/nvim/lua/plugins/init.lua | 2 + dot_config/nvim/lua/plugins/minuet.lua | 50 ++++++++++++++++++++++ dot_config/nvim/lua/plugins/neotree.lua | 27 +++++++++++- dot_config/nvim/lua/plugins/theme.lua | 4 ++ dot_config/nvim/nvim-pack-lock.json | 33 ++++++++------ 8 files changed, 179 insertions(+), 14 deletions(-) create mode 100644 dot_config/nvim/lua/plugins/bufferline.lua create mode 100644 dot_config/nvim/lua/plugins/illuminate.lua create mode 100644 dot_config/nvim/lua/plugins/minuet.lua diff --git a/dot_config/nvim/lua/config/lsp.lua b/dot_config/nvim/lua/config/lsp.lua index 0430c27..f0584ea 100644 --- a/dot_config/nvim/lua/config/lsp.lua +++ b/dot_config/nvim/lua/config/lsp.lua @@ -30,7 +30,7 @@ vim.api.nvim_create_autocmd("LspAttach", { end if client:supports_method("textDocument/documentColor") then - vim.lsp.document_color.enable(true, args.buf, { + vim.lsp.document_color.enable(true, { bufnr = args.buf }, { style = "background", -- 'background', 'foreground', or 'virtual' }) end diff --git a/dot_config/nvim/lua/plugins/bufferline.lua b/dot_config/nvim/lua/plugins/bufferline.lua new file mode 100644 index 0000000..0d345f0 --- /dev/null +++ b/dot_config/nvim/lua/plugins/bufferline.lua @@ -0,0 +1,43 @@ +vim.pack.add({ + { src = "https://github.com/akinsho/bufferline.nvim", version = vim.version.range("^4") }, + { src = "https://github.com/nvim-tree/nvim-web-devicons" }, +}) + +require("bufferline").setup({ + options = { + mode = "buffers", + diagnostics = "nvim_lsp", + always_show_bufferline = true, + separator_style = "thin", + show_buffer_close_icons = true, + show_close_icon = false, + offsets = { + { + filetype = "neo-tree", + text = function() + return vim.fn.fnamemodify(vim.fn.getcwd(), ":t") + end, + highlight = "Directory", + text_align = "left", + separator = false, + }, + }, + }, + highlights = require("catppuccin.special.bufferline").get_theme(), +}) + +local map = vim.keymap.set +map("n", "", "BufferLineCyclePrev", { desc = "Prev buffer" }) +map("n", "", "BufferLineCycleNext", { desc = "Next buffer" }) +-- close current buffer, without picking; jump to the next file buffer first so the +-- window never lands on the neo-tree buffer (nvim's own :bdelete switch prefers +-- loaded buffers, which is always the neo-tree sidebar) +map("n", "bd", function() + local cur = vim.api.nvim_get_current_buf() + require("bufferline").cycle(1) -- next buffer in bar order; skips unlisted buffers like neo-tree + if vim.api.nvim_get_current_buf() == cur then + vim.cmd("enew") -- no other buffer open: land on a fresh empty buffer + end + vim.cmd("bdelete! " .. cur) + require("bufferline.ui").refresh() +end, { desc = "Close current buffer" }) diff --git a/dot_config/nvim/lua/plugins/illuminate.lua b/dot_config/nvim/lua/plugins/illuminate.lua new file mode 100644 index 0000000..84e92f6 --- /dev/null +++ b/dot_config/nvim/lua/plugins/illuminate.lua @@ -0,0 +1,32 @@ +vim.pack.add({ + { src = "https://github.com/RRethy/vim-illuminate" }, +}) + +require("illuminate").configure({ + -- Providers in order of preference; treesitter provider needs the old + -- nvim-treesitter API (nvim-treesitter.locals), so leave it out + providers = { "lsp", "regex" }, + under_cursor = false, + delay = 100, +}) + +-- The engine picks the first *ready* provider and never falls back per query, +-- so with an LSP attached the regex provider never runs. LSP documentHighlight +-- is semantic-only: words inside strings and non-symbol identifiers (e.g. the +-- `world` in "Hello, world!" or a package name) get an empty result. Patch the +-- LSP provider to fall back to regex matching when the server returns nothing. +local lsp = require("illuminate.providers.lsp") +local regex = require("illuminate.providers.regex") +local lsp_get_references = lsp.get_references +lsp.get_references = function(bufnr, cursor) + local refs = lsp_get_references(bufnr) + if refs and #refs == 0 then + return regex.get_references(bufnr, cursor) + end + return refs +end + +-- Default plugin keymaps (set unless already taken): +-- next reference +-- previous reference +-- select reference (text object, operator/visual pending) diff --git a/dot_config/nvim/lua/plugins/init.lua b/dot_config/nvim/lua/plugins/init.lua index d915cb1..382b495 100644 --- a/dot_config/nvim/lua/plugins/init.lua +++ b/dot_config/nvim/lua/plugins/init.lua @@ -16,10 +16,12 @@ vim.api.nvim_create_autocmd("PackChanged", { require("plugins.theme") require("plugins.mini-icons") +require("plugins.illuminate") require("plugins.treesitter") require("plugins.blink") require("plugins.whichkey") require("plugins.lualine") +require("plugins.bufferline") require("plugins.telescope") require("plugins.neotree") require("plugins.conform") diff --git a/dot_config/nvim/lua/plugins/minuet.lua b/dot_config/nvim/lua/plugins/minuet.lua new file mode 100644 index 0000000..3d2d844 --- /dev/null +++ b/dot_config/nvim/lua/plugins/minuet.lua @@ -0,0 +1,50 @@ +if vim.loop.os_gethostname() ~= "flow" then + return +end + +vim.pack.add({ + { src = "https://github.com/milanglacier/minuet-ai.nvim" }, +}) + +local function setup_minuet() + pcall(require("minuet").setup, { + provider = "openai_fim_compatible", + n_completions = 1, + context_window = 2048, + request_timeout = 2.5, + throttle = 600, + debounce = 250, + provider_options = { + openai_fim_compatible = { + api_key = "TERM", + name = "Llama.cpp", + end_point = "http://localhost:8012/v1/completions", + model = "PLACEHOLDER", + optional = { + max_tokens = 56, + top_p = 0.9, + }, + template = { + prompt = function(context_before_cursor, context_after_cursor, _) + return "<|fim_prefix|>" + .. context_before_cursor + .. "<|fim_suffix|>" + .. context_after_cursor + .. "<|fim_middle|>" + end, + suffix = false, + }, + }, + }, + }) +end + +setup_minuet() + +vim.api.nvim_create_autocmd("PackChanged", { + callback = function(ev) + if ev.data.spec.name == "minuet-ai.nvim" then + setup_minuet() + end + end, +}) diff --git a/dot_config/nvim/lua/plugins/neotree.lua b/dot_config/nvim/lua/plugins/neotree.lua index 287a761..c1f3da1 100644 --- a/dot_config/nvim/lua/plugins/neotree.lua +++ b/dot_config/nvim/lua/plugins/neotree.lua @@ -6,5 +6,30 @@ vim.pack.add({ }) require("neo-tree").setup({ - window = { width = 30 }, + close_if_last_window = false, + + window = { width = 50 }, + + sort_case_insensitive = true, + + default_component_configs = { + indent = { + with_expanders = true, + expander_collapsed = "", + expander_expanded = "", + }, + }, + + filesystem = { + follow_current_file = { + enabled = true, + leave_dirs_open = false, + }, + use_libuv_file_watcher = true, + filtered_items = { + visible = true, + hide_dotfiles = false, + hide_gitignored = false, + }, + }, }) diff --git a/dot_config/nvim/lua/plugins/theme.lua b/dot_config/nvim/lua/plugins/theme.lua index b50f787..ad78e42 100644 --- a/dot_config/nvim/lua/plugins/theme.lua +++ b/dot_config/nvim/lua/plugins/theme.lua @@ -3,3 +3,7 @@ vim.pack.add({ }) vim.cmd("colorscheme catppuccin") + +require("catppuccin").setup({ + integrations = { bufferline = true }, +}) diff --git a/dot_config/nvim/nvim-pack-lock.json b/dot_config/nvim/nvim-pack-lock.json index be9a323..7b1f568 100644 --- a/dot_config/nvim/nvim-pack-lock.json +++ b/dot_config/nvim/nvim-pack-lock.json @@ -5,12 +5,17 @@ "src": "https://github.com/saghen/blink.cmp", "version": "1.0.0 - 2.0.0" }, + "bufferline.nvim": { + "rev": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3", + "src": "https://github.com/akinsho/bufferline.nvim", + "version": "4.0.0 - 5.0.0" + }, "catppuccin": { - "rev": "79e2049a0fdf7ec840f8463fe1d962c94493196b", + "rev": "edefef779ab08ce1a4a404713e3012b0d202bd35", "src": "https://github.com/catppuccin/nvim" }, "conform.nvim": { - "rev": "619363c30309d29ffa631e67c8183f2a72caa373", + "rev": "016802de402556da54c36bd7359b441266b01cdd", "src": "https://github.com/stevearc/conform.nvim" }, "diffview.nvim": { @@ -18,7 +23,7 @@ "src": "https://github.com/sindrets/diffview.nvim" }, "gitsigns.nvim": { - "rev": "31d6fb2d618bca1482b9f274751ead5f03461408", + "rev": "851a051e2bd2caba97e23314c68d69f1b1cf5d19", "src": "https://github.com/lewis6991/gitsigns.nvim" }, "log-highlight.nvim": { @@ -35,16 +40,16 @@ "version": "0.18.0 - 0.19.0" }, "neo-tree.nvim": { - "rev": "83e7a2982fd12b9c3d35bc39dd5877cd91a02a61", + "rev": "f3f3bf73414e400cf9fc13fda50f00404a8f8ab1", "src": "https://github.com/nvim-neo-tree/neo-tree.nvim", "version": "3.0.0 - 4.0.0" }, "nui.nvim": { - "rev": "de740991c12411b663994b2860f1a4fd0937c130", + "rev": "10fc361835c856ba4233ef5ea135b919bf3dce97", "src": "https://github.com/MunifTanjim/nui.nvim" }, "nvim-dap": { - "rev": "9e848e09a697ee95302a3ef2dd43fd6eb709e570", + "rev": "cfa2d58f4537aca6ca83e2de1a0d9f1491121264", "src": "https://github.com/mfussenegger/nvim-dap" }, "nvim-dap-ui": { @@ -56,16 +61,16 @@ "src": "https://github.com/nvim-neotest/nvim-nio" }, "nvim-treesitter": { - "rev": "7b6cc8949f9999c5ed91436cbe24aa5f99c42025", + "rev": "e289100ff98969e118c702199d88b764ce9e7fdf", "src": "https://github.com/nvim-treesitter/nvim-treesitter" }, "nvim-treesitter-textobjects": { - "rev": "898ee307df58f854d11cd7edd06472574d48014e", + "rev": "5c7b0263797dfd1bd6202f2b219f3b53a80b2187", "src": "https://github.com/nvim-treesitter/nvim-treesitter-textobjects", "version": "'main'" }, "nvim-web-devicons": { - "rev": "2ae6958df7ced50baac5035cec0c15799eedfbf7", + "rev": "58447c1fca354bbf184425e4a8d01deecbd6f3c4", "src": "https://github.com/nvim-tree/nvim-web-devicons" }, "plenary.nvim": { @@ -73,7 +78,7 @@ "src": "https://github.com/nvim-lua/plenary.nvim" }, "render-markdown.nvim": { - "rev": "f422cb5c6855f150e2ddcfaf44e7157b98b34f6a", + "rev": "640a3ec6d538bad17c328be373c7cad0293d9589", "src": "https://github.com/MeanderingProgrammer/render-markdown.nvim" }, "telescope-fzf-native.nvim": { @@ -81,15 +86,19 @@ "src": "https://github.com/nvim-telescope/telescope-fzf-native.nvim" }, "telescope.nvim": { - "rev": "427b576c16792edad01a92b89721d923c19ad60f", + "rev": "40aedd8a68c78a656a10a8d62d80c54af59420fb", "src": "https://github.com/nvim-telescope/telescope.nvim" }, + "vim-illuminate": { + "rev": "1cc33d347c574c3bd21a4852fc9ffed677c1c58c", + "src": "https://github.com/RRethy/vim-illuminate" + }, "which-key.nvim": { "rev": "3aab2147e74890957785941f0c1ad87d0a44c15a", "src": "https://github.com/folke/which-key.nvim" }, "zig.vim": { - "rev": "61109e5166f2bdb7578493a0220a92c43627fc82", + "rev": "4842ab8cb1b000a9acb0a06170d404d12a154918", "src": "https://codeberg.org/ziglang/zig.vim" } }