Skip to content

Commit cd5b2be

Browse files
Add ncm2 support
1 parent ea557c5 commit cd5b2be

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

autoload/async_clj_omni/ncm2.vim

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
if exists('g:async_clj_omni_loaded_ncm2')
2+
finish
3+
endif
4+
let g:async_clj_omni_loaded_ncm2 = 1
5+
6+
function! s:on_complete(c)
7+
call fireplace#omnicomplete({candidates ->
8+
\ ncm2#complete(a:c, a:c.startccol, candidates, 1)
9+
\ },
10+
\ a:c.base)
11+
endf
12+
13+
function! async_clj_omni#ncm2#init()
14+
call ncm2#register_source({
15+
\ 'name': 'async_clj_omni',
16+
\ 'mark': 'clj',
17+
\ 'priority': 9,
18+
\ 'word_pattern': '[\w!$%&*+/:<=>?@\^_~\-\.#]+',
19+
\ 'complete_pattern': ['\.', '/'],
20+
\ 'complete_length': 0,
21+
\ 'matcher': 'none',
22+
\ 'scope': ['clojure'],
23+
\ 'on_complete': function('<SID>on_complete'),
24+
\ })
25+
endf

ncm2-plugin/async_clj_omni.vim

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
call async_clj_omni#ncm2#init()

0 commit comments

Comments
 (0)