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.
This commit is contained in:
Sanchayan Maity 2024-12-25 22:23:01 +05:30
parent b2f42465dd
commit 1b982c1da2
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -9,7 +9,7 @@ vim.keymap.set('n', 'cbu', ":Dispatch! cargo update<CR>" , { noremap=true, bu
vim.keymap.set('n', ',r' , ":CargoReload<CR>" , { 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,