fix(autocommand): spelling on BufNew
- Change spelling on bufEnter and bufWinEnter that rerun commands too many times (even when override)
This commit is contained in:
parent
e86ab765d7
commit
b6dae05d63
@ -2,7 +2,7 @@ local markdown = vim.api.nvim_create_augroup("markdown", { clear = true })
|
|||||||
local spelling = vim.api.nvim_create_augroup("spelling", { clear = true })
|
local spelling = vim.api.nvim_create_augroup("spelling", { clear = true })
|
||||||
|
|
||||||
-- Recognize .md as pandoc
|
-- Recognize .md as pandoc
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
vim.api.nvim_create_autocmd({ "BufNew" }, {
|
||||||
pattern = { "*.md", },
|
pattern = { "*.md", },
|
||||||
group = markdown,
|
group = markdown,
|
||||||
callback = function()
|
callback = function()
|
||||||
@ -25,7 +25,7 @@ vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- French markdown files
|
-- French markdown files
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
vim.api.nvim_create_autocmd({ "BufNew" }, {
|
||||||
pattern = { "*-fr.md", },
|
pattern = { "*-fr.md", },
|
||||||
group = markdown,
|
group = markdown,
|
||||||
callback = function()
|
callback = function()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user