GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TSServer: navto command should be supported without a file · Issue #2530 · microsoft/TypeScript

TSServer: navto command should be supported without a file #2530

New issue
Copy link
New issue
Copy link
Closed
#38027
Closed
TSServer: navto command should be supported without a file#2530
#38027
Copy link
Assignees
sandersn
Labels
CommittedThe team has roadmapped this issueThe team has roadmapped this issueDomain: APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptDomain: LS: TSServerIssues related to the TSServerIssues related to the TSServerFix AvailableA PR has been opened for this issueA PR has been opened for this issueSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestoneCritical issues that VS Code needs fixed in the current TypeScript milestoneVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Milestone
TypeScript 3.9.1

Description

@dbaeumer
Dirk Bäumer (dbaeumer)
opened on Mar 27, 2015
Issue body actions

Currently the file is only used to detect the virtual project. Now that we have tsconfig.json support we can use the language service bound to a tsconfig.json file to find navto items. I would propose the following handling in case of the absense of a file:

  • no tsconfig project. Command return no content message
  • all projects are tsconfig project: return the nav to items (filter duplicates)
  • there is a mix: the response contains a flag indicating that the result might be incomplete.
Reacted by Matt Bierner, Benjamin Pasero and Alexander

Activity

Next
  1. Dan Quirk (danquirk)
    added
    SuggestionAn idea for TypeScriptAn idea for TypeScript
    Domain: APIRelates to the public API for TypeScriptRelates to the public API for TypeScript
    on Mar 27, 2015
  2. mhegazy commented on Mar 27, 2015

    @mhegazy
    Mohamed Hegazy (mhegazy)
    on Mar 27, 2015
    Contributor
    More actions

    I find it strange that you would get results from all projects even if you have a file open which points you to a single project. Can you explain the scenario you want to enable?

    I think we have a related issue (#2531), if that fixed, given a file you would be getting all results from related projects, but not unrelated. would that satisfy your scenario?

  3. dbaeumer commented on Mar 27, 2015

    @dbaeumer
    Dirk Bäumer (dbaeumer)
    on Mar 27, 2015
    MemberAuthor
    More actions

    If I think about a workspace with n components I would have a tsconfig.json file per component. Now if I want to navigate in that workspace I would like to see a list of all navto items accross all components. For me that is comparable to a VS solution having n projects where project === tsconfig.json

  4. dbaeumer commented on Mar 27, 2015

    @dbaeumer
    Dirk Bäumer (dbaeumer)
    on Mar 27, 2015
    MemberAuthor
    More actions

    So to answer your question: no.

    I would still like to see a mode where I can see all items.

  5. mhegazy commented on Mar 30, 2015

    @mhegazy
    Mohamed Hegazy (mhegazy)
    on Mar 30, 2015
    Contributor
    More actions

    mmm. this is interesting, i think this is the a good scenario to support; but how would you make this not noisy in the general case? imagine a few files open, each with a few .d.ts files, now you get navigate to results, and you get a lot of results that may or may not be what you are looking for.

  6. steveluc commented on Mar 30, 2015

    @steveluc
    Steve Lucco (steveluc)
    on Mar 30, 2015
    Contributor
    More actions

    I think the only way to make this not confusing is to have some way of expressing project relationships. So far we have chosen not to do this, leaving that level of specification to project systems such as grunt and gulp.

    I agree with Mohamed this is a good scenario and we should support it in some way. We could have two different commands in Sublime, one that just searches through every open project and one that searches only the projects that include the current file. This could be supported in the protocol, as Dirk suggests, by making the file optional.

    Either way, I think this would be more helpful and less confusing if we implement a way to explore the set of currently active projects, as Mohamed has previously suggested.

    Steve

    From: Mohamed Hegazy [mailto:[email protected]]
    Sent: Monday, March 30, 2015 11:02 AM
    To: Microsoft/TypeScript
    Subject: Re: [TypeScript] TSServer: navto command should be supported without a file (#2530)

    mmm. this is interesting, i think this is the a good scenario to support; but how would you make this not noisy in the general case? imagine a few files open, each with a few .d.ts files, now you get navigate to results, and you get a lot of results that may or may not be what you are looking for.

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/2530#issuecomment-87774495.

  7. dbaeumer commented on Apr 10, 2015

    @dbaeumer
    Dirk Bäumer (dbaeumer)
    on Apr 10, 2015
    MemberAuthor
    More actions

    I gave it some more thoughts and simply providing no file will not do the trick. It will force the TS service to search for all tsconfig.json files and open them. And that might not be what the user wants.

    So if a workspace has more than one tsconfig.json file I think we need something like a tsglobal.json file which describes the valid tsconfig.json files and there dependencies. The TS service could then open the tsglobal.json file and act appropriately.

    And I like the idea of being able to explore the set of active projects. It would help the user to understand the behavior of some global actions better.

  8. Mohamed Hegazy (mhegazy)
    added
    Accepting PRs
    on Dec 9, 2015
  9. Mohamed Hegazy (mhegazy)
    added
    VS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
    on Dec 16, 2016
  10. Mohamed Hegazy (mhegazy)
    added this to the This milestone has been deleted milestone on Jan 4, 2018
  11. Ryan Cavanaugh (RyanCavanaugh)
    modified the milestones: Community, Backlog on Mar 7, 2019
  12. Matt Bierner (mjbvz)
    added
    VS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestoneCritical issues that VS Code needs fixed in the current TypeScript milestone
    on Oct 24, 2019
  13. Ryan Cavanaugh (RyanCavanaugh)
    removed this from the Backlog milestone on Oct 31, 2019
  14. 15 remaining items

  15. Daniel Rosenwasser (DanielRosenwasser)
    added
    Domain: LS: TSServerIssues related to the TSServerIssues related to the TSServer
    Effort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".
    and removed
    Effort: DifficultGood luck.Good luck.
    on Feb 27, 2020
  16. Daniel Rosenwasser (DanielRosenwasser)
    assigned
    Nathan Shively-Sanders (sandersn)
    on Feb 27, 2020
  17. bpasero commented on Mar 17, 2020

    @bpasero
    Benjamin Pasero (bpasero)
    on Mar 17, 2020
    More actions

    Please fix this 👍

  18. sandersn commented on Mar 18, 2020

    @sandersn
    Nathan Shively-Sanders (sandersn)
    on Mar 18, 2020
    Member
    More actions

    So: navto needs to have an option to find symbols across all projects, as defined by project references? Or is there something additional needed?

    I don't know the navto code or the project references code, so I don't have an idea yet of how hard this will be.

  19. dbaeumer commented on Mar 19, 2020

    @dbaeumer
    Dirk Bäumer (dbaeumer)
    on Mar 19, 2020
    MemberAuthor
    More actions

    Yes that is correct.

  20. Daniel Rosenwasser (DanielRosenwasser)
    modified the milestones: TypeScript 3.9.0, TypeScript 3.9.1 on Apr 1, 2020
  21. sandersn commented on Apr 15, 2020

    @sandersn
    Nathan Shively-Sanders (sandersn)
    on Apr 15, 2020
    Member
    More actions

    Looking at this, it seems that navto currently returns symbols from the current file's project and any dependencies. But it doesn't return symbols from dependent projects. That is for projects Base -> Derived, in Base, you only get Base's symbols, but in Derived, you get the symbols of both.

    If all the symbols are already available and are being filtered by file, then it might not be to skip the filtering and return all of them. I'll go find the navto implementation and see.

  22. sandersn commented on Apr 16, 2020

    @sandersn
    Nathan Shively-Sanders (sandersn)
    on Apr 16, 2020
    Member
    More actions

    Development is happening on the branch navto-covers-all-projects. It's pretty hacky right now, and extremely slow on Typescript itself.

    (Note that I'm using emacs, which makes a synchronous call to get the navto list, so it's probably better in Code.)

  23. Nathan Shively-Sanders (sandersn)
    added
    Fix AvailableA PR has been opened for this issueA PR has been opened for this issue
    and removed
    Effort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".
    help wanted
    on Apr 17, 2020
  24. Nathan Shively-Sanders (sandersn)
    closed this as completedin #38027on Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @sandersn
    Nathan Shively-Sanders (sandersn)

Labels

CommittedThe team has roadmapped this issueThe team has roadmapped this issueDomain: APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptDomain: LS: TSServerIssues related to the TSServerIssues related to the TSServerFix AvailableA PR has been opened for this issueA PR has been opened for this issueSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestoneCritical issues that VS Code needs fixed in the current TypeScript milestoneVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue

Type

No type

Projects

No projects

    Milestone

    • TypeScript 3.9.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.