From f2121df6dc59f14abf3d96ca74119f5790fc0b6c Mon Sep 17 00:00:00 2001 From: alemi Date: Fri, 6 Sep 2024 19:55:01 +0200 Subject: [PATCH] feat: re-run filetype detection after attach --- lua/codemp/buffers.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/codemp/buffers.lua b/lua/codemp/buffers.lua index 4244e1e..9e56ffe 100644 --- a/lua/codemp/buffers.lua +++ b/lua/codemp/buffers.lua @@ -90,6 +90,7 @@ local function attach(name, buffer, content, nowait) controller:callback(function (_controller) async:send() end) vim.defer_fn(function() async:send() end, 500) -- force a try_recv after 500ms + vim.filetype.match({ buf = buffer }) print(" ++ attached to buffer " .. name) return controller end