clj-suitable icon indicating copy to clipboard operation
clj-suitable copied to clipboard

Completion support for javascript libraries in node_packages

Open markokocic opened this issue 4 years ago • 1 comments

It would be nice if clj-suitable supported to have completion for Javascript libraries that are already installed in projects node_modules project.

shadow-cljs already supports requiring those libraries and using them as part of the application, but it's not possible to autocomplete them in cider or cursive.

Referenced shadow-cljs issue: https://github.com/thheller/shadow-cljs/issues/834

markokocic avatar Feb 03 '21 16:02 markokocic

As a quick note, I wonder if we could reuse javascript-oriented LSP analysis. Running a full-blown lsp server seems error-prone, however perhaps the underlying library can be invoked in a one-off manner, similarly to when one asks clj-kondo for analysis (it runs for a bit, emits files and then it's all done).


...Maybe it's not necessary. Given a ["react-tippy" :as react-tippy] require, surely the cljs analyzer can tell us that react-tippy is a "foreign" object .

vemv avatar Jul 22 '23 19:07 vemv