robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
f69aadd2b4
master
1" Vim filetype plugin file 2" Language: Vim help file 3" Previous Maintainer: Nikolai Weibull <now@bitwi.se> 4" Last Change: 2025 Apr 08 5" 2025 Apr 08 by Vim project (set 'omnifunc' and 'iskeyword', #17073) 6" 2025 Aug 08 by Vim project (unset comment options, #17889) 7" 2026 Apr 26 by Vim project (make HelpComplete global, #20024) 8 9if exists ( "b:did_ftplugin" ) 10finish 11endif 12let b: did_ftplugin = 1 13 14let s: cpo_save = & cpo 15set cpo & vim 16 17let b: undo_ftplugin = "setl isk< fo< tw< cole< cocu< keywordprg< omnifunc< comments< cms<" 18 19setl comments = cms = 20 21setlocal formatoptions += tcroqltextwidth = 78 keywordprg = :help!omnifunc = HelpComplete 22let & l: iskeyword = '!-~,^*,^|,^",192-255' 23if has ( "conceal" ) 24setlocal cole = 2 cocu = nc 25endif 26 27if ! exists ( '*HelpComplete' ) 28func HelpComplete ( findstart , base ) 29if a: findstart 30let colnr = col ( '.' ) - 1 " Get the column number before the cursor 31let line = getline ( '.' ) 32for i in range ( colnr - 1 , 0 , -1 ) 33if line [ i ] ==# '|' 34return i + 1 " Don't include the `|` in base 35elseif line [ i ] ==# "'" 36return i " Include the `'` in base 37endif 38endfor 39else 40return taglist ( '^' .. a: base ) 41 \ ->map ({ _ , item ->#{ word : item ->get ( 'name' ), kind : item ->get ( 'kind' )}}) 42 \ ->extend ( getcompletion ( a: base , 'help' )) 43endif 44endfunc 45endif 46 47let & cpo = s: cpo_save 48unlet s: cpo_save