From 1b982c1da26f57d856771cf000c40bc0d71da155 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Wed, 25 Dec 2024 22:23:01 +0530 Subject: [PATCH] nvim: after/ftplugin/rust: Do not add target to buffer list This can happen when jumping to something which is generated and is present in the target directory. In wasmtime, a few types are generated and end up being in the target build directory. --- nvim/.config/nvim/after/ftplugin/rust.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvim/.config/nvim/after/ftplugin/rust.lua b/nvim/.config/nvim/after/ftplugin/rust.lua index ef89a4e..ed5308b 100644 --- a/nvim/.config/nvim/after/ftplugin/rust.lua +++ b/nvim/.config/nvim/after/ftplugin/rust.lua @@ -9,7 +9,7 @@ vim.keymap.set('n', 'cbu', ":Dispatch! cargo update" , { noremap=true, bu vim.keymap.set('n', ',r' , ":CargoReload" , { noremap=true, buffer=0 }) vim.api.nvim_create_autocmd({ "BufReadPre", "BufWinEnter" }, { - pattern = { "*/git/checkouts/*", "*/toolchains/*", "*cargo/registry/*" }, + pattern = { "*/git/checkouts/*", "*/toolchains/*", "*cargo/registry/*", "*target/*/build/*" }, callback = function() vim.bo.buflisted = false end,