cursive-ide / cursive

Cursive: The IDE for beautiful Clojure code
580 stars 7 forks source link

Can't set indentation for unresolved symbols #2152

Open conan opened 5 years ago

conan commented 5 years ago

When a function symbol is unresolved (e.g. a generated Amazonica function), the little lightbulb doesn't contain the option to set indentation settings for that function. It would be great if the option remained whether or not the symbol can be resolved by Cursive.

image

cursive-ide commented 5 years ago

The problem is that Cursive needs to be able to resolve the symbol in order to customise the indentation, since the customisation uses the FQN of the symbol. In this case it should be possible to guess since presumably the alias does resolve correctly, but in general it's not. Additionally, the head symbol of the list has to be able to resolve correctly in order to actually apply the indentation correction, since again it's keyed off the FQN of the head symbol.

As an aside, Cursive should support Amazonica using stubs - does that not work for you?

conan commented 4 years ago

OK, I see. I'll leave this open as the issue remains, although I understand why it's tricky to fix.

Cursive does support Amazonica using stubs, but it misses some of the arities for some reason; I haven't dared to read how the clojure functions are generated 😱