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

[Feature]Code lenses support #361

Closed
yyoncho opened this Issue May 17, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@yyoncho
Copy link
Member

yyoncho commented May 17, 2018

I noticed that the method lsp--update-code-lenses is not used in lsp-mode and lsp-ui it seems like this functionality is missing. Can someone comment?

@yyoncho

This comment has been minimized.

Copy link
Member

yyoncho commented May 25, 2018

@yyoncho

This comment has been minimized.

Copy link
Member

yyoncho commented Jun 27, 2018

ping

@vibhavp

This comment has been minimized.

Copy link
Member

vibhavp commented Jun 27, 2018

Yes, code lenses aren't updated in the current code. I don't know how they exactly work, can we use them with overlays?

@yyoncho

This comment has been minimized.

Copy link
Member

yyoncho commented Jun 27, 2018

Yes, overlays is a possible solution - I have filed a bug in LSP UI for that. In lsp-mode we can create an interactive command which will check whether there are lenses on the current point and then select the lens to resolve via completing-read.

@vibhavp

This comment has been minimized.

Copy link
Member

vibhavp commented Jul 6, 2018

@yyoncho Forgot to inform you about it, but I added some basic support for lens in dc4a166

You can create lens buttons by evaluating (lsp--update-code-lenses #'lsp--update-code-lens-buttons), though I'm not sure about where and when to update lenses.

@yyoncho

This comment has been minimized.

Copy link
Member

yyoncho commented Sep 8, 2018

@vibhavp I tried the code - IMO using buttons does not seem like a good idea, since there should be some context information about the code lens at the point similar to what vscode is doing, see https://camo.githubusercontent.com/348d682e4a4cc1f84e8571a9488c2087ae754c88/68747470733a2f2f692e696d6775722e636f6d2f437846506f50472e706e67 . Can you share your opininion which would be the best place to implement that feature - lsp-mode or lsp-ui?
@sebastiencs @MaskRay

@yyoncho yyoncho changed the title [Question]Code lenses support [Feature]Code lenses support Dec 21, 2018

@yyoncho yyoncho added the enhancement label Dec 21, 2018

@yyoncho yyoncho self-assigned this Jan 12, 2019

@yyoncho

This comment has been minimized.

Copy link
Member

yyoncho commented Jan 12, 2019

I will be working on this - I will ccls code as a base.

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 14, 2019

Implement lenses
Fixes emacs-lsp#361

- Implemented code lenses

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 14, 2019

Implement lenses
Fixes emacs-lsp#361

- Implemented code lenses

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 14, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line

- Lenses on the same line are grouped and displayed above the first text item.

- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do clain that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 14, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line

- Lenses on the same line are grouped and displayed above the first text item.

- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do clain that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 14, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line
- Lenses on the same line are grouped and displayed above the first text item.
- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

- The placement code was adapter from https://github.com/cpitclaudel/quick-peek

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do clain that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 16, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line
- Lenses on the same line are grouped and displayed above the first text item.
- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

- The placement code was adapter from https://github.com/cpitclaudel/quick-peek

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do clain that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 17, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line
- Lenses on the same line are grouped and displayed above the first text item.
- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

- The placement code was adapter from https://github.com/cpitclaudel/quick-peek

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do clain that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 17, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line
- Lenses on the same line are grouped and displayed above the first text item.
- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

- The placement code was adapter from https://github.com/cpitclaudel/quick-peek

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do clain that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 17, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line
- Lenses on the same line are grouped and displayed above the first text item.
- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

- The placement code was adapter from https://github.com/cpitclaudel/quick-peek

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do clain that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 18, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line
- Lenses on the same line are grouped and displayed above the first text item.
- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

- The placement code was adapter from https://github.com/cpitclaudel/quick-peek

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do clain that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 18, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line
- Lenses on the same line are grouped and displayed above the first text item.
- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

- The placement code was adapter from https://github.com/cpitclaudel/quick-peek

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do clain that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 18, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line
- Lenses on the same line are grouped and displayed above the first text item.
- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

- The placement code was adapter from https://github.com/cpitclaudel/quick-peek

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do clain that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 18, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line
- Lenses on the same line are grouped and displayed above the first text item.
- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

- The placement code was adapter from https://github.com/cpitclaudel/quick-peek

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do clain that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 18, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line
- Lenses on the same line are grouped and displayed above the first text item.
- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

- The placement code was adapted from https://github.com/cpitclaudel/quick-peek

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do claim that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Jan 19, 2019

Implemented code lenses support in lsp-mode
Fixes emacs-lsp#361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line
- Lenses on the same line are grouped and displayed above the first text item.
- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

- The placement code was adapted from https://github.com/cpitclaudel/quick-peek

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do claim that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers

@yyoncho yyoncho closed this in #595 Jan 19, 2019

yyoncho added a commit that referenced this issue Jan 19, 2019

Implemented code lenses support in lsp-mode (#595)
Fixes #361

The lenses support is similar to what VScode has:

- Lenses are displayed above the line
- Lenses on the same line are grouped and displayed above the first text item.
- Extension could register custom lences provider and add custom lenses, e. g.
JDT LS has extensions that display the tests hints.

- The placement code was adapted from https://github.com/cpitclaudel/quick-peek

Tested against CCLS and JDT LS. CCLS has to register the proper handler(similar
to what ccls vscode extension does). Some other servers like rls do claim that
they support lenses but I was unable to trigger them.

Further improvements:

* Provide different methods for redering methods (e. g. in the end of the line)
* Keyboard support for the lenses
* Test more servers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment