Fix spelling calls
This commit is contained in:
parent
c4e6cea2bd
commit
d7244d1e6d
|
@ -9,6 +9,7 @@ vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
|||
vim.o.filetype = 'pandoc'
|
||||
require('luasnip').filetype_extend("pandoc", { "markdown" })
|
||||
vim.o.spell = true
|
||||
require('spelling').spell_keymap()
|
||||
vim.o.spelllang = 'en'
|
||||
vim.o.formatoptions = "qj"
|
||||
-- email commands: my/msy to paste the html inside the clipboard
|
||||
|
@ -39,7 +40,7 @@ vim.api.nvim_create_autocmd({ "OptionSet" }, {
|
|||
local texgroup = vim.api.nvim_create_augroup("latex", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "latex" },
|
||||
pattern = { "latex", "tex" },
|
||||
group = texgroup,
|
||||
callback = function()
|
||||
-- vimtex configuration
|
||||
|
@ -53,5 +54,6 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||
vim.o.foldexpr = 'vimtex#fold#level(v:lnum)'
|
||||
vim.o.foldtext = 'vimtex#fold#text()'
|
||||
vim.o.spell = true
|
||||
require('spelling').spell_keymap()
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -7,15 +7,13 @@ end
|
|||
local M = {}
|
||||
|
||||
M.spell_keymap = function()
|
||||
if vim.o.spell == true then
|
||||
vim.keymap.set("n", "<Leader>i", "mzl[s1z=`z", { noremap = true, silent = true, desc = "f[I]x typo under cursor" })
|
||||
vim.keymap.set("n", "à", "]s", { noremap = true, silent = true, desc = "Go to the next typo" })
|
||||
else
|
||||
keyunmap("n", "<Leader>i")
|
||||
keyunmap("n", "à")
|
||||
end
|
||||
if vim.o.spell == true then
|
||||
vim.keymap.set("n", "<Leader>i", "mzl[s1z=`z", { noremap = true, silent = true, desc = "f[I]x typo under cursor" })
|
||||
vim.keymap.set("n", "à", "]s", { noremap = true, silent = true, desc = "Go to the next typo" })
|
||||
else
|
||||
keyunmap("n", "<Leader>i")
|
||||
keyunmap("n", "à")
|
||||
end
|
||||
end
|
||||
|
||||
M.spell_keymap()
|
||||
|
||||
return M
|
||||
|
|
Loading…
Reference in New Issue
Block a user