Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error markers #84

Merged
merged 8 commits into from Aug 4, 2017
Merged

Add error markers #84

merged 8 commits into from Aug 4, 2017

Conversation

shaunlebron
Copy link
Collaborator

@shaunlebron shaunlebron commented Aug 2, 2017

Errors are now marked with .parinfer-error-marker. These error markers are cleared in the parent expression hack range when text is processed. If there is still an error, the marker is created again. Some enhancements can be made, but it works.

atom-parinfer-errors

@shaunlebron shaunlebron changed the title Add error markers [WIP] Add error markers Aug 2, 2017
@shaunlebron shaunlebron changed the base branch from shaun-tabstops to master August 2, 2017 16:30
;; Error Markers
;;------------------------------------------------------------------------------

(def error-marker-class "parinfer-error-marker")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this class be hashed like the other classnames in this extension?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I've been trying to match your idioms in this repo, but I think this is the first user-customizable class and I thought a hash might be unnecessary here and maybe jarring to users.

(defn clear-error-markers
[js-editor start-row end-row js-error]
(doseq [marker (get-error-markers js-editor start-row end-row)]
(swap! error-marker-ids disj (oget marker "id"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer to not see swap! inside a doseq

Can you make swap! a single operation here?

@shaunlebron
Copy link
Collaborator Author

made the requested swap into a single operation: 885f070

I used run! to destroy all the markers; hadn't used that one before but I think I like it.

@shaunlebron
Copy link
Collaborator Author

warning colors now

screen shot 2017-08-04 at 2 19 12 pm

@oakmac
Copy link
Owner

oakmac commented Aug 4, 2017

Does the CSS require the !important to work?

@shaunlebron
Copy link
Collaborator Author

i thought it was, but it's not. confirmed it

@oakmac oakmac merged commit a429263 into master Aug 4, 2017
@shaunlebron shaunlebron deleted the shaun-error-markers branch August 4, 2017 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants