From becb46897a4c9fac8126b66266e8cc25c840cfdc Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Sat, 10 Aug 2024 17:16:17 +0200 Subject: nvim: Add cooklang --- nvim/nvim/ftplugin/cook.vim | 10 ++++++++++ nvim/nvim/init.lua | 1 + 2 files changed, 11 insertions(+) create mode 100644 nvim/nvim/ftplugin/cook.vim (limited to 'nvim') diff --git a/nvim/nvim/ftplugin/cook.vim b/nvim/nvim/ftplugin/cook.vim new file mode 100644 index 0000000..6d70be6 --- /dev/null +++ b/nvim/nvim/ftplugin/cook.vim @@ -0,0 +1,10 @@ +" Spellcheck in cooklang (automatic to english) +setlocal spelllang=en +setlocal spell +setlocal formatoptions+=t + +" Auto-capitalize script +augroup SENTENCES + au! + autocmd InsertCharPre * if &ft=='markdown' | if search('\v(%^|[.!?]\_s+|\_^\-\s|\_^title\:\s|\n\n)%#', 'bcnw') != 0 | let v:char = toupper(v:char) | endif | endif +augroup END diff --git a/nvim/nvim/init.lua b/nvim/nvim/init.lua index de2627b..0365d1e 100644 --- a/nvim/nvim/init.lua +++ b/nvim/nvim/init.lua @@ -8,6 +8,7 @@ vim.fn["plug#begin"]() Plug("julienvincent/nvim-paredit") -- Some paredit commands Plug("ekaitz-zarraga/nvim-paredit-scheme") -- Scheme extension Plug("windwp/nvim-autopairs") -- Autobalance parens + Plug('luizribeiro/vim-cooklang') Plug("dracula/vim") Plug("othree/html5.vim") Plug("zaid/vim-rec") -- cgit v1.2.3