Skip to content

Commit b289412

Browse files
Using caching available in ncm
1 parent f6dda1a commit b289412

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pythonx/cm_sources/acid.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
abbreviation='acid',
66
scopes=['clojure'],
77
word_pattern=r'[\w!$%&*+/:<=>?@\^_~\-\.#]+',
8+
cm_refresh_patterns=[r'/$'],
89
priority=9)
910

1011
import os
@@ -24,6 +25,4 @@ def __init__(self,nvim):
2425
def cm_refresh(self,info,ctx):
2526
getLogger(__name__).debug('Running a refresh…')
2627
matches = self._acid_manager.gather_candidates(ctx['base'])
27-
# matches = ['foo', 'foobard', 'bazzer']
28-
getLogger(__name__).debug('Got matches', matches)
29-
self._nvim.call('cm#complete', info['name'], ctx, ctx['startcol'], matches, 1, async=True)
28+
self._nvim.call('cm#complete', info['name'], ctx, ctx['startcol'], matches, async=True)

pythonx/cm_sources/fireplace.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
abbreviation='🔥',
66
scopes=['clojure'],
77
word_pattern=r'[\w!$%&*+/:<=>?@\^_~\-\.#]+',
8+
cm_refresh_patterns=[r'/$'],
89
priority=9)
910

1011
import sys
@@ -23,4 +24,4 @@ def __init__(self,nvim):
2324
def cm_refresh(self,info,ctx):
2425
getLogger(__name__).debug('Running a refresh…')
2526
matches = self._cider_completion_manager.gather_candidates(ctx['base'])
26-
self._nvim.call('cm#complete', info['name'], ctx, ctx['startcol'], matches, 1, async=True)
27+
self._nvim.call('cm#complete', info['name'], ctx, ctx['startcol'], matches, False, async=True)

0 commit comments

Comments
 (0)