From 76ab9b057aa0511826f6e4400d9e8f5dd1eb0d6a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 21:36:39 +0000 Subject: [PATCH 01/11] Fix rustacean --- lua/custom/plugins/rustaceanvim.lua | 79 +++++++++++++++++------------ lua/kickstart/plugins/debug.lua | 1 + 2 files changed, 47 insertions(+), 33 deletions(-) diff --git a/lua/custom/plugins/rustaceanvim.lua b/lua/custom/plugins/rustaceanvim.lua index ad523815e60..b0d0ae5ddf4 100644 --- a/lua/custom/plugins/rustaceanvim.lua +++ b/lua/custom/plugins/rustaceanvim.lua @@ -2,37 +2,50 @@ return { 'mrcjkb/rustaceanvim', version = '^6', lazy = false, - -- config = function(_, _) - -- vim.g.rustaceanvim = { - -- -- Plugin configuration - -- tools = { - -- }, - -- -- LSP configuration - -- server = { - -- on_attach = function(client, buffer) - -- require("lsp_on_attach")(client, buffer) - -- - -- -- Enable codelens refresh - -- vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, { - -- buffer = buffer, - -- callback = function() - -- vim.lsp.codelens.refresh({ bufnr = buffer }) - -- end, - -- }) - -- end, - -- default_settings = { - -- -- rust-analyzer language server configuration - -- ['rust-analyzer'] = { - -- assist = { - -- importMergeBehaviour = "full", - -- }, - -- }, - -- }, - -- - -- }, - -- -- DAP configuration - -- dap = { - -- }, - -- } - -- end + config = function(_, _) + vim.g.rustaceanvim = { + -- Plugin configuration + tools = { + }, + -- LSP configuration + server = { + on_attach = function(client, buffer) + require("lsp_on_attach")(client, buffer) + + -- Enable codelens refresh + vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, { + buffer = buffer, + callback = function() + vim.lsp.codelens.refresh({ bufnr = buffer }) + end, + }) + end, + default_settings = { + -- rust-analyzer language server configuration + ['rust-analyzer'] = { + assist = { + importMergeBehaviour = "full", + }, + checkOnSave = { + command = "clippy", -- Or "check" + }, + inlayHints = { + enabled = true, + }, + cargo = { + features = "all", -- Or specify features if needed + }, + procMacro = { + enable = true, + }, + }, + }, + + }, + -- DAP configuration + dap = { + adapter = require('rustaceanvim.config').get_codelldb_adapter(), + }, + } + end } diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 753cb0cedd3..e36533a3bcf 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -95,6 +95,7 @@ return { ensure_installed = { -- Update this to ensure that you have the debuggers for the langs you want 'delve', + 'codelldb', -- Added for Rust debugging }, } From 8673d2b4aee7d9ba763ef57b3e5abf13b7bfd7ac Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 21:46:47 +0000 Subject: [PATCH 02/11] feat: Configure Minuet for LM Studio and verify blink.cmp This commit updates the Minuet plugin configuration to use an LM Studio backend, instead of the previous Ollama setup. - Modified `lua/custom/plugins/minuet-ai.lua`: - Switched the active provider to 'openai_compatible'. - Ensured the endpoint and model name point to your LM Studio instance (`http://m4max.local:1234/v1/chat/completions` with model `qwen2.5-coder-3b-instruct`). - Commented out the previous 'openai_fim_compatible' (Ollama) provider. - Verified `init.lua`: - Confirmed that `blink.cmp` is already correctly configured to use Minuet as a completion source via `minuet.blink`. No changes were needed in this file. I have instructed you on how to test this new configuration by ensuring LM Studio is running with the specified model and server settings, restarting Neovim, and attempting to trigger AI completions via `blink.cmp`. --- lua/custom/plugins/minuet-ai.lua | 50 ++++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/lua/custom/plugins/minuet-ai.lua b/lua/custom/plugins/minuet-ai.lua index 0615af07d4b..9bbf5889b17 100644 --- a/lua/custom/plugins/minuet-ai.lua +++ b/lua/custom/plugins/minuet-ai.lua @@ -15,38 +15,38 @@ return { -- notify = 'debug', request_timeout = 30000, context_window = 768, - -- provider = 'openai_compatible', - -- provider_options = { - -- openai_compatible = { - -- api_key = 'PWD', - -- name = 'lmstudio', - -- end_point = 'http://m4max.local:1234/v1/chat/completions', - -- -- end_point = 'http://localhost:1234/v1/chat/completions', - -- model = 'qwen2.5-coder-3b-instruct', - -- -- model = 'deepseek-r1-distill-qwen-7b', - -- optional = { - -- max_tokens = 256, - -- top_p = 0.9, - -- }, - -- }, - -- }, - provider = 'openai_fim_compatible', - n_completions = 1, -- recommend for local model for resource saving - -- I recommend you start with a small context window firstly, and gradually - -- increase it based on your local computing power. + provider = 'openai_compatible', -- Switched to LM Studio provider provider_options = { - openai_fim_compatible = { - api_key = 'TERM', - name = 'Ollama', - -- end_point = 'http://localhost:11434/v1/completions', - end_point = 'http://m4max.local:11434/v1/completions', - model = 'qwen2.5-coder:7b', + openai_compatible = { + api_key = 'PWD', -- This is often a placeholder for LM Studio if no auth is needed + name = 'lmstudio', + end_point = 'http://m4max.local:1234/v1/chat/completions', -- Using existing LM Studio endpoint + -- end_point = 'http://localhost:1234/v1/chat/completions', + model = 'qwen2.5-coder-3b-instruct', -- Using existing LM Studio model + -- model = 'deepseek-r1-distill-qwen-7b', optional = { max_tokens = 256, top_p = 0.9, }, }, }, + -- provider = 'openai_fim_compatible', -- Commented out Ollama provider + -- n_completions = 1, -- recommend for local model for resource saving + -- I recommend you start with a small context window firstly, and gradually + -- increase it based on your local computing power. + -- provider_options = { + -- openai_fim_compatible = { + -- api_key = 'TERM', + -- name = 'Ollama', + -- -- end_point = 'http://localhost:11434/v1/completions', + -- end_point = 'http://m4max.local:11434/v1/completions', + -- model = 'qwen2.5-coder:7b', + -- optional = { + -- max_tokens = 256, + -- top_p = 0.9, + -- }, + -- }, + -- }, } end, } From 36296e62eee3f0d5f60d24bf17c6977ec6d2deb0 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 22:03:37 +0000 Subject: [PATCH 03/11] feat: Configure Minuet for OpenAI API testing Temporarily switches Minuet plugin to use the official OpenAI API for debugging purposes. - Modifies `lua/custom/plugins/minuet-ai.lua`: - Sets provider to 'openai'. - Configures `api_key` to be read from the `OPENAI_API_KEY` environment variable. - Sets OpenAI endpoint to `https://api.openai.com/v1/chat/completions` and model to `gpt-3.5-turbo`. - Enables debug notifications (`notify = 'debug'`). - Comments out the previous LM Studio (`openai_compatible`) configuration. This change is intended to isolate and test Minuet's core functionality before further debugging of LM Studio integration. --- lua/custom/plugins/minuet-ai.lua | 48 +++++++++++++------------------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/lua/custom/plugins/minuet-ai.lua b/lua/custom/plugins/minuet-ai.lua index 9bbf5889b17..b4a97d16ff1 100644 --- a/lua/custom/plugins/minuet-ai.lua +++ b/lua/custom/plugins/minuet-ai.lua @@ -7,46 +7,36 @@ return { }, config = function() require('minuet').setup { - -- completion = { keyword_length = 1 }, - -- n_completions = 1, -- recommend for local model for resource saving - -- I recommend you start with a small context window firstly, and gradually - -- increase it based on your local computing power. - -- context_window = 1024, - -- notify = 'debug', request_timeout = 30000, context_window = 768, - provider = 'openai_compatible', -- Switched to LM Studio provider + notify = 'debug', -- Enabled debug notifications + provider = 'openai', -- Using standard OpenAI provider provider_options = { + openai = { + api_key = vim.fn.getenv('OPENAI_API_KEY'), + name = 'OpenAI', -- Provider name + end_point = 'https://api.openai.com/v1/chat/completions', -- Standard OpenAI chat endpoint + model = 'gpt-3.5-turbo', -- Standard chat model + optional = { + max_tokens = 256, + top_p = 0.9, + }, + }, + --[[ -- Commenting out LM Studio configuration for now openai_compatible = { - api_key = 'PWD', -- This is often a placeholder for LM Studio if no auth is needed + api_key = 'PWD', name = 'lmstudio', - end_point = 'http://m4max.local:1234/v1/chat/completions', -- Using existing LM Studio endpoint - -- end_point = 'http://localhost:1234/v1/chat/completions', - model = 'qwen2.5-coder-3b-instruct', -- Using existing LM Studio model - -- model = 'deepseek-r1-distill-qwen-7b', + end_point = 'http://m4max.local:1234/v1/chat/completions', + model = 'qwen2.5-coder-3b-instruct', optional = { max_tokens = 256, top_p = 0.9, }, }, + --]] }, - -- provider = 'openai_fim_compatible', -- Commented out Ollama provider - -- n_completions = 1, -- recommend for local model for resource saving - -- I recommend you start with a small context window firstly, and gradually - -- increase it based on your local computing power. - -- provider_options = { - -- openai_fim_compatible = { - -- api_key = 'TERM', - -- name = 'Ollama', - -- -- end_point = 'http://localhost:11434/v1/completions', - -- end_point = 'http://m4max.local:11434/v1/completions', - -- model = 'qwen2.5-coder:7b', - -- optional = { - -- max_tokens = 256, - -- top_p = 0.9, - -- }, - -- }, - -- }, + -- Other options like n_completions can be added here if needed for OpenAI + -- n_completions = 1, } end, } From f8aaa0ed88cd80fe1864b01d11c988e5cb3075f7 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 22:14:20 +0000 Subject: [PATCH 04/11] fix: Attempt to simplify rustaceanvim DAP config Comments out the explicit DAP configuration within `rustaceanvim`'s setup. This is to rely on `mason-nvim-dap` to provide the global configuration for `codelldb`, which `rustaceanvim` should then use. This may resolve an error related to `dap.adapter.executable.command`. --- lua/custom/plugins/rustaceanvim.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/custom/plugins/rustaceanvim.lua b/lua/custom/plugins/rustaceanvim.lua index b0d0ae5ddf4..cb58db07171 100644 --- a/lua/custom/plugins/rustaceanvim.lua +++ b/lua/custom/plugins/rustaceanvim.lua @@ -43,9 +43,9 @@ return { }, -- DAP configuration - dap = { - adapter = require('rustaceanvim.config').get_codelldb_adapter(), - }, + -- dap = { + -- adapter = require('rustaceanvim.config').get_codelldb_adapter(), + -- }, } end } From 7cd3b5d6e87b7ccc734b32b579e3086bf815b802 Mon Sep 17 00:00:00 2001 From: Fabien Penso Date: Sat, 24 May 2025 00:33:12 +0200 Subject: [PATCH 05/11] Fix --- lua/custom/plugins/minuet-ai.lua | 4 +- lua/custom/plugins/snacks.lua | 143 +++++++++++++++++++++++++------ 2 files changed, 121 insertions(+), 26 deletions(-) diff --git a/lua/custom/plugins/minuet-ai.lua b/lua/custom/plugins/minuet-ai.lua index b4a97d16ff1..95577f27d8f 100644 --- a/lua/custom/plugins/minuet-ai.lua +++ b/lua/custom/plugins/minuet-ai.lua @@ -13,7 +13,7 @@ return { provider = 'openai', -- Using standard OpenAI provider provider_options = { openai = { - api_key = vim.fn.getenv('OPENAI_API_KEY'), + api_key = 'OPENAI_API_KEY', name = 'OpenAI', -- Provider name end_point = 'https://api.openai.com/v1/chat/completions', -- Standard OpenAI chat endpoint model = 'gpt-3.5-turbo', -- Standard chat model @@ -36,7 +36,7 @@ return { --]] }, -- Other options like n_completions can be added here if needed for OpenAI - -- n_completions = 1, + -- n_completions = 1, } end, } diff --git a/lua/custom/plugins/snacks.lua b/lua/custom/plugins/snacks.lua index 13df908c9c8..91e5e2de92a 100644 --- a/lua/custom/plugins/snacks.lua +++ b/lua/custom/plugins/snacks.lua @@ -20,13 +20,13 @@ return { enabled = true, sections = { - { section = "terminal", cmd = "fortune -s | cowsay", hl = "header", padding = 1, indent = 8 }, + { section = 'terminal', cmd = 'fortune -s | cowsay', hl = 'header', padding = 1, indent = 8 }, -- { section = "header" }, -- { section = "recent_files", limit = 8, padding = 1 }, - { icon = " ", title = "Recent Files", section = "recent_files", indent = 2, padding = 1, limit = 10 }, + { icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1, limit = 10 }, -- { title = "Sessions", padding = 1 }, - { icon = " ", title = "Projects", section = "projects", indent = 2, padding = 1 }, - { icon = " ", title = "Keymaps", section = "keys", indent = 2, padding = 1 }, + { icon = ' ', title = 'Projects', section = 'projects', indent = 2, padding = 1 }, + { icon = ' ', title = 'Keymaps', section = 'keys', indent = 2, padding = 1 }, -- { -- pane = 2, -- icon = " ", @@ -41,35 +41,130 @@ return { -- ttl = 5 * 60, -- indent = 3, -- }, - { section = "startup" }, + { section = 'startup' }, }, - }, }, keys = { - { "fs", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" }, - { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, - { "fc", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" }, - { "ff", function() Snacks.picker.files() end, desc = "Find Files" }, - { "fg", function() Snacks.picker.git_files() end, desc = "Find Git Files" }, - { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, - { "fr", function() Snacks.picker.recent() end, desc = "Recent" }, - { "gg", function() Snacks.lazygit() end, desc = "Lazygit" }, - { "gl", function() Snacks.lazygit.log() end, desc = "[G]it [L]og" }, - { ";", function() Snacks.dashboard() end, desc = "Dashboard" }, - { "e", function() Snacks.explorer() end, desc = "Dashboard" }, - { "", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { + 'fs', + function() + Snacks.picker.lsp_symbols() + end, + desc = 'LSP Symbols', + }, + { + 'fb', + function() + Snacks.picker.buffers() + end, + desc = 'Buffers', + }, + { + 'fc', + function() + Snacks.picker.files { cwd = vim.fn.stdpath 'config' } + end, + desc = 'Find Config File', + }, + { + 'ff', + function() + Snacks.picker.files() + end, + desc = 'Find Files', + }, + { + 'fg', + function() + Snacks.picker.git_files() + end, + desc = 'Find Git Files', + }, + { + 'fp', + function() + Snacks.picker.projects() + end, + desc = 'Projects', + }, + { + 'fr', + function() + Snacks.picker.recent() + end, + desc = 'Recent', + }, + { + 'gg', + function() + Snacks.lazygit() + end, + desc = 'Lazygit', + }, + { + 'gl', + function() + Snacks.lazygit.log() + end, + desc = '[G]it [L]og', + }, + { + ';', + function() + Snacks.dashboard() + end, + desc = 'Dashboard', + }, + { + 'e', + function() + Snacks.explorer() + end, + desc = 'Dashboard', + }, + { + '', + function() + Snacks.picker.buffers() + end, + desc = 'Buffers', + }, -- { "", function() Snacks.picker.buffers({ layout = { preset = "vscode" } }) end, desc = "Buffers" }, - { "D", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto Type [D]efinition" }, - { "gd", function() Snacks.picker.lsp_definitions() end, desc = "[G]oto [D]efinition" }, - { "gI", function() Snacks.picker.lsp_implementations() end, desc = "[G]oto [I]mplementations" }, - { "gr", function() Snacks.picker.lsp_references() end, desc = "[G]oto [R]eferences" }, + { + 'D', + function() + Snacks.picker.lsp_type_definitions() + end, + desc = 'Goto Type [D]efinition', + }, + { + 'gd', + function() + Snacks.picker.lsp_definitions() + end, + desc = '[G]oto [D]efinition', + }, + { + 'gI', + function() + Snacks.picker.lsp_implementations() + end, + desc = '[G]oto [I]mplementations', + }, + { + 'gr', + function() + Snacks.picker.lsp_references() + end, + desc = '[G]oto [R]eferences', + }, { '', function() - Snacks.terminal("zsh", {}) + Snacks.terminal('zsh', {}) end, desc = 'Terminal', }, - } + }, } From 61b868f5348451cab85a916648bc07de657e8d16 Mon Sep 17 00:00:00 2001 From: Fabien Penso Date: Sat, 24 May 2025 00:40:54 +0200 Subject: [PATCH 06/11] Fix minuet --- lua/custom/plugins/minuet-ai.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lua/custom/plugins/minuet-ai.lua b/lua/custom/plugins/minuet-ai.lua index 95577f27d8f..bd3842b9a91 100644 --- a/lua/custom/plugins/minuet-ai.lua +++ b/lua/custom/plugins/minuet-ai.lua @@ -10,11 +10,11 @@ return { request_timeout = 30000, context_window = 768, notify = 'debug', -- Enabled debug notifications - provider = 'openai', -- Using standard OpenAI provider + provider = 'openai_compatible', -- Using standard OpenAI provider provider_options = { openai = { api_key = 'OPENAI_API_KEY', - name = 'OpenAI', -- Provider name + name = 'OpenAI', end_point = 'https://api.openai.com/v1/chat/completions', -- Standard OpenAI chat endpoint model = 'gpt-3.5-turbo', -- Standard chat model optional = { @@ -22,10 +22,9 @@ return { top_p = 0.9, }, }, - --[[ -- Commenting out LM Studio configuration for now openai_compatible = { - api_key = 'PWD', - name = 'lmstudio', + api_key = 'TERM', + name = 'ollama', end_point = 'http://m4max.local:1234/v1/chat/completions', model = 'qwen2.5-coder-3b-instruct', optional = { @@ -33,7 +32,6 @@ return { top_p = 0.9, }, }, - --]] }, -- Other options like n_completions can be added here if needed for OpenAI -- n_completions = 1, From 6bc45f23f3cc767768b94f705db6d24cefdcb93f Mon Sep 17 00:00:00 2001 From: Fabien Penso Date: Sat, 24 May 2025 01:19:17 +0200 Subject: [PATCH 07/11] Fix --- init.lua | 68 +++++++++++++++++++++++++++++--- lua/custom/plugins/minuet-ai.lua | 3 +- 2 files changed, 65 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index e7bfcba45e0..9042bf1a198 100644 --- a/init.lua +++ b/init.lua @@ -105,7 +105,7 @@ vim.o.number = true vim.o.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! -vim.o.mouse = 'a' +vim.o.mouse = 'r' -- Don't show the mode, since it's already in the status line vim.o.showmode = false @@ -837,12 +837,16 @@ require('lazy').setup({ -- : Toggle signature help -- -- See :h blink-cmp-config-keymap for defining your own keymap - preset = 'super-tab', + preset = 'enter', -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps }, appearance = { + -- format = function(entry, item) + -- item.menu = entry.source.name + -- return item + -- end, -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' -- Adjusts spacing to ensure icons are aligned nerd_font_variant = 'normal', @@ -870,6 +874,24 @@ require('lazy').setup({ Keyword = '󰻾', Constant = '󰏿', + Minuet = '󰙯', + -- Minuet = '🤖', + + fallback = '󰜚', + + -- Et si je veux voir si je peux + -- et encore une fois + + claude = '󰋦', + openai = '󱢆', + openai_compatible = '󱢆', + codestral = '󱎥', + gemini = '', + Groq = '', + Openrouter = '󱂇', + ollama = '󰳆', + Deepseek = '', + Snippet = '󱄽', Color = '󰏘', File = '󰈔', @@ -886,6 +908,33 @@ require('lazy').setup({ -- Optionally, set `auto_show = true` to show the documentation after a delay. documentation = { auto_show = false, auto_show_delay_ms = 500 }, -- trigger = { prefetch_on_insert = false }, + menu = { + draw = { + columns = { + { 'kind_icon', gap = 1 }, + { 'label', 'label_description', gap = 1 }, + { 'kind' }, + -- { 'source_icon' }, + }, + components = { + kind = { + text = function(ctx) + return '[' .. ctx.kind .. ']' + end, + highlight = 'BlinkCmpKind', + }, + -- source_icon = { + -- -- don't truncate source_icon + -- ellipsis = false, + -- text = function(ctx) + -- return ctx.source_name:lower() + -- -- return source_icons[ctx.source_name:lower()] or '󰜚' + -- end, + -- highlight = 'BlinkCmpSource', + -- }, + }, + }, + }, }, sources = { @@ -895,7 +944,7 @@ require('lazy').setup({ copilot = { name = 'copilot', module = 'blink-cmp-copilot', - score_offset = 100, + score_offset = 200, async = true, transform_items = function(_, items) local CompletionItemKind = require('blink.cmp.types').CompletionItemKind @@ -913,8 +962,17 @@ require('lazy').setup({ async = true, -- Should match minuet.config.request_timeout * 1000, -- since minuet.config.request_timeout is in seconds - timeout_ms = 3000, - score_offset = 50, -- Gives minuet higher priority among suggestions + timeout_ms = 10000, + score_offset = 100, -- Gives minuet higher priority among suggestions + transform_items = function(_, items) + local K = require('blink.cmp.types').CompletionItemKind + local idx = #K + 1 + K[idx] = 'Minuet' + for _, it in ipairs(items) do + it.kind = idx + end + return items + end, }, }, }, diff --git a/lua/custom/plugins/minuet-ai.lua b/lua/custom/plugins/minuet-ai.lua index bd3842b9a91..d1c6d284531 100644 --- a/lua/custom/plugins/minuet-ai.lua +++ b/lua/custom/plugins/minuet-ai.lua @@ -9,7 +9,7 @@ return { require('minuet').setup { request_timeout = 30000, context_window = 768, - notify = 'debug', -- Enabled debug notifications + -- notify = 'debug', -- Enabled debug notifications provider = 'openai_compatible', -- Using standard OpenAI provider provider_options = { openai = { @@ -23,6 +23,7 @@ return { }, }, openai_compatible = { + stream = true, api_key = 'TERM', name = 'ollama', end_point = 'http://m4max.local:1234/v1/chat/completions', From b4262fa92db78b4f103e6340760f1c5970bdebd2 Mon Sep 17 00:00:00 2001 From: Fabien Penso Date: Sat, 24 May 2025 01:29:45 +0200 Subject: [PATCH 08/11] Fix --- lua/custom/plugins/minuet-ai.lua | 2 +- lua/custom/plugins/rustaceanvim.lua | 46 ----------------------------- 2 files changed, 1 insertion(+), 47 deletions(-) diff --git a/lua/custom/plugins/minuet-ai.lua b/lua/custom/plugins/minuet-ai.lua index d1c6d284531..d4bbf51a9d0 100644 --- a/lua/custom/plugins/minuet-ai.lua +++ b/lua/custom/plugins/minuet-ai.lua @@ -27,7 +27,7 @@ return { api_key = 'TERM', name = 'ollama', end_point = 'http://m4max.local:1234/v1/chat/completions', - model = 'qwen2.5-coder-3b-instruct', + model = 'deepseek-r1-distill-qwen-7b', -- 'qwen2.5-coder-3b-instruct', optional = { max_tokens = 256, top_p = 0.9, diff --git a/lua/custom/plugins/rustaceanvim.lua b/lua/custom/plugins/rustaceanvim.lua index cb58db07171..385c03de152 100644 --- a/lua/custom/plugins/rustaceanvim.lua +++ b/lua/custom/plugins/rustaceanvim.lua @@ -2,50 +2,4 @@ return { 'mrcjkb/rustaceanvim', version = '^6', lazy = false, - config = function(_, _) - vim.g.rustaceanvim = { - -- Plugin configuration - tools = { - }, - -- LSP configuration - server = { - on_attach = function(client, buffer) - require("lsp_on_attach")(client, buffer) - - -- Enable codelens refresh - vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, { - buffer = buffer, - callback = function() - vim.lsp.codelens.refresh({ bufnr = buffer }) - end, - }) - end, - default_settings = { - -- rust-analyzer language server configuration - ['rust-analyzer'] = { - assist = { - importMergeBehaviour = "full", - }, - checkOnSave = { - command = "clippy", -- Or "check" - }, - inlayHints = { - enabled = true, - }, - cargo = { - features = "all", -- Or specify features if needed - }, - procMacro = { - enable = true, - }, - }, - }, - - }, - -- DAP configuration - -- dap = { - -- adapter = require('rustaceanvim.config').get_codelldb_adapter(), - -- }, - } - end } From 76bff6ed22dec86e2291d242ebe6ca84a8303f62 Mon Sep 17 00:00:00 2001 From: Fabien Penso Date: Sat, 24 May 2025 01:48:19 +0200 Subject: [PATCH 09/11] Add gemini --- lua/custom/plugins/minuet-ai.lua | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/lua/custom/plugins/minuet-ai.lua b/lua/custom/plugins/minuet-ai.lua index d4bbf51a9d0..f3d67f4280f 100644 --- a/lua/custom/plugins/minuet-ai.lua +++ b/lua/custom/plugins/minuet-ai.lua @@ -27,12 +27,41 @@ return { api_key = 'TERM', name = 'ollama', end_point = 'http://m4max.local:1234/v1/chat/completions', - model = 'deepseek-r1-distill-qwen-7b', -- 'qwen2.5-coder-3b-instruct', + model = 'qwen2.5-coder-3b-instruct', optional = { max_tokens = 256, top_p = 0.9, }, }, + gemini = { + model = 'gemini-2.0-flash', + system = 'see [Prompt] section for the default value', + few_shots = 'see [Prompt] section for the default value', + chat_input = 'See [Prompt Section for default value]', + stream = true, + api_key = 'GEMINI_API_KEY', + end_point = 'https://generativelanguage.googleapis.com/v1beta/models', + optional = { + generationConfig = { + maxOutputTokens = 256, + -- When using `gemini-2.5-flash`, it is recommended to entirely + -- disable thinking for faster completion retrieval. + thinkingConfig = { + thinkingBudget = 0, + }, + }, + safetySettings = { + { + -- HARM_CATEGORY_HATE_SPEECH, + -- HARM_CATEGORY_HARASSMENT + -- HARM_CATEGORY_SEXUALLY_EXPLICIT + category = 'HARM_CATEGORY_DANGEROUS_CONTENT', + -- BLOCK_NONE + threshold = 'BLOCK_ONLY_HIGH', + }, + }, + }, + }, }, -- Other options like n_completions can be added here if needed for OpenAI -- n_completions = 1, From ee5623e793ccb02136aebced33b769d004fce309 Mon Sep 17 00:00:00 2001 From: Fabien Penso Date: Sat, 24 May 2025 14:14:08 +0200 Subject: [PATCH 10/11] Fix --- lua/custom/plugins/snacks.lua | 143 ++++++---------------------------- 1 file changed, 24 insertions(+), 119 deletions(-) diff --git a/lua/custom/plugins/snacks.lua b/lua/custom/plugins/snacks.lua index 91e5e2de92a..13df908c9c8 100644 --- a/lua/custom/plugins/snacks.lua +++ b/lua/custom/plugins/snacks.lua @@ -20,13 +20,13 @@ return { enabled = true, sections = { - { section = 'terminal', cmd = 'fortune -s | cowsay', hl = 'header', padding = 1, indent = 8 }, + { section = "terminal", cmd = "fortune -s | cowsay", hl = "header", padding = 1, indent = 8 }, -- { section = "header" }, -- { section = "recent_files", limit = 8, padding = 1 }, - { icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1, limit = 10 }, + { icon = " ", title = "Recent Files", section = "recent_files", indent = 2, padding = 1, limit = 10 }, -- { title = "Sessions", padding = 1 }, - { icon = ' ', title = 'Projects', section = 'projects', indent = 2, padding = 1 }, - { icon = ' ', title = 'Keymaps', section = 'keys', indent = 2, padding = 1 }, + { icon = " ", title = "Projects", section = "projects", indent = 2, padding = 1 }, + { icon = " ", title = "Keymaps", section = "keys", indent = 2, padding = 1 }, -- { -- pane = 2, -- icon = " ", @@ -41,130 +41,35 @@ return { -- ttl = 5 * 60, -- indent = 3, -- }, - { section = 'startup' }, + { section = "startup" }, }, + }, }, keys = { - { - 'fs', - function() - Snacks.picker.lsp_symbols() - end, - desc = 'LSP Symbols', - }, - { - 'fb', - function() - Snacks.picker.buffers() - end, - desc = 'Buffers', - }, - { - 'fc', - function() - Snacks.picker.files { cwd = vim.fn.stdpath 'config' } - end, - desc = 'Find Config File', - }, - { - 'ff', - function() - Snacks.picker.files() - end, - desc = 'Find Files', - }, - { - 'fg', - function() - Snacks.picker.git_files() - end, - desc = 'Find Git Files', - }, - { - 'fp', - function() - Snacks.picker.projects() - end, - desc = 'Projects', - }, - { - 'fr', - function() - Snacks.picker.recent() - end, - desc = 'Recent', - }, - { - 'gg', - function() - Snacks.lazygit() - end, - desc = 'Lazygit', - }, - { - 'gl', - function() - Snacks.lazygit.log() - end, - desc = '[G]it [L]og', - }, - { - ';', - function() - Snacks.dashboard() - end, - desc = 'Dashboard', - }, - { - 'e', - function() - Snacks.explorer() - end, - desc = 'Dashboard', - }, - { - '', - function() - Snacks.picker.buffers() - end, - desc = 'Buffers', - }, + { "fs", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" }, + { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "fc", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" }, + { "ff", function() Snacks.picker.files() end, desc = "Find Files" }, + { "fg", function() Snacks.picker.git_files() end, desc = "Find Git Files" }, + { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, + { "fr", function() Snacks.picker.recent() end, desc = "Recent" }, + { "gg", function() Snacks.lazygit() end, desc = "Lazygit" }, + { "gl", function() Snacks.lazygit.log() end, desc = "[G]it [L]og" }, + { ";", function() Snacks.dashboard() end, desc = "Dashboard" }, + { "e", function() Snacks.explorer() end, desc = "Dashboard" }, + { "", function() Snacks.picker.buffers() end, desc = "Buffers" }, -- { "", function() Snacks.picker.buffers({ layout = { preset = "vscode" } }) end, desc = "Buffers" }, - { - 'D', - function() - Snacks.picker.lsp_type_definitions() - end, - desc = 'Goto Type [D]efinition', - }, - { - 'gd', - function() - Snacks.picker.lsp_definitions() - end, - desc = '[G]oto [D]efinition', - }, - { - 'gI', - function() - Snacks.picker.lsp_implementations() - end, - desc = '[G]oto [I]mplementations', - }, - { - 'gr', - function() - Snacks.picker.lsp_references() - end, - desc = '[G]oto [R]eferences', - }, + { "D", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto Type [D]efinition" }, + { "gd", function() Snacks.picker.lsp_definitions() end, desc = "[G]oto [D]efinition" }, + { "gI", function() Snacks.picker.lsp_implementations() end, desc = "[G]oto [I]mplementations" }, + { "gr", function() Snacks.picker.lsp_references() end, desc = "[G]oto [R]eferences" }, { '', function() - Snacks.terminal('zsh', {}) + Snacks.terminal("zsh", {}) end, desc = 'Terminal', }, - }, + } } From 599e5b276ee9cc5b90bbb5ae5395f729c44ec4e9 Mon Sep 17 00:00:00 2001 From: Fabien Penso Date: Sat, 24 May 2025 14:23:33 +0200 Subject: [PATCH 11/11] Fix --- init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 9042bf1a198..f48c4160e2e 100644 --- a/init.lua +++ b/init.lua @@ -904,9 +904,11 @@ require('lazy').setup({ }, completion = { + trigger = { show_on_keyboard = true }, + list = { selection = { preselect = true } }, -- By default, you may press `` to show the documentation. -- Optionally, set `auto_show = true` to show the documentation after a delay. - documentation = { auto_show = false, auto_show_delay_ms = 500 }, + documentation = { auto_show = true, auto_show_delay_ms = 500 }, -- trigger = { prefetch_on_insert = false }, menu = { draw = { @@ -914,7 +916,6 @@ require('lazy').setup({ { 'kind_icon', gap = 1 }, { 'label', 'label_description', gap = 1 }, { 'kind' }, - -- { 'source_icon' }, }, components = { kind = {