aboutsummaryrefslogtreecommitdiff
path: root/ftplugin/mail.vim
blob: af35487c8c0606c1654b8a31fb95b6a28ef26710 (plain)
1
2
3
4
5
6
7
8
9
10
11
function s:update_wrapping()
	if coc#source#khard#should_complete({ 'line': getline('.') })
		" temporarily disable line wrapping
		setlocal formatoptions-=tc
	else
		" re-enable line wrapping
		setlocal formatoptions+=tc
	endif
endfunction

autocmd CursorMoved,CursorMovedI <buffer> call s:update_wrapping()