Code completion functionality.
This namespace is based on compliment-lite. (https://github.com/alexander-yakushev/compliment/tree/master/lite)
The functionality here is experimental and the API is subject to changes.
Code completion functionality. This namespace is based on compliment-lite. (https://github.com/alexander-yakushev/compliment/tree/master/lite) The functionality here is experimental and the API is subject to changes.
Signals to downstream sources which additional information about completion candidates they should attach . Should be a set of keywords.
Signals to downstream sources which additional information about completion candidates they should attach . Should be a set of keywords.
(aliased-candidates prefix ns)
Returns a list of alias-qualified double-colon keywords (like ::str/foo), where alias has to be registered in the given namespace.
Returns a list of alias-qualified double-colon keywords (like ::str/foo), where alias has to be registered in the given namespace.
(all-sources)
(all-sources source-kws)
Returns the list of all completion sources, or the selected once specified by
source-kws
.
Returns the list of all completion sources, or the selected once specified by `source-kws`.
(camel-case-matches? prefix member-name)
Tests if prefix matches the member name following camel case rules.
Thus, prefix getDeF
matches member getDeclaredFields
.
Tests if prefix matches the member name following camel case rules. Thus, prefix `getDeF` matches member `getDeclaredFields`.
(class-member-symbol? x)
Tests if a symbol name looks like a non-static class member.
Tests if a symbol name looks like a non-static class member.
(classes-candidates prefix ns _)
Returns a list of classname completions.
Returns a list of classname completions.
(classes-on-classpath)
Returns a map of all classes that can be located on the classpath. Key represent the root package of the class, and value is a list of all classes for that package.
Returns a map of all classes that can be located on the classpath. Key represent the root package of the class, and value is a list of all classes for that package.
(completions prefix)
(completions prefix ns)
(completions prefix
ns
{:keys [sort-order sources extra-metadata]
:or {sort-order :by-name}})
Returns a list of completions for the given prefix.
Options map can contain the following options:
Returns a list of completions for the given prefix. Options map can contain the following options: - :ns - namespace where completion is initiated; - :sort-order (either :by-length or :by-name); - :extra-metadata - set of extra fields to add to the maps; - :sources - list of source keywords to use.
(dash-matches? prefix var)
Tests if prefix partially matches a var name with dashes as separators.
Tests if prefix partially matches a var name with dashes as separators.
(defsource name & {:keys [candidates] :as kw-args})
Define a source with the given name and completion function:
:candidates
- a function of prefix, namespace and context.
Define a source with the given name and completion function: `:candidates` - a function of prefix, namespace and context.
(ensure-ns nspc)
Takes either a namespace object or a symbol and returns the corresponding
namespace if it exists, otherwise returns user
namespace.
Takes either a namespace object or a symbol and returns the corresponding namespace if it exists, otherwise returns `user` namespace.
(fuzzy-matches-no-skip? prefix symbol separator?)
Tests if symbol matches the prefix where separator? checks whether character
is a separator. Unlike fuzzy-matches?
requires separator characters to be
present in prefix.
Tests if symbol matches the prefix where separator? checks whether character is a separator. Unlike `fuzzy-matches?` requires separator characters to be present in prefix.
(fuzzy-matches? prefix symbol separator)
Tests if symbol matches the prefix when symbol is split into parts on separator.
Tests if symbol matches the prefix when symbol is split into parts on separator.
(get-all-members ns context-class)
Returns all non-static members for a given namespace.
Returns all non-static members for a given namespace.
(list-jdk9-base-classfiles)
Because on JDK9+ the classfiles are stored not in rt.jar on classpath, but in modules, we have to do extra work to extract them.
Because on JDK9+ the classfiles are stored not in rt.jar on classpath, but in modules, we have to do extra work to extract them.
(literal-candidates prefix _ __)
We define true
, false
, and nil
in a separate source because they are
not context-dependent (don't have to be first items in the list).
We define `true`, `false`, and `nil` in a separate source because they are not context-dependent (don't have to be first items in the list).
Stores cache of all non-static members for every namespace.
Stores cache of all non-static members for every namespace.
(members-candidates prefix ns _)
Returns a list of Java non-static fields and methods candidates.
Returns a list of Java non-static fields and methods candidates.
(namespace-alias-candidates prefix ns)
Returns a list of namespace aliases prefixed by double colon required in the given namespace.
Returns a list of namespace aliases prefixed by double colon required in the given namespace.
(namespaces&files-on-classpath)
Returns a collection of maps (e.g. {:ns-str "some.ns", :file "some/ns.cljs"}
) of all clj/cljc/cljs namespaces obtained by classpath
scanning.
Returns a collection of maps (e.g. `{:ns-str "some.ns", :file "some/ns.cljs"}`) of all clj/cljc/cljs namespaces obtained by classpath scanning.
(namespaces-candidates prefix ns _)
Return a list of namespace candidates.
Return a list of namespace candidates.
(nscl-matches? prefix namespace)
Tests if prefix partially matches a namespace or classname with periods as separators.
Tests if prefix partially matches a namespace or classname with periods as separators.
(nscl-symbol? x)
Tests if prefix looks like a namespace or classname.
Tests if prefix looks like a namespace or classname.
(populate-members-cache ns classes imported-classes-cnt)
Populate members cache of class members for ns
from the given list of
classes. imported-classes-cnt
is a number that indicates the current number
of imported classes in this namespace.
Populate members cache of class members for `ns` from the given list of classes. `imported-classes-cnt` is a number that indicates the current number of imported classes in this namespace.
(populate-static-members-cache class)
Populates static members cache for a given class.
Populates static members cache for a given class.
(qualified-candidates prefix ns)
Returns a list of namespace-qualified double-colon keywords (like ::foo) resolved for the given namespace.
Returns a list of namespace-qualified double-colon keywords (like ::foo) resolved for the given namespace.
(resolve-class ns sym)
Tries to resolve a classname from the given symbol, or returns nil if classname can't be resolved.
Tries to resolve a classname from the given symbol, or returns nil if classname can't be resolved.
(resolve-namespace sym ns)
Tries to resolve a namespace from the given symbol, either from a fully qualified name or an alias in the given namespace.
Tries to resolve a namespace from the given symbol, either from a fully qualified name or an alias in the given namespace.
(root-packages-on-classpath)
Return a set of all classname "TLDs" on the classpath.
Return a set of all classname "TLDs" on the classpath.
(special-candidates prefix _ _)
Returns list of completions for special forms.
Returns list of completions for special forms.
(split-by-leading-literals symbol-str)
Separate quote/var/deref qualifiers from a var name.
Separate quote/var/deref qualifiers from a var name.
(static-member-symbol? x)
Tests if prefix looks like a static member symbol, returns parsed parts.
Tests if prefix looks like a static member symbol, returns parsed parts.
(static-members class)
Returns all static members for a given class.
Returns all static members for a given class.
Stores cache of all static members for every class.
Stores cache of all static members for every class.
(static-members-candidates prefix ns _)
Returns a list of static member candidates.
Returns a list of static member candidates.
(static? member)
Tests if class member is static.
Tests if class member is static.
(update-cache ns)
(update-cache ns context-class)
Updates members cache for a given namespace if necessary.
Updates members cache for a given namespace if necessary.
(var-symbol? x)
Test if prefix resembles a var name.
Test if prefix resembles a var name.
(vars-candidates prefix ns _)
Returns a list of namespace-bound candidates, with namespace being
either the scope (if prefix is scoped), ns
arg or the namespace
extracted from context if inside ns
declaration.
Returns a list of namespace-bound candidates, with namespace being either the scope (if prefix is scoped), `ns` arg or the namespace extracted from context if inside `ns` declaration.
(with-classpath-cache key value)
If cache for name
is absent, or key
doesn't match the key in the cache,
calculate v
and return it. Else return value from cache.
If cache for `name` is absent, or `key` doesn't match the key in the cache, calculate `v` and return it. Else return value from cache.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close