Disable spell checking in pascal files
Test Neovim config on push / build (ubuntu-20.04) (push) Failing after 52s Details

This commit is contained in:
Yannick Reiß 2024-10-01 17:01:41 +02:00
parent 561cdf5d2d
commit 10ca92d206
1 changed files with 14 additions and 0 deletions

View File

@ -14,6 +14,8 @@ local function setup_pascal()
os.execute("wget -o ~/.local/bin/ptop https://www.nickr.eu/data/ptop64")
os.execute("chmod +x ~/.local/bin/ptop")
end
vim.opt.spell = false
end
-- Setup and verify pascal tools when opening a pascal file
@ -22,6 +24,18 @@ vim.api.nvim_create_autocmd({ "BufEnter" }, {
callback = setup_pascal,
})
-- @name leave_pascal
-- @param
-- @short Leave pascal and reverse any changes to my editor defaults
local function leave_pascal()
vim.opt.spell = true
end
vim.api.nvim_create_autocmd({ "BufLeave" }, {
pattern = { "*.pas" },
callback = leave_pascal,
})
-- @name auto_format
-- @param
-- @short The format function for pascal.