Skip to content

Completion support for javascript libraries in node_packages #16

Closed

Description

@markokocic

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: thheller/shadow-cljs#834

Activity

  1. pinned this issue on Jul 22, 2023
  2. vemv commented on Jul 22, 2023

    @vemv
    Member

    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 .

  3. bbatsov commented on Jul 18, 2026

    @bbatsov
    Member

    suitable does runtime introspection - it asks the live JS runtime for an object's properties. Completing node_modules libraries before they're referenced is a static-analysis job (LSP/TypeScript-level), well outside suitable's scope. Closing as not planned; an LSP is the better fit for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions