With my leiningen project, when I start the repl, it won’t accept any commands typed into it and there is a message saying “this view is read only”. Also I can’t find any commands in the ide to send forms to the repl
this is on windows, cursive 1.10.2-2021.1, java 1.8, intellij 2021.1.1 community edition, build 211.7142.45 (april 30). project opened using the open project, and pointing to the project.clj file
Can you send a screenshot of your REPL toolwindow? It sounds like your REPL is not starting correctly.
I'm trying to version control the Clojure Code Styles settings for a project, because we had to set the formatting of defmulti
to Indent
manually, but I have no idea where does that configuration go to.
I've changed the Editor
/ Code Style
/ Clojure
/ Scheme:
to Project
, then Opt-Enter Configure indentation for clojure.core/defmulti
and set it to Indent
and grep -r defmulti .idea
doesn't yield anything, although .idea/codeStyles/codeStyleConfig.xml
does reflect my choice of "formatting scheme":
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>
There is a little cog next to the Code Style / Scheme drop-down, which lets me export the config into a code style XML or an EditorConfig file, but it offers to save it to ~/Project.xml
by default, which sounds odd.
I wouldn't think that I should do such manual export for being able to version control these settings, but then where is this config stored?
You can’t use the lein run config like that, you’ll need to use the REPL run config type as described here: https://cursive-ide.com/userguide/repl.html
That worked, thanks Colin
@wilkerlucio if the filewatcher doesn't work out, you can also try the lsp approach for clj-kondo
cool, I didn't tried it yet, maybe its time
I mean this one: https://github.com/clj-kondo/clj-kondo/blob/master/doc/editor-integration.md#lsp-server-1
but of course you could also give clojure #lsp a chance
yes, I just finished the setting up, looks cool, gonna see if I notice any differences from the file watcher setup
when editing large files I notice a significant performance hit when the LSP is active
I guess its verifying things as I type, while the file watcher only does it when I save