Liking cljdoc? Tell your friends :D

rebel-readline.clojure.line-reader


*accept-fn*clj


-accept-linecljmultimethod

Takes a string that is represents the current contents of a readline buffer and an integer position into that readline that represents the current position of the cursor.

Returns a boolean indicating wether the line is complete and should be accepted as input.

A service is not required to implement this fn, they would do this to override the default accept line behavior

Takes a string that is represents the current contents of a
readline buffer and an integer position into that readline that
represents the current position of the cursor.

Returns a boolean indicating wether the line is complete and
should be accepted as input.

A service is not required to implement this fn, they would do
this to override the default accept line behavior
raw docstring

-aproposcljmultimethod

Given a string returns a list of string repesentions of vars that match that string. This fn is already implemented on all the Clojure plaforms.

Given a string returns a list of string repesentions of vars
that match that string. This fn is already implemented on all
the Clojure plaforms.
raw docstring

-completecljmultimethod

Takes a word prefix and an options map}

The options map can contain :ns - the current namespace the completion is occuring in :context - a sexp form that contains a marker 'prefix replacing the given prefix in teh expression where it is being completed. i.e. '(list prefix 1 2)

Returns a list of candidates of the form

{:candidate "alength" :ns "clojure.core" :type :function}

Takes a word prefix and an options map}

The options map can contain
`:ns`      - the current namespace the completion is occuring in
`:context` - a sexp form that contains a marker '__prefix__
   replacing the given prefix in teh expression where it is being
   completed. i.e. '(list __prefix__ 1 2)

Returns a list of candidates of the form

{:candidate "alength"
 :ns "clojure.core"
 :type :function}
raw docstring

-current-nscljmultimethod

Returns a string representation of the current ns in the current execution environment.

Returns nil if it hasn't been implemented for the current service

Returns a string representation of the current ns in the current
execution environment.

Returns nil if it hasn't been implemented for the current service
raw docstring

-doccljmultimethod

Given a string that represents a var, returns a map with documentation information for the named var or nil if no documentation is found.

A required :doc key which will hold a string of the documentation for the given var.

An optional :url key which will hold a url to the online documentation for the given var.

Given a string that represents a var, returns a map with
documentation information for the named var or nil if no
documentation is found.

A required :doc key which will hold a string of the documentation
for the given var.

An optional :url key which will hold a url to the online
documentation for the given var.
raw docstring

-evalcljmultimethod

Given a clojure form this will evaluate that form and return a map of the outcome.

The returned map will contain a :result key with a clj form that represents the result of it will contain a :printed-result key if the form can only be returned as a printed value.

The returned map will also contain :out and :err keys containing any captured output that occured during the evaluation of the form.

Example: (-eval @api/line-reader 1) => {:result 1 :out "" :err ""}

If an exception is thrown this will return a throwable map under the key :exception

Example: (-eval @api/line-reader '(defn)) => {:exception {:cause ...}}

An important thing to remember abou this eval is that it is used internally by the line-reader to implement various capabilities (line inline eval)

Given a clojure form this will evaluate that form and return a
map of the outcome.

The returned map will contain a `:result` key with a clj form that
represents the result of it will contain a `:printed-result` key
if the form can only be returned as a printed value.

The returned map will also contain `:out` and `:err` keys
containing any captured output that occured during the evaluation
of the form.

Example:
(-eval @api/*line-reader* 1) => {:result 1 :out "" :err ""}

If an exception is thrown this will return a throwable map under
the key `:exception`

Example:
(-eval @api/*line-reader* '(defn)) => {:exception {:cause ...}}

An important thing to remember abou this eval is that it is used
internally by the line-reader to implement various
capabilities (line inline eval)
raw docstring

-eval-strcljmultimethod

Just like -eval but takes and string and reads it before sending it on to -eval

Just like `-eval` but takes and string and reads it before
sending it on to `-eval`
raw docstring

-read-stringcljmultimethod

Given a string with that contains clojure forms this will read and return a map containing the first form in the string under the key :form

Example: (-read-string @api/line-reader "1") => {:form 1}

If an exception is thrown this will return a throwable map under the key :exception

Example: (-read-string @api/line-reader "#asdfasdfas") => {:exception {:cause ...}}

Given a string with that contains clojure forms this will read
and return a map containing the first form in the string under the
key `:form`

Example:
(-read-string @api/*line-reader* "1") => {:form 1}

If an exception is thrown this will return a throwable map under
the key `:exception`

Example:
(-read-string @api/*line-reader* "#asdfasdfas") => {:exception {:cause ...}}
raw docstring

-resolve-metacljmultimethod

Currently this finds and returns the meta data for the given string currently we are using the :ns, :name, :doc and :arglist meta data that is found on both vars, namespaces

This function should return the standard or enhanced meta information that is afor a given "word" that and editor can focus on.

(resolve (symbol var-str))

This function shouldn't throw errors but catch them and return nil if the var doesn't exist.

Currently this finds and returns the meta data for the given
string currently we are using the :ns, :name, :doc and :arglist
meta data that is found on both vars, namespaces

This function should return the standard or enhanced meta
information that is afor a given "word" that and editor can
focus on.

`(resolve (symbol var-str))`

This function shouldn't throw errors but catch them and return nil
if the var doesn't exist.
raw docstring

-sourcecljmultimethod

Given a string that represents a var Returns a map with source information for the var or nil if no source is found.

A required :source key which will hold a string of the source code for the given var.

An optional :url key which will hold a url to the source code in the context of the original file or potentially some other helpful url.

DESIGN NOTE the :url isn't currently used

Example result for (-source service "some?"):

{:source "(defn ^boolean some? [x] \n(not (nil? x)))" :url "https://github.com[...]main/cljs/cljs/core.cljs#L243-L245" }

Given a string that represents a var Returns a map with source
information for the var or nil if no source is found.

A required :source key which will hold a string of the source code
for the given var.

An optional :url key which will hold a url to the source code in
the context of the original file or potentially some other helpful url.

DESIGN NOTE the :url isn't currently used

Example result for `(-source service "some?")`:

  {:source "(defn ^boolean some? [x] \n(not (nil? x)))"
   :url "https://github.com[...]main/cljs/cljs/core.cljs#L243-L245" }
raw docstring

accept-lineclj

(accept-line line-str cursor)

add-all-widgetsclj

(add-all-widgets line-reader)

add-widgets-and-bindingsclj

(add-widgets-and-bindings line-reader)

always-accept-lineclj


aproposclj

(apropos wrd)

apropos-at-point-widgetclj


backward-delete-charclj


beginning-of-bufferclj


bind-clojure-widgetsclj

(bind-clojure-widgets km-name)

bind-clojure-widgets-vi-cmdclj

(bind-clojure-widgets-vi-cmd km-name)

bind-indentsclj

(bind-indents km-name)

candidateclj

(candidate {:keys [candidate type ns]})

cljs-quit-completeclj

(cljs-quit-complete {:keys [word] :as parsed-line})

clojure-completerclj

(clojure-completer)

clojure-emacs-modeclj

(clojure-emacs-mode km-name)

clojure-highlighterclj

(clojure-highlighter)

clojure-vi-cmd-modeclj

(clojure-vi-cmd-mode km-name)

clojure-vi-insert-modeclj

(clojure-vi-insert-mode km-name)

command-token?clj

(command-token? {:keys [line tokens word]} starts-with)

complete-contextclj

(complete-context parsed-line)

completionsclj

(completions word)
(completions word options)

createclj

(create service & [options])

Creates a line reader takes a service as an argument.

A service implements the multimethods found in rebel-readline.service

Example: (create (rebel-readline.clojure.service.local/create)) Or: (create (rebel-readline.clojure.service.simple/create))

This function also takes an optional options map.

The available options are:

:completer - to override the clojure based completer :highlighter - to override the clojure based systax highlighter :parser - to override the clojure base word parser

Creates a line reader takes a service as an argument.

A service implements the multimethods found in `rebel-readline.service`

Example:
  (create (rebel-readline.clojure.service.local/create))
Or:
  (create (rebel-readline.clojure.service.simple/create))

This function also takes an optional options map.

The available options are:

:completer - to override the clojure based completer
:highlighter - to override the clojure based systax highlighter
:parser - to override the clojure base word parser
raw docstring

create*clj

(create* terminal service & [{:keys [completer highlighter parser]}])

current-nsclj


default-accept-lineclj

(default-accept-line line-str cursor)

default-configclj


default-prompt-fnclj

(default-prompt-fn)

display-argument-help-messageclj

(display-argument-help-message)

display-lessclj

(display-less at-str)
(display-less at-str options)

divide-into-displayable-columnsclj

(divide-into-displayable-columns coll total-width)

docclj

(doc wrd)

document-at-point-widgetclj


eldoc-self-insert-hookclj

(eldoc-self-insert-hook)

This hooks SELF_INSERT to capture most keypresses that get echoed out to the terminal. We are using it here to display interactive behavior based on the state of the buffer at the time of a keypress.

This hooks SELF_INSERT to capture most keypresses that get echoed
out to the terminal. We are using it here to display interactive
behavior based on the state of the buffer at the time of a keypress.
raw docstring

eliminate-long-outliersclj

(eliminate-long-outliers coll)

end-of-bufferclj


ensure-newlineclj

(ensure-newline s)

eval-at-point-widgetclj


evaluateclj

(evaluate form)

evaluate-strclj

(evaluate-str form-str)

find-completionsclj

(find-completions candidates prefix)

find-number-of-columnsclj

(find-number-of-columns coll total-width)

format-columnclj

(format-column wrd column)

format-data-eval-resultclj

(format-data-eval-result {:keys [out err result printed-result exception]
                          :as eval-result})

format-pair-to-widthclj

(format-pair-to-width wrd width [ns' name'])

formatted-aproposclj

(formatted-apropos wrd)

highlight-clj-strclj


in-place-evalclj

(in-place-eval)

indentclj

(indent line-reader line cursor)

indent-amountclj

(indent-amount s cursor)

indent-line-widgetclj


indent-or-complete-widgetclj


indent-proxy-strclj

(indent-proxy-str s cursor)

inline-result-markerclj

(inline-result-marker at-str)

limit-character-sizeclj

(limit-character-size s)

make-parserclj

(make-parser)

meanclj

(mean coll)

name-arglist-displayclj

(name-arglist-display meta-data)

no-greater-thanclj

(no-greater-than limit val)

one-space-after-funcall-word?clj

(one-space-after-funcall-word?)

(osc-hyper-link url show)

parse-lineclj

(parse-line line cursor)

parsed-lineclj

(parsed-line {:keys [word-index word word-cursor words tokens line cursor]
              :as parse-data})

parsed-line-word-coordsclj

(parsed-line-word-coords parsed-line)

read-formclj

(read-form form-str)

repl-command-completeclj

(repl-command-complete {:keys [word] :as parsed-line})

replace-word-with-prefixclj

(replace-word-with-prefix parsed-line)

resolve-metaclj

(resolve-meta wrd)

row-widthclj

(row-width columns)

sourceclj

(source wrd)

source-at-pointclj

(source-at-point)

source-at-point-widgetclj


split-into-wrapped-linesclj

(split-into-wrapped-lines at-str columns)

standard-deviationclj

(standard-deviation coll)

two-standards-plus-meanclj

(two-standards-plus-mean coll)

window-linesclj

(window-lines at-str-lines pos rows)

word-at-cursorclj

(word-at-cursor)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close