Merge pull request #136 from sjl/preview-arglists

Add arglists to the omnicomplete preview window
This commit is contained in:
Tim Pope 2014-02-17 12:05:01 -05:00
commit 31eaa4455e

View File

@ -87,8 +87,8 @@ function! fireplace#omnicomplete(findstart, base) abort
return col('.') - strlen(matchstr(line, '\k\+$')) - 1
else
try
let omnifier = '(fn [[k v]] (let [m (meta v)]' .
\ ' {:word k :menu (pr-str (:arglists m (symbol ""))) :info (str " " (:doc m)) :kind (if (:arglists m) "f" "v")}))'
let omnifier = '(fn [[k v]] (let [{:keys [arglists] :as m} (meta v)]' .
\ ' {:word k :menu (pr-str (or arglists (symbol ""))) :info (str (when arglists (str arglists "\n")) " " (:doc m)) :kind (if arglists "f" "v")}))'
let ns = fireplace#ns()