1

I'm just trying the Clojure LSP plugin in Intellij IDEA Community without knowing anything about Clojure or the plugin.

My goal is to start learning Clojure.

I installed the plugin and clojure-lsp via scoop, as per instructed.

I also tried to apply the steps here: https://clojure-lsp.io/clients/#generic-lsp4intellij - however, there is no "Language Server Protocol" tab, and I couldn't find an editable extension textfield...

I created a new project (deps.edn), which generated a main file:

(ns ray.main)

(defn -main [& args]
  (println args)
  0)

But Intellij doesn't recognize this as a runnable file, how do I run it?

EDIT, forgot to mention this:

Intellij displays this

EDIT 2:

This is what I get when I click the Restart LSP Server in Settings/Tools (with the default Server path):

enter image description here

This is what I get when I click the Restart LSP Server in Settings/Tools (with the scoop Server path):

enter image description here

4

1 Answer 1

1

To have the Clojure language support on IntelliJ you need to install only the Clojure LSP plugin, you should not use it with the Generic LSP support since both have the same purpose.

This plugin will give to you default features from LSPs: navigation, code complete, static analysis, etc..

To run Clojure code you can:

  1. Run using clojure cli tool:

    clj -M ray.main
    
  2. Use REPL to run code dynamically:
    To add REPL support on IntelliJ you can use the Clojure REPL plugin

The 2. is the most used and indicated when working with Clojure.

I also recommend you to join the Clojurians slack, where you can find a whole community to help you.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.