AutoYADM commit: 2024-12-11 17:45:04

This commit is contained in:
Daniel Fichtinger 2024-12-11 17:45:04 -05:00
parent 619dd343d5
commit 5f09c80e13
2 changed files with 12 additions and 9 deletions

View file

@ -1,15 +1,7 @@
local o = vim.opt
return { return {
"psliwka/vim-dirtytalk", "psliwka/vim-dirtytalk",
-- enabled = false,
build = ":DirtytalkUpdate", build = ":DirtytalkUpdate",
config = function() config = function()
-- vim.opt.spelllang = { "en", "programming" } require("spell-util").add("programming")
-- vim.opt.spelllang = vim.tbl_extend("error", vim.opt.spelllang, { "programming" })
local current = o.spelllang:get()
if not vim.tbl_contains(current, "programming") then
table.insert(current, "programming")
end
o.spelllang = current
end, end,
} }

View file

@ -0,0 +1,11 @@
local M = {}
M.add = function(lang)
local current = vim.opt.spelllang:get()
if not vim.tbl_contains(current, lang) then
table.insert(current, lang)
end
vim.opt.spelllang = current
end
return M