Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"ripgrep": { "branch": "master", "commit": "041544853c86dde91c49983e5ddd0aa799bd2831" },
"ros.nvim": { "branch": "dev", "commit": "494635f02b6e6601e739e0bbf6f50d3886ad7e30" },
"schemastore.nvim": { "branch": "main", "commit": "357fe900baae09e1a3fcef913e49733d05d1f888" },
"spell.nvim": { "branch": "dev", "commit": "3c9bb25d9d4042f0e48289998616fdae03e689b4" },
"sqlite.lua": { "branch": "master", "commit": "b487fcc8937b683942a1f7d9662fcf50ca5acd58" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "c261d903a78c2cda47a5e44488621f10f9dd7fcf" },
"telescope-vim-bookmarks.nvim": { "branch": "main", "commit": "92498cbf7c127dea37c3d27117b60dd7ab9baef4" },
Expand Down
18 changes: 18 additions & 0 deletions lua/user/conf/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,24 @@ return {
end,
},

-- 单词拼写检查
{
"minhanghuang/spell.nvim",
event = "VeryLazy",
config = function()
require("user.conf.spell")
end,
},
-- -- dev单词拼写检查
-- {
-- dir = "/Users/cox/work/code/github/spell.nvim", -- 本地repo绝对路径
-- name = "nvim-spell", -- 可选,便于识别
-- event = "VeryLazy",
-- config = function()
-- require("user.conf.spell")
-- end,
-- },

-- 翻译
{
"voldikss/vim-translator",
Expand Down
11 changes: 11 additions & 0 deletions lua/user/conf/spell.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
local has_spell, spell = pcall(require, "nvim-spell")
if not has_spell then
vim.notify("nvim-spell not found!")
return
end

spell.setup({
enabled = true,
spellfile = vim.fn.stdpath('config') .. '/spell/custom.en.utf-8.add',
spelllang = { "en_us,cjk" },
})
7 changes: 7 additions & 0 deletions lua/user/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,10 @@ keymap("n", "<C-S-j>", "<Plug>(SmoothieDownwards)", { silent = true })
-- 翻译
keymap("n", "<C-t>", "<Plug>TranslateW", { silent = true })
keymap("v", "<C-t>", "<Plug>TranslateWV", { silent = true })

-- 单词拼写校验
keymap("n", "<leader>zs", ":SpellSuggest<CR>", { silent = true })
keymap("n", "<leader>zg", ":SpellAdd<CR>", { silent = true })
keymap("n", "<leader>zn", ":SpellNext<CR>", { silent = true })
keymap("n", "<leader>zp", ":SpellPrev<CR>", { silent = true })
keymap("n", "<leader>ze", ":SpellTogglePlugin<CR>", { silent = true })
11 changes: 11 additions & 0 deletions spell/custom.en.utf-8.add
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
leveldb
bytewise
comparator
dev
dir
VeryLazy
config
conf
nvim
github
keymap
Binary file added spell/custom.en.utf-8.add.spl
Binary file not shown.