diff options
| author | Yigit Sever | 2021-10-27 15:26:56 +0300 |
|---|---|---|
| committer | Yigit Sever | 2021-10-27 15:26:56 +0300 |
| commit | adb93f97e43702251d48f30972acdd804b0fdef4 (patch) | |
| tree | 8c16e37267f2198b1b32d618e7f2ea00dc44f501 /.config/nvim/autoload | |
| parent | b749a0b1e096d9271707a88e769a8089c38f5731 (diff) | |
| download | dotfiles-adb93f97e43702251d48f30972acdd804b0fdef4.tar.gz dotfiles-adb93f97e43702251d48f30972acdd804b0fdef4.tar.bz2 dotfiles-adb93f97e43702251d48f30972acdd804b0fdef4.zip | |
nvim: buku omnifunc
Diffstat (limited to '.config/nvim/autoload')
| -rw-r--r-- | .config/nvim/autoload/bukutagcomplete.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/.config/nvim/autoload/bukutagcomplete.vim b/.config/nvim/autoload/bukutagcomplete.vim new file mode 100644 index 0000000..3049905 --- /dev/null +++ b/.config/nvim/autoload/bukutagcomplete.vim | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | function! bukutagcomplete#Complete(findstart, base) | ||
| 2 | if a:findstart == 1 | ||
| 3 | let line = getline('.') | ||
| 4 | let idx = col('.') | ||
| 5 | while idx > 0 | ||
| 6 | let idx -= 1 | ||
| 7 | let c = line[idx] | ||
| 8 | if c == ':' || c == '>' | ||
| 9 | return idx + 2 | ||
| 10 | else | ||
| 11 | continue | ||
| 12 | endif | ||
| 13 | endwhile | ||
| 14 | return idx | ||
| 15 | else | ||
| 16 | return split(system('buku --stag --np | pcregrep -o1 " ([a-zA-Z ]+) (?=\()" | grep ' . a:base), '\n') | ||
| 17 | endif | ||
| 18 | endfunction | ||
