nvim: after/ftplugin/c: Do not add include files to buffer list

Hide header files from /usr/include from the buffer list.
This commit is contained in:
Sanchayan Maity 2024-04-11 16:07:55 +05:30
parent a4b9b3fd97
commit f27f6629de
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -7,3 +7,10 @@ vim.bo.makeprg = 'meson compile -C build'
vim.keymap.set('n', 'gh', ":ClangdSwitchSourceHeader<CR>", { noremap=true, buffer=0 }) vim.keymap.set('n', 'gh', ":ClangdSwitchSourceHeader<CR>", { noremap=true, buffer=0 })
vim.keymap.set('n', 'gq', ":!gst-indent %<CR>" , { noremap=true, buffer=0 }) vim.keymap.set('n', 'gq', ":!gst-indent %<CR>" , { noremap=true, buffer=0 })
vim.api.nvim_create_autocmd({ "BufReadPre", "BufWinEnter" }, {
pattern = { "*/usr/include/*" },
callback = function()
vim.bo.buflisted = false
end,
})