summaryrefslogtreecommitdiffstats
path: root/.config/nvim/autoload
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/autoload')
-rw-r--r--.config/nvim/autoload/bukutagcomplete.vim18
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 @@
1function! 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
18endfunction