From 59419287391223d7f39157c34517c28a363cbc50 Mon Sep 17 00:00:00 2001 From: dlond Date: Fri, 30 May 2025 07:34:37 +1200 Subject: [PATCH] cleanup --- lua/custom/plugins/lsp/clangd.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/custom/plugins/lsp/clangd.lua b/lua/custom/plugins/lsp/clangd.lua index 1aad8bcb..59cfff3f 100644 --- a/lua/custom/plugins/lsp/clangd.lua +++ b/lua/custom/plugins/lsp/clangd.lua @@ -47,6 +47,9 @@ function M.start_clangd(dir) root_dir = lspconfig.util.root_pattern '.git', capabilities = require('blink.cmp').get_lsp_capabilities(), single_file_support = true, + on_attach = function(client, bufnr) + vim.notify('[clangd] Attached to buffer ' .. bufnr) + end, } end @@ -84,7 +87,7 @@ function M.watch_compile_commands(dir) return end - if fname and fname:match '.*/compile_commands%.json$' and status.change then + if fname and fname:match '[/\\]compile_commands%.json$' and status.change then if debounce_timer then debounce_timer:stop() debounce_timer:close()