Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbols exported from a Deno workspace are not considered in LSP workspace #27817

Open
nounder opened this issue Jan 25, 2025 · 1 comment
Open

Comments

@nounder
Copy link

nounder commented Jan 25, 2025

(Basic technical understanding about 'Deno workspace' and a 'Language Server Protocol workspace' are required to understand subtle terms used here.)


Consider following project deno.json:

{
  "workspace": [
    "./h3/"
  ]
}

and its friend ./h3/deno.json:

{
  "name": "@nounder/h3",
  "exports": "./mod.ts"
}

When I search for isStatusOk function that is exported in @nounder/h3, LSP doesn't index it:

Image

However, when I start typing function name in context of a import statement, LSP provides correct autocomplete:

Image

It think it is reasonable to make LSP index symbols defined in workspaces.

Version: Deno 2.1.7
Editors: nvim, vscode, cursor

@nounder
Copy link
Author

nounder commented Jan 25, 2025

The above is minimal reproducible example.

In my another project, with more complex deno.json, I had to write import statement by hand that points to workspace module identifier. In this case, LSP autocomplete suggests all exports but instead of using workspace module identifier and limit only to module exports, it suggests exports from all workspace files:

Image

Module identifier auto complete for defined workspaces doesn't work at all, even after writing first one in by hand.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant