-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
Core functions are not highlighted for ClojureScript #3385
Comments
Why are you using |
@vemv has advised me to try 0.32... Same behavior is with 0.30. |
Ah, okay. Well, I'll leave it to him to look into this. You might want to share here the part of your nREPL log related to |
Where can I find that log? I enabled nrepl message logging and this was printed: https://gist.github.com/nikolavojicic/fbd8eb603ca42ecc2d2acfce393d43cd |
From my side, I have never gotten special syntax coloring for clojure.core defns, but that might be some oddity related to my setup. Anyway, @bbatsov , do you recall what is supposed to be happening, technically? Who flags clojure.core fns as such (cider-nrepl or cider), how? What font-lock face is applied to them? |
I've found this similar issue: #1889 (comment) |
That's right! I had it set to It's an accurate pointer, thanks. I'll begin investigating. |
Alright, I had it easy to repro:
This defun is buggy: (defun cider-resolve-core-ns ()
"Return a dict of the core namespace for current connection.
This will be clojure.core or cljs.core depending on the return value of the
function `cider-repl-type'."
(when-let* ((repl (cider-current-repl)))
(with-current-buffer repl
(cider-resolve--get-in (if (eq cider-repl-type 'cljs)
"cljs.core"
"clojure.core"))))) ...because Even after fixing that, |
The second bug is this access https://github.com/clojure-emacs/cider-nrepl/blob/4b55dedf4cee10bda75ab2165580da72a617b721/src/cider/nrepl/middleware/track_state.clj#L222, that string should be a symbol. With those two trivial bugs fixed, it should all work again 🍻 |
Please try again with cider-nrepl 0.34.0. Nothing else is needed I believe this issue is solved by now, otherwise let me know! |
I cannot repro! First I Then I define a function Then, The precise style that should be applied (per If it persists, please create a new issue. Cheers - V |
The problem is that you font lock dynamically |
Expected behavior
Core functions should be highlighted like
map
andrange
here. This is how it is for Clojure.Actual behavior
Core functions (
map
andrange
) are not highlighted. This is how it is for ClojureScript.Steps to reproduce the problem
Content of
shadow-cljs.edn
:cider-jack-in-cljs
shadow
:app
Environment & Version information
The text was updated successfully, but these errors were encountered: