nvim: after/ftplugin: js/ts: Do not add node_modules to buffer list

This commit is contained in:
Sanchayan Maity 2023-01-31 20:33:44 +05:30
parent 210fc81fcd
commit 0b1380f28b
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3
2 changed files with 14 additions and 0 deletions

View file

@ -34,3 +34,10 @@ vim.lsp.start({
})
vim.keymap.set('n', 'gq', "<cmd>!npx prettier --write %:p<CR>:e<CR>", { noremap=true, silent=true, buffer=0 })
vim.api.nvim_create_autocmd({ "BufReadPre", "BufWinEnter" }, {
pattern = { "*/node_modules/*" },
callback = function()
vim.bo.buflisted = false
end,
})

View file

@ -34,3 +34,10 @@ vim.lsp.start({
})
vim.keymap.set('n', 'gq', "<cmd>!npx prettier --write %:p<CR>:e<CR>", { noremap=true, silent=true, buffer=0 })
vim.api.nvim_create_autocmd({ "BufReadPre", "BufWinEnter" }, {
pattern = { "*/node_modules/*" },
callback = function()
vim.bo.buflisted = false
end,
})