AutoYADM commit: 2024-12-11 17:45:04
This commit is contained in:
parent
619dd343d5
commit
5f09c80e13
2 changed files with 12 additions and 9 deletions
|
@ -1,15 +1,7 @@
|
|||
local o = vim.opt
|
||||
return {
|
||||
"psliwka/vim-dirtytalk",
|
||||
-- enabled = false,
|
||||
build = ":DirtytalkUpdate",
|
||||
config = function()
|
||||
-- vim.opt.spelllang = { "en", "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
|
||||
require("spell-util").add("programming")
|
||||
end,
|
||||
}
|
||||
|
|
11
.config/nvim/lua/spell-util.lua
Normal file
11
.config/nvim/lua/spell-util.lua
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue