spell stuf

This commit is contained in:
2025-06-08 11:18:52 +02:00
parent e63b46fc68
commit 9036e94a51
5 changed files with 47 additions and 16 deletions
+20 -2
View File
@@ -26,10 +26,14 @@ vim.api.nvim_create_autocmd("FileType", {
-- If current buffer is in skip list, do nothing
for _, bt in ipairs(skip_buftypes) do
if buftype == bt then return end
if buftype == bt then
return
end
end
for _, ft in ipairs(skip_filetypes) do
if filetype == ft then return end
if filetype == ft then
return
end
end
-- Else, enable spellcheck
@@ -38,6 +42,20 @@ vim.api.nvim_create_autocmd("FileType", {
end,
})
-- Toggle spell check with <leader>sc
vim.keymap.set("n", "<leader>sc", function()
vim.wo.spell = not vim.wo.spell
print("Spell checking: " .. (vim.wo.spell and "ON" or "OFF"))
end, { desc = "Toggle spell checking" })
-- Switch between English and German with <leader>sl
vim.keymap.set("n", "<leader>sl", function()
local current = vim.opt.spelllang:get()[1] or ""
local new_lang = current == "en" and "de" or "en"
vim.opt.spelllang = new_lang
print("Spell language: " .. new_lang)
end, { desc = "Switch spell language" })
-- Clear search highlights when entering insert mode.
vim.api.nvim_create_autocmd("InsertEnter", {
callback = function()
Binary file not shown.
Binary file not shown.
+13
View File
@@ -6,3 +6,16 @@ npm
InDesign
Vue
monorepo
config
AeroSpace
macOS
github
toml
dvorak
colemak
nvim
yazi
Gruvbox
fzf
eza
bitwarden
Binary file not shown.