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

Add range information to Hover result #251

Open
tal-sapan opened this issue Jul 20, 2020 · 1 comment
Open

Add range information to Hover result #251

tal-sapan opened this issue Jul 20, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@tal-sapan
Copy link
Contributor

The range for which the hover applies to should be returned. For example, the entire tag name (including the prefix) should be returned for tags. This improves the UX as it lets the user know what the hover describes (by default it shows the word that the cursor is on).
The hover result is calculated here:

@tal-sapan tal-sapan added enhancement New feature or request good first issue Good for newcomers labels Jul 20, 2020
@bd82
Copy link
Member

bd82 commented Jul 21, 2020

In the LSP specs this matches Hover.range

     /**
 * The result of a hover request.
 */
export interface Hover {
	/**
	 * The hover's content
	 */
	contents: MarkedString | MarkedString[] | MarkupContent;

	/**
	 * An optional range is a range inside a text document
	 * that is used to visualize a hover, e.g. by changing the background color.
	 */
	range?: Range;
}

@bd82 bd82 added the help wanted Extra attention is needed label Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants