vscode-css-navigation icon indicating copy to clipboard operation
vscode-css-navigation copied to clipboard

Hovering does not show basic info, this is separate from Alt+F12 (Ctrl+Shift+F10 on Linux) "Peek Definition"

Open sduzair opened this issue 1 year ago • 3 comments

Peak definition as shown in the image should also work with basic mouse hover

image

image

sduzair avatar Aug 26 '24 03:08 sduzair

Try whether you can "go to definition" by clicking F12.

if can, work of this plugin is OK, there should be some problem with your vscode on Linux cause you can't get reference peeking, or you get wrong key settings of reference peeking (for my vscode, it's Ctrl+MouseOver).

if can't, there must be a issue with this plugin.

This plugin has just provided a single definition service, can't distinguish different types of definition operations.

pucelle avatar Sep 16 '24 08:09 pucelle

go to definition or Ctrl+mouseover work fine. i am talking about enabling a hover provider which is not implemented as you see here:

// server/src/server.ts
	return {
		capabilities: {
			textDocumentSync: {
				openClose: true,
				change: TextDocumentSyncKind.Full
			},
			completionProvider: configuration.enableIdAndClassNameCompletion ? {
				resolveProvider: false
			} : undefined,
			definitionProvider: configuration.enableGoToDefinition,
			referencesProvider: configuration.enableFindAllReferences,
			workspaceSymbolProvider: configuration.enableWorkspaceSymbols
		}
	}

to implement this set capabilities and implement registerHoverProvider:

{
  "capabilities": {
    "hoverProvider": true
  }
}

sduzair avatar Sep 16 '24 16:09 sduzair

Thanks, I didn't know about the "hoverProvider" API, I will check it soon.

pucelle avatar Sep 17 '24 13:09 pucelle

Will do this soon

pucelle avatar Dec 27 '24 02:12 pucelle

Hi, sduzair, new version v2.0.0 has released, and this feature has been provided. There is a new option maxHoverStylePropertyCount to control maximum style lines to show, default value is 4. Thanks for your suggestion, and glad to see more of your suggestions.

pucelle avatar Jan 04 '25 08:01 pucelle