Giter VIP home page Giter VIP logo

scrim's People

Contributors

austinhaas avatar samwagg avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

samwagg

scrim's Issues

Input is truncated when \. is inside a string.

Steps to reproduce:

  1. Connect to REPL.
  2. Enter "\." at the REPL prompt.

Actual behavior:
The REPL responds with a message: "Unsupported escape character: \.", and no prompt is returned.

Expected behavior:
Same error message, but a prompt is returned.

Error when evaluating forms with a %.

(defn foo% [] 1)

error in process filter: if: Format string ends in middle of format specifier
error in process filter: Format string ends in middle of format specifier

Eldoc: ClojureScript doesn't know the current namespace, so symbols may be looked up in the wrong namespace.

In Clojure, eldoc won't look up a symbol unless the current namespace matches the current buffer. In ClojureScript, `ns always returns nil. To make eldoc work in ClojureScript at all, that check doesn't happen. This causes a few issues:

  • The symbol is looked up in the wrong namespace. Usually, that means it can't be found, but it could possibly return unexpected results: if the same symbol exists in more than one namespace.
  • The most recent symbol's documentation is cached locally, so if eldoc tries to look up a symbol and fails because you are in the wrong namespace, and then you change to the namespace that matches the current buffer, then you'll need to move point away from that symbol to another symbol to clear the cache. This could possibly be fixed just by not caching missed values.

Use prepl

Not sure how easy this is to implement, because we might have to parse EDN in elisp.

Might make it easy to colorize the output by type.

Log all REPL history

I.e., to a file.

I clear the REPL often, for simplicity and sometimes for performance reasons. It would be nice to have the entire history sometimes.

Make find-definition work on code eval'd via the repl.

When code is originally loaded, via require, symbols will have metadata associated with them that indicates the file and line from where it was loaded. If you eval the code after that, :file will be changed to "NO_SOURCE_PATH".

I really don't know the best way to handle this. That metadata really only tells you where the code originally came from; if you edit any of the source files, that info may become stale.

It would be good to know how Clojure sets those values in the first place. This might be a good place to start: clojure/clojure@6bbfd94

eldoc: clear cache after loading a namespace

I notice this frequently when:

  1. I'm not in the namespace for the current buffer, which I notice because eldoc isn't working.
  2. So I switch to the current namespace.
  3. But I still have to move point to a new symbol to clear the cache before eldoc will work.

This may depend on #28

Truncate long input

Allow user to specify the threshold.

The user should be able to interactively show/hide the full input.

Consider using hideshow or something based on emacs' set-selective-display.

Support eldoc.

This causes the current function symbol (based on point) to display in the minibuffer with its argument lists.

Intial support: 94f7da1

Barely tested in clj, not cljs. Seems to work, but needs improvement.

Known issues:

  • Doesn't know how to handle special forms. Prints if: <unknown symbol>. One possible solution might be to get the documentation for the symbol and parse it; seems like what we want is on the 3rd line after a couple spaces.

echo-output doesn't work correctly without echo-input

The problem is that scrim--echo-output uses comint-last-input-end to determine where the output starts, but that isn't set if scrim-echo-input-p is nil. The result is that it just keeps displaying the complete history.

A fallback could be to search for the end of the last prompt.

I think we should make echo input the only option and do this instead: #19.

Improve handling of output.

This may only pertain to displaying output in the echo area.

The output filter function that gets called when new output arrives may be called multiple times for each output. We already filter out prompts, trailing newlines, and empty strings, but desired output might also be split into multiple calls, and only the last will be displayed in the echo area. That will look incorrect.

Determine if there is any way to modify comint's behavior. If not, then we may need to buffer the output.

Proposal: Each time output is received, use comint's fns to find the output between the last input and the current prompt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.