[Spell] Update binds, fix issue

This commit is contained in:
Janis Hutz 2025-06-05 11:55:27 +02:00
parent ee9066213b
commit 620a5cd2d6

View File

@ -114,14 +114,14 @@ keymap.set("i", "<C-0>", "<Home>", opts("Jump to beginning of line"))
-- Spell checking
function StopTextlsp()
local clients = vim.lsp.get_clients()
for client in clients do
for _, client in pairs(clients) do
if client.name == "textlsp" then
vim.lsp.stop_client(client.id)
end
end
end
keymap.set("n", "<leader>sr", ':lua vim.lsp.enable("textlsp")<CR>', opts("Start textlsp"))
keymap.set("n", "<leader>sr", ':LspStart textlsp', opts("Start textlsp"))
keymap.set("n", "<leader>sq", StopTextlsp, opts("Stop textlsp"))
keymap.set("n", "<leader>ss", ":set spell<CR>", opts("Start built-in spell checker"))
keymap.set("n", "<leader>sn", ":set nospell<CR>", opts("Stop spell checker"))