eca-intellij icon indicating copy to clipboard operation
eca-intellij copied to clipboard

Custom workspace roots

Open lowecg opened this issue 1 year ago • 7 comments

We're using the workspace feature of IntelliJ to work across several projects. In this setup, the default working location is the workspace directory itself which doesn't necessarily contain the projects. So any tools, e.g. terminal, will launch here and this appears to be also true for ECA.

However, even when I setup a clojure-mcp server connected to a project's REPL which is configured for the project location (external to the workspace), ECA still tries to locate or write files from the workspace location.

Accessing the same REPL from Claude Desktop via clojure-mcp operates relative to the REPLs working directory (correct).

I'm still working things out - so it might be that ECA tools take precedence over clojure-mcp. Not sure.

Is there a way resolve this?

I appreciate the workspace feature of IntelliJ is quite recent and might not be the top of your list.

lowecg avatar Aug 30 '25 06:08 lowecg

@lowecg I'd love to improve the workspace support for ECA, the server already handles multiple workspaces so clients just need to send the correct one and right now for intellij we send the current project root which doesn't seem ideal indeed.

For tools configuration you can disable/enable via config, check https://eca.dev/configuration for disabledTools

ericdallo avatar Aug 30 '25 13:08 ericdallo

I need to understand thie new workspace api and how to access that

ericdallo avatar Aug 30 '25 13:08 ericdallo

Thank you, Eric

lowecg avatar Aug 30 '25 13:08 lowecg

@lowecg, I took a look at https://plugins.jetbrains.com/docs/intellij/workspace-model.html#interoperability and https://www.jetbrains.com/help/idea/workspaces.html#create_workspace, it seems this requires a separated plugin and doesn't works for intellij community, right?

ericdallo avatar Aug 30 '25 21:08 ericdallo

@ericdallo Strange. The docs say one thing:

Image

However, the plugin page lists community edition:

Image

And I have workspaces installed on community edition:

Image

I hope this isn't an early indication that JetBrains are going to restrict supported versions for workspaces in the future.

Re: separated plugin

I'm unfamiliar with the new IntelliJ plugin architecture. A quick search suggests it's a more modern approach that could improve compatibility, but I can't speak to the development effort involved.

I don't want to disrupt your progress on the ECA plugin, and I'm not sure how widely the new workspace plugin is adopted.

lowecg avatar Aug 31 '25 06:08 lowecg

Got it, @lowecg, I'm ok supporting it if makes sense for more users, but the way I see this is:

We would start ECA once, and pass multiple workspace-roots to it as server suports that, so if 3 projects in the workspace, we would pass 3 workspace roots, does that works for you? Even so, being a plugin, I'm not sure in intellij development how to access those workspaceAPI in code

Alternative: WDYT if we have a setting in ECA intellij to configure what are the workspace roots? would that solve your issue?

ericdallo avatar Aug 31 '25 12:08 ericdallo

Thanks, Eric - both options sound good. The first option might give opportunity for cross project sessions which sounds appealing. But I'm happy to work with the alternative if that's easier.

lowecg avatar Aug 31 '25 13:08 lowecg