Permalink
Browse files

Add dein source for denite

  • Loading branch information...
1 parent 2df7b94 commit d63858c8f2b42c1ddab9c9296148b169240cc74b @Shougo committed Oct 6, 2016
Showing with 33 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +10 −0 doc/dein.txt
  3. +22 −0 rplugin/python3/denite/source/dein.py
View
@@ -1,3 +1,4 @@
doc/tags
.cache
.cache2
+*.py[cod]
View
@@ -16,6 +16,7 @@ Interface |dein-interface|
Options |dein-options|
Toml |dein-toml|
Unite Sources |dein-unite-sources|
+Denite Sources |dein-denite-sources|
Configuration Examples |dein-examples|
FAQ |dein-faq|
Compatibility |dein-compatibility|
@@ -890,6 +891,15 @@ dein/log
1. "!"
==============================================================================
+DENITE SOURCES *dein-denite-sources*
+
+Here let me explain about a source for |denite| provided in dein.
+
+ *dein-denite-source-dein*
+dein
+ Nominates dein plugins as candidates.
+
+==============================================================================
EXAMPLES *dein-examples*
>
if &compatible
@@ -0,0 +1,22 @@
+# ============================================================================
+# FILE: dein.py
+# AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com>
+# License: MIT license
+# ============================================================================
+
+from .base import Base
+import re
+
+class Source(Base):
+
+ def __init__(self, vim):
+ Base.__init__(self, vim)
+
+ self.name = 'dein'
+ self.kind = 'directory'
+
+ def gather_candidates(self, context):
+ pat = re.compile('^(https?|git)://(github.com/)?')
+ return [{'word': pat.sub('', x['repo']),
+ 'action__path': x['path']} for x
+ in self.vim.eval('values(dein#get())')]

0 comments on commit d63858c

Please sign in to comment.