From 158680f6a10b64545d03ea1895155c07d8ed30fa Mon Sep 17 00:00:00 2001 From: Andrea Richiardi Date: Wed, 24 Jan 2018 20:36:18 -0800 Subject: [PATCH] [Fix #334] Add common metadata keys to completion keywords --- CHANGELOG.md | 1 + src/cljs/snapshot/lumo/repl.cljs | 5 ++++- src/test/lumo/lumo/repl_tests.cljs | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea8311f9..085abdf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Don't look for the REPL history file in the user's home directory if one doesn't exist ([#309](https://github.com/anmonteiro/lumo/issues/309)). - Use `tools.reader` with the unicode literal / cljs.core/bit-or warning ([#341](https://github.com/anmonteiro/lumo/issues/341)). - Auto-completion fails with numbers in ns names ([#332](https://github.com/anmonteiro/lumo/issues/332)) +- Add common metadata keys to completion keywords ([#344](https://github.com/anmonteiro/lumo/issues/344)). ### Changes diff --git a/src/cljs/snapshot/lumo/repl.cljs b/src/cljs/snapshot/lumo/repl.cljs index 4a2faa97..198f3876 100644 --- a/src/cljs/snapshot/lumo/repl.cljs +++ b/src/cljs/snapshot/lumo/repl.cljs @@ -1337,10 +1337,13 @@ :clj :cljs :default :else + :private :doc :author :gen-class :keywordize-keys :req :req-un :opt :opt-un - :args :ret :fn])) + :args :ret :fn + :const + :arglists :tag :static :added])) (def ^:private namespace-completion-exclusions (into #{} (map str) diff --git a/src/test/lumo/lumo/repl_tests.cljs b/src/test/lumo/lumo/repl_tests.cljs index 905226c1..b9183d15 100644 --- a/src/test/lumo/lumo/repl_tests.cljs +++ b/src/test/lumo/lumo/repl_tests.cljs @@ -65,7 +65,7 @@ (is-completion "" (lumo/completion-candidates false nil))) (testing "keyword completions" (is-completion ":" lumo/keyword-completions) - (is-completion ":a" [":args" ":as"]) + (is-completion ":a" [":added" ":arglists" ":args" ":as" ":author"]) (is-completion ":ref" [":refer" ":refer-clojure" ":refer-macros"])) (testing "aliased namespaces completions" (with-redefs [lumo/current-alias-map (fn []