From ac376bb0d4a8f31205606e35ef62811e8be17f0b Mon Sep 17 00:00:00 2001 From: Ira Chan Date: Sat, 21 Mar 2026 05:05:41 +0800 Subject: [PATCH] fix(clojure): remove redundant on-filetype() call that leaks keymaps The Conjure spec calls `require("conjure.mapping")["on-filetype"]()` unconditionally in its `config` function. Because the plugin loads on `event = "LazyFile"` (any file open), this sets Conjure's buffer-local keymaps on whatever buffer triggered the load, regardless of filetype. This call is redundant. `require("conjure.main").main()` internally calls `mapping.init(filetypes)`, which registers a FileType autocmd scoped to supported filetypes and checks the current buffer's filetype before calling `on-filetype()`. The extra call bypasses that guard. Fixes #7064 --- lua/lazyvim/plugins/extras/lang/clojure.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/clojure.lua b/lua/lazyvim/plugins/extras/lang/clojure.lua index 4c47c623..3d12dd1b 100644 --- a/lua/lazyvim/plugins/extras/lang/clojure.lua +++ b/lua/lazyvim/plugins/extras/lang/clojure.lua @@ -52,7 +52,6 @@ return { event = "LazyFile", config = function(_, _) require("conjure.main").main() - require("conjure.mapping")["on-filetype"]() end, init = function() -- print color codes if baleia.nvim is available