Conversation
| }, | ||
| "bitbake.enableCodeLensReferencesOnFunctions": { | ||
| "type": "boolean", | ||
| "default": false, |
There was a problem hiding this comment.
I'm not very familiar with CodeLens. So you're disabling it by default on purpose, right?
There was a problem hiding this comment.
this surprised me also. However since currently we only have code lens for references, which have their dedicated button, I'm not sure the feature adds much value right now. Meanwhile it would bloat the interface.
There was a problem hiding this comment.
This demo is cool however I think codelenses are justified when we have specific commands to run. There are few extensions doing so and the additional buttons could annoy users. A useful example for instance is the git extension which adds additional commands for comparing with other branches.
There was a problem hiding this comment.
I think we would need different commands in order for this to be useful. I cannot think of one that isn't already seemlessly integrated into the interface yet (value hovers, rename, definitions, references...).
server/src/server.ts
Outdated
| analyzer.clearRecipeLocalFiles() | ||
| }), | ||
|
|
||
| connection.onCodeLens(async (params): Promise<LSP.CodeLens[]> => { |
There was a problem hiding this comment.
Maybe you'd like to put this into a onCodeLens file in connectionHandlers, but this works too
There was a problem hiding this comment.
Yes, like we do other feature handlers, it would be nice to have a dedicated file for separating features.
ae1a255 to
fca3f74
Compare
| }, | ||
| "bitbake.enableCodeLensReferencesOnFunctions": { | ||
| "type": "boolean", | ||
| "default": false, |
There was a problem hiding this comment.
this surprised me also. However since currently we only have code lens for references, which have their dedicated button, I'm not sure the feature adds much value right now. Meanwhile it would bloat the interface.
| }, | ||
| "bitbake.enableCodeLensReferencesOnFunctions": { | ||
| "type": "boolean", | ||
| "default": false, |
There was a problem hiding this comment.
This demo is cool however I think codelenses are justified when we have specific commands to run. There are few extensions doing so and the additional buttons could annoy users. A useful example for instance is the git extension which adds additional commands for comparing with other branches.
server/src/server.ts
Outdated
| analyzer.clearRecipeLocalFiles() | ||
| }), | ||
|
|
||
| connection.onCodeLens(async (params): Promise<LSP.CodeLens[]> => { |
There was a problem hiding this comment.
Yes, like we do other feature handlers, it would be nice to have a dedicated file for separating features.
| }, | ||
| "bitbake.enableCodeLensReferencesOnFunctions": { | ||
| "type": "boolean", | ||
| "default": false, |
There was a problem hiding this comment.
I think we would need different commands in order for this to be useful. I cannot think of one that isn't already seemlessly integrated into the interface yet (value hovers, rename, definitions, references...).
1816ee0 to
2644a34
Compare
|
I moved onCodeLens to its own file and rebased so we don't have to wait for Ziwei to merge |
2644a34 to
2805fa7
Compare
Added a simple codeLens for function references and a setting to control this behaviour.

Ticket: 14622