-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Syntax highlighting improvements #40
Comments
- Some functions, like *, aren't getting highlighted as functions by
CodeMirror. (We have a report of confusion from the field because of this).
Looks like this is due to the CodeMirror Clojure mode. In the case of `*`
versus, say, `def`, it's the difference between 'cm-builtin' and
'cm-keyword'. Source:
https://github.com/codemirror/CodeMirror/blob/master/mode/clojure/clojure.js#L33
But other functions will be specified as `cm-variable`. Not sure what our
desired highlighting semantics are, but for as long as we're on CodeMirror
our choices are to modify `maria.scss` to do as good a job as possible of
working with the currently applied classes (eg. treat cm-builtin and
cm-keyword the same), and/or (b) fork or replace the Clojure codemirror
mode (linked above) to apply classes differently.
- Can we decorate with a class the depth of each expression modulo 2?
I'd like to add subtle "zebra highlighting" by setting the background of
each expression to an alternating set of very light grays -- like this
<https://cyanbyfuchsia.files.wordpress.com/2013/11/image_thumb3.png?w=912&h=716>,
but prettier.
I think with CodeMirror this would be a pretty intensive thing, because it
would mean applying and syncing an individual CodeMirror 'marker' for every
s-expression. (This will be much simpler with a tree-based editor.)
…On Sun, Jul 9, 2017 at 8:38 AM, Jack Rusher ***@***.***> wrote:
- Some functions, like *, aren't getting highlighted as functions by
CodeMirror. (We have a report of confusion from the field because of this).
- Can we decorate with a class the depth of each expression modulo 2?
I'd like to add subtle "zebra highlighting" by setting the background of
each expression to an alternating set of very light grays -- like this
<https://cyanbyfuchsia.files.wordpress.com/2013/11/image_thumb3.png?w=912&h=716>,
but prettier.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#40>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKFZ5VNvObUbXaPsFvU6hlQsYXzVzwqks5sMHVagaJpZM4OR-WS>
.
--
http://matt.is — Berlin, Germany
--
|
On the first one, what I want -- of course -- is to determine the types of things in the code by interrogating the running VM rather than guessing from a lookup table. It'll have to wait until we swap out the editor altogether, I suppose. |
I've edited the theme to treat I've added the other comments here to a new wiki page to keep track of items that should be looked at again when we get to a tree editor: https://github.com/mhuebert/maria/wiki/Tree-editor |
*
, aren't getting highlighted as functions by CodeMirror. (We have a report of confusion from the field because of this).The text was updated successfully, but these errors were encountered: