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

Workspace symbol provider #36

Open
olafurpg opened this issue Jul 2, 2017 · 5 comments
Open

Workspace symbol provider #36

olafurpg opened this issue Jul 2, 2017 · 5 comments

Comments

@olafurpg
Copy link
Member

olafurpg commented Jul 2, 2017

https://code.visualstudio.com/docs/editor/editingevolved#_open-symbol-by-name

The api exists in vscode but not monaco https://github.com/Microsoft/vscode/blob/478365bce508cc391e4cfc5c9e1eeee7c87c39c9/src/vs/vscode.d.ts#L2034

We have all the data to implement this.

@olafurpg
Copy link
Member Author

We can do this the same way we do for searching for filenames. I would restrict the symbols to global class/object/trait kinds.

@jonas
Copy link
Collaborator

jonas commented Sep 28, 2018

Here's a quick mock-up for creating an "omnibar" to search/complete file and symbol names.

screen shot 2018-09-28 at 12 02 18

input#omnibar {
    background-color: rgba(255,255,255,0.1);
    border: none;
    position: absolute;
    top: 10px;
    left: 59px;
    color: inherit;
    font-size: inherit;
    height: 36px;
    padding-left: 10px;
    width: 79%;
}

If I can get that to work (or find a library that allows to easily create a search box with pluggable completion) we should be able to implement this.

@olafurpg
Copy link
Member Author

@jonas That looks amazing, I might be tempted to implement the completions myself in Scala.js. What would the interface be? I can imagine something like

def completions(query: String): List[String]

I have forever wanted a search bar similar to https://cs.chromium.org

@olafurpg
Copy link
Member Author

@jonas have you tried to see if we can access the same APIs as QuickOutlineAction for the document symbol provider? https://github.com/Microsoft/vscode/blob/d5b94eb3a7f1fe165590bbd0e685516400050a8f/src/vs/editor/standalone/browser/quickOpen/quickOutline.ts#L115-L151

@jonas
Copy link
Collaborator

jonas commented Oct 5, 2018

When looking at switching to the Monaco Webpack plugin (#106) I noticed that it uses the JS sources directly, so it might be possible to access some of that, however, since it is not exposed via the Monaco API I don't know if it is possible.

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

No branches or pull requests

2 participants