Public Access
spell stuf
This commit is contained in:
+20
-2
@@ -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.
@@ -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.
Reference in New Issue
Block a user