diff options
Diffstat (limited to '.vim')
| -rw-r--r-- | .vim/after/ftplugin/mail.lua | 5 | ||||
| -rw-r--r-- | .vim/after/ftplugin/markdown.lua | 2 | ||||
| -rw-r--r-- | .vim/lua/colors.lua | 7 | ||||
| -rw-r--r-- | .vim/lua/spell.lua | 12 |
4 files changed, 19 insertions, 7 deletions
diff --git a/.vim/after/ftplugin/mail.lua b/.vim/after/ftplugin/mail.lua index 9912d65..beb2171 100644 --- a/.vim/after/ftplugin/mail.lua +++ b/.vim/after/ftplugin/mail.lua @@ -1,6 +1,3 @@ -vim.opt.spell = true -vim.opt.spelllang = 'de' -vim.opt.spellfile = vim.fn.stdpath('data') .. '/spellfile.utf-88.add' - +require('spell') vim.opt.cursorline = false diff --git a/.vim/after/ftplugin/markdown.lua b/.vim/after/ftplugin/markdown.lua index 7920b38..76d1bf1 100644 --- a/.vim/after/ftplugin/markdown.lua +++ b/.vim/after/ftplugin/markdown.lua @@ -1,7 +1,7 @@ local nnoremap = require('astronauta.keymap').nnoremap +require('spell') vim.opt.foldlevel = 1 -vim.opt.spell = true -- vim.fn.matchadd('Conceal', '\\[ \\]', 0, -1, { conceal = '☐' }) -- vim.fn.matchadd('Conceal', '\\[x\\]', 0, -1, { conceal = '☑' }) diff --git a/.vim/lua/colors.lua b/.vim/lua/colors.lua index 0f3b47b..6c80cdd 100644 --- a/.vim/lua/colors.lua +++ b/.vim/lua/colors.lua @@ -51,10 +51,13 @@ return lush(function() Question { fg = hsl(p.normal.green) }, -- |hit-enter| prompt and yes/no questions -- QuickFixLine { }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. SignColumn { gui = 'none' }, -- column where |signs| are displayed - SpecialKey { fg = hsl(p.dim.white) }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace| SpellBad Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise. SpellCap Word that should start with a capital. |spell| Combined with the highlighting used otherwise. SpellLocal Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise. + SpecialKey { fg = hsl(p.dim.white) }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace| + SpellBad { fg = hsl(p.bright.red), gui = 'underline' }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise. + -- SpellCap { }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise. + -- SpellLocal { }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise. -- SpellRare { }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise. StatusLine { fg = hsl(p.bright.white), bg = 'none', gui = 'bold' }, -- status line of current window - StatusLineNC { StatusLine, gui = 'none' }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. + StatusLineNC { fg = hsl(p.bright.white), bg = hsl(p.dim.white), gui = 'none' }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. Substitute { fg = hsl(p.normal.blue) }, -- |:substitute| replacement text highlighting TabLine { fg = hsl(p.dim.white) }, -- tab pages line, not active tab page label TabLineFill { StatusLineNC }, -- tab pages line, where there are no labels diff --git a/.vim/lua/spell.lua b/.vim/lua/spell.lua new file mode 100644 index 0000000..bed389e --- /dev/null +++ b/.vim/lua/spell.lua @@ -0,0 +1,12 @@ + +vim.opt.spell = true +-- vim.opt.spelllang = 'de_de,en_en' +vim.opt.spelllang = 'en_en' +vim.opt.spellfile = vim.fn.stdpath('data') .. '/spellfile.utf-8.add' + +require('astronauta.keymap').nnoremap { + '<C-l>', require('telescope.builtin').spell_suggest, +} +require('astronauta.keymap').inoremap { + '<C-l>', [[ <c-g>u<esc>[s1z=`]a<c-g>u ]], +} |