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

Implement hierarchical document outline #373

Closed
dbaeumer opened this issue Jul 6, 2018 · 8 comments
Closed

Implement hierarchical document outline #373

dbaeumer opened this issue Jul 6, 2018 · 8 comments
Assignees
Milestone

Comments

@dbaeumer
Copy link
Member

dbaeumer commented Jul 6, 2018

No description provided.

@dbaeumer dbaeumer self-assigned this Jul 6, 2018
@dbaeumer
Copy link
Member Author

dbaeumer commented Jul 6, 2018

Gama11 added a commit to vshaxe/language-server-protocol-haxe that referenced this issue Jul 17, 2018
Just exists on a branch of vscode-languageserver-node atm, see microsoft/vscode-languageserver-node#373.
@Gama11
Copy link
Contributor

Gama11 commented Jul 17, 2018

I've started playing around with this branch in the Haxe language server, working well so far. 👍

One question: is selectionRange implemented yet? Picking a symbol from Ctrl+Shift+O moves the cursor to the start of range (rather than selectionRange as I would have expected). For instance in this case, the selectionRange is foo, yet the cursor is positioned before public which is where range starts:

@dbaeumer
Copy link
Member Author

The selectionRange is used to denote what to do if the cursor moves into the range. In VS Code for example we then select the symbol in the outline. So it is not what the editor selects it is the range the editor is sensitive to the symbol when its selection moves in.

@Gama11
Copy link
Contributor

Gama11 commented Jul 19, 2018

Hm.. I thought that's what range is for?

The range enclosing this symbol not including leading/trailing whitespace but everything else like comments. This information is typically used to determine if the the clients cursor is inside the symbol to reveal in the symbol in the UI.

@dbaeumer
Copy link
Member Author

Sorry. You are correct. I got confused myself.

@dbaeumer
Copy link
Member Author

And yes that should be implemented. It is converted as follows:

		let result = new code.DocumentSymbol(
			value.name,
			value.detail,
			asSymbolKind(value.kind),
			asRange(value.range),
			asRange(value.selectionRange)
		);

can you reproduce this using a non LSP based example?

@Gama11
Copy link
Contributor

Gama11 commented Jul 23, 2018

Yes, this seems more like a VSCode issue: microsoft/vscode#54857

@dbaeumer
Copy link
Member Author

Thanks for testing. I created a new version today which as not official support for document symbol.

@dbaeumer dbaeumer added this to the July 2018 milestone Jul 24, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants