From 652f21f2e9af28553de7c9d52ed7c019c623b355 Mon Sep 17 00:00:00 2001 From: oliverhnat Date: Tue, 23 Dec 2025 14:01:42 +0100 Subject: [PATCH] fix(nvim): fix memory leak --- nvim/lua/olinpin/plugins/copilot.lua | 9 +++++++++ nvim/lua/olinpin/set.lua | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/nvim/lua/olinpin/plugins/copilot.lua b/nvim/lua/olinpin/plugins/copilot.lua index 8c77819..10f1441 100644 --- a/nvim/lua/olinpin/plugins/copilot.lua +++ b/nvim/lua/olinpin/plugins/copilot.lua @@ -7,6 +7,7 @@ return { suggestion = { enabled = true, auto_trigger = true, + debounce = 150, -- Add debounce to reduce API calls keymap = { accept = "…", }, @@ -17,6 +18,14 @@ return { filetypes = { ["."] = false, }, + server_opts_overrides = { + -- Reduce timeout-related errors + settings = { + advanced = { + inlineSuggestCount = 3, + }, + }, + }, }) end, } diff --git a/nvim/lua/olinpin/set.lua b/nvim/lua/olinpin/set.lua index cd6a5cf..f12ee5d 100644 --- a/nvim/lua/olinpin/set.lua +++ b/nvim/lua/olinpin/set.lua @@ -42,3 +42,7 @@ vim.opt.foldenable = false vim.opt.foldlevel = 99 -- g.markdown_folding = 1 -- enable markdown folding +-- Set LSP log level to WARN to reduce log spam (was filling 107MB!) +-- Options: "trace", "debug", "info", "warn", "error", "off" +vim.lsp.set_log_level("warn") +