Skip to content

feat: support code lens for references and implementations #785

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

Merged
merged 6 commits into from
Nov 6, 2023

Conversation

rchl
Copy link
Member

@rchl rchl commented Nov 1, 2023

Ported Code Lens functionality from VSCode.

Resolves #5

Copy link
Contributor

github-actions bot commented Nov 1, 2023

size-limit report 📦

Path Size
lib/cli.mjs 782.09 KB (+1.28% 🔺)

@predrag-codetribe
Copy link

Nice!

Implementation count doesn't seem correct, with the following code:

interface Int {}

class Hello implements Int {}
class Hello2 implements Int {}

VS code shows the correct count.

Screenshot 2023-11-02 at 11 20 25

@rchl
Copy link
Member Author

rchl commented Nov 2, 2023

Very nice catch. It worked fine, just that the title was wrong.

(planning to add some basic tests for this so I would hopefully catch it also ;))

@predrag-codetribe
Copy link

I have implementationsCodeLens.enabled and typescript.referencesCodeLens.enabled disabled by default:

{
  "settings": {
		"typescript.implementationsCodeLens.enabled": false,
		"typescript.referencesCodeLens.enabled": false,
}

But I still see these lenses by default.

@rchl
Copy link
Member Author

rchl commented Nov 2, 2023

Right. Seems like I've completely overlooked that part.

@predragnikolic
Copy link
Contributor

There is also one more setting to support... referencesCodeLens.showOnAllFunctions 🙃

@rchl
Copy link
Member Author

rchl commented Nov 3, 2023

It is supported. You will see it referenced in the changes if you search for "showOnAllFunctions"

@rchl rchl merged commit ae058c2 into master Nov 6, 2023
@rchl rchl deleted the feat/code-lens branch November 6, 2023 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CodeLens support
3 participants