clojure-lsp icon indicating copy to clipboard operation
clojure-lsp copied to clipboard

Provide type suggestions after ^ character despite linting errors

Open acorello opened this issue 3 years ago • 4 comments

Problem

When I enter type hints for a function or parameter I get a syntax errors (if I entered only a ^) or an 'Unresolved symbol' error (if I partially entered a symbol name).

In both cases, triggering suggestions returns no results.

Desired Behaviour

Symbols suggestions (ideally only types/classes) despite the linting errors.

Context

02 broken sexp 03 partial symbol name

In this syntax error case I get text suggestions:

04 word suggestions

acorello avatar Aug 13 '22 21:08 acorello

Just linking related issues https://github.com/clojure-lsp/clojure-lsp/issues/1193

ericdallo avatar Aug 15 '22 12:08 ericdallo

@borkdude I think we would need to make clj-kondo return valid analysis when we have an invalid code like (defn foo ^ []), WDYT? similar to how clj-kondo handles invalid keywords.

The same for (defn foo ^{:type } [])

ericdallo avatar Aug 15 '22 12:08 ericdallo

I think so yes, issue welcome

borkdude avatar Aug 15 '22 12:08 borkdude

https://github.com/clj-kondo/clj-kondo/issues/1778

ericdallo avatar Aug 15 '22 12:08 ericdallo