question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some mechanism for a file to inherit the workspace it belongs to

See original GitHub issue

I’m not clear if this is a VSCode issue or a vscode-languageserver-node issue, apologies if this is the wrong repo.

My use case is: I have a file open from a workspace, I ‘jump to def’ into a library, that source file is outside of the workspace folder, but the language server for the original workspace has the information for the library. Currently, VSCode doesn’t forward any notifications/requests for the library file to any language server.

This happens with the Rust language server. In Rust there is no equivalent to the node_modules directory, library code is in a central registry. E.g., if my project (and workspace directory) is /Users/nick/projects/foo', my code is in /Users/nick/projects/foo/srcand libraries are in something like/Users/nick/.cargo/registry/src/some_library`.

What I would like is that when a file is opened by vscode (c.v, the user opening a file from the folder view) and there is some file that we’re coming from and the newly opened file is not otherwise part of a workspace, then the newly opened file is considered to be in the workspace of the ‘from’ file.

Note that adding the registry folder to a workspace is not good enough (and I don’t think possible today anyway) because multiple workspaces could be using the registry.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dbaeumercommented, Jul 6, 2018

Actually there is a way how you can do this for something like goto def. The VS Code language client as a middleware which allows you to intercept all message. There could record these cases and when the file opens forward it to the right server. The middleware is documented here: https://github.com/Microsoft/vscode-languageserver-node/blob/master/client/src/client.ts#L411

0reactions
nrccommented, Jul 13, 2018

Seems fine, I’ll give the suggestion in your earlier a comment (thanks for that!) a spin when I have some time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Workspace object access control - Azure Databricks
Learn how to control access to Azure Databricks workspace objects, such as folders, notebooks, MLflow experiments, and MLflow models.
Read more >
Container and Document Security - iManage Control Center
“Author” is the field used to give the security over-riding 'owner' role of the document. The author will always have permission to view...
Read more >
Workspaces - Yarn
Workspaces are a new way to set up your package architecture that's available by default starting from Yarn 1.0. It allows you to...
Read more >
Resource hierarchy | Resource Manager Documentation
IAM roles granted on a folder resource are automatically inherited by all project and folder resources included in that folder.
Read more >
How to inherit dependency from a parent pom to a child pom
You should declare dependencies you want to inherit under a <dependencies> section to achieve this. <dependencyManagement> is used for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found