Liking cljdoc? Tell your friends :D
Clojure only.

repl-balance.clojure.line-reader


*accept-fn*clj

source

-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
sourceraw 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.
sourceraw 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}
sourceraw 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
sourceraw 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.
sourceraw 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)
sourceraw 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`
sourceraw 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 ...}}
sourceraw 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.
sourceraw 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" }
sourceraw docstring

accept-lineclj

(accept-line line-str cursor)
source

add-all-widgetsclj

(add-all-widgets line-reader)
source

add-widgets-and-bindingsclj

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

always-accept-lineclj

source

aproposclj

(apropos wrd)
source

apropos-at-point-widgetclj

source

beginning-of-bufferclj

source

bind-clojure-widgetsclj

(bind-clojure-widgets km-name)
source

bind-clojure-widgets-vi-cmdclj

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

bind-indentsclj

(bind-indents km-name)
source

bind-paredit-widgetsclj

(bind-paredit-widgets km-name)
source

candidateclj

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

cljs-quit-completeclj

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

clojure-completerclj

(clojure-completer)
source

clojure-emacs-modeclj

(clojure-emacs-mode km-name)
source

clojure-highlightercljdeprecated

(clojure-highlighter)
source

clojure-highlighter+clj

(clojure-highlighter+)
source

clojure-vi-cmd-modeclj

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

clojure-vi-insert-modeclj

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

command-token?clj

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

complete-contextclj

(complete-context parsed-line)
source

completionsclj

(completions word)
(completions word options)
source

copy-region-as-killclj

default behavior leaves the region activate

default behavior leaves the region activate
sourceraw docstring

createclj

(create service & [options])

Creates a line reader takes a service as an argument.

A service implements the multimethods found in repl-balance.service

Example: (create (repl-balance.clojure.service.local/create)) Or: (create (repl-balance.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 `repl-balance.service`

Example:
  (create (repl-balance.clojure.service.local/create))
Or:
  (create (repl-balance.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
sourceraw docstring

create*clj

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

current-nsclj

source

deactivate-regionclj

(deactivate-region)

self-inset hook to deactivate the region when typing starts

self-inset hook to deactivate the region when typing starts
sourceraw docstring

default-accept-lineclj

(default-accept-line line-str cursor)
source

default-configclj

source

default-prompt-fnclj

(default-prompt-fn)
source

display-argument-help-messageclj

(display-argument-help-message)
source

display-lessclj

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

divide-into-displayable-columnsclj

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

docclj

(doc wrd)
source

document-at-point-widgetclj

source

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.
sourceraw docstring

eliminate-long-outliersclj

(eliminate-long-outliers coll)
source

end-of-bufferclj

source

ensure-newlineclj

(ensure-newline s)
source

eval-at-point-widgetclj

source

evaluateclj

(evaluate form)
source

evaluate-strclj

(evaluate-str form-str)
source

find-completionsclj

(find-completions candidates prefix)
source

find-number-of-columnsclj

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

format-columnclj

(format-column wrd column)
source

format-data-eval-resultclj

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

format-pair-to-widthclj

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

formatted-aproposclj

(formatted-apropos wrd)
source

highlight-clj-strclj

source

in-place-evalclj

(in-place-eval)
source

indentclj

(indent line-reader line cursor)
source

indent-amountclj

(indent-amount s cursor)
source

indent-line-widgetclj

source

indent-or-complete-widgetclj

source

indent-proxy-strclj

(indent-proxy-str s cursor)
source

inline-result-markerclj

(inline-result-marker at-str)
source

limit-character-sizeclj

(limit-character-size s)
source

make-parserclj

(make-parser)
source

meanclj

(mean coll)
source

name-arglist-displayclj

(name-arglist-display meta-data)
source

no-greater-thanclj

(no-greater-than limit val)
source

one-space-after-funcall-word?clj

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

(osc-hyper-link url show)
source

paredit-backwardclj

source

paredit-backward-delete-charclj

source

paredit-barf-backwardclj

source

paredit-barf-forwardclj

source

paredit-close-roundclj

source

paredit-delete-charclj

source

paredit-doublequoteclj

source

paredit-forwardclj

source

paredit-forward-kill-wordclj

source

paredit-joinclj

source

paredit-killclj

source

paredit-kill-debugclj

source

paredit-kill-regionclj

source

paredit-kill-whole-lineclj

source

paredit-line-commentclj

source

paredit-node-commentclj

source

paredit-open-and-slurpclj

source

paredit-open-curlyclj

source

paredit-open-roundclj

source

paredit-open-squareclj

source

paredit-raiseclj

source

paredit-slurp-backwardclj

source

paredit-slurp-forwardclj

source

paredit-spliceclj

source

paredit-splitclj

source

paredit-yankclj

source

parse-lineclj

(parse-line line cursor)
source

parsed-lineclj

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

parsed-line-word-coordsclj

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

read-formclj

(read-form form-str)
source

reformat-widgetclj

widget to reformat the buffer with cljfmt

widget to reformat the buffer with cljfmt
sourceraw docstring

repl-command-completeclj

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

replace-word-with-prefixclj

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

resolve-metaclj

(resolve-meta wrd)
source

row-widthclj

(row-width columns)
source

set-or-clear-mark-commandclj

source

sourceclj

(source wrd)
source

source-at-pointclj

(source-at-point)
source

source-at-point-widgetclj

source

split-into-wrapped-linesclj

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

standard-deviationclj

(standard-deviation coll)
source

two-standards-plus-meanclj

(two-standards-plus-mean coll)
source

window-linesclj

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

word-at-cursorclj

(word-at-cursor)
source

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

× close