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

Code lens display #491

Open
jeremyFreeAgent opened this issue Oct 16, 2019 · 5 comments
Open

Code lens display #491

jeremyFreeAgent opened this issue Oct 16, 2019 · 5 comments

Comments

@jeremyFreeAgent
Copy link

Is it possible to have an option to display Code lens in the gutter bar as before?

Plus having it to appear suddenly in the editor (and moving lines) is a weird experience when selecting or moving cursor.

@nelson6e65
Copy link

nelson6e65 commented Oct 18, 2019

I agree; I dislike the addition of extra lines (spaces) in the code just for info.

In addition, I "fixed" (hacked) 😅 a console error , but I get this weird behavior with 'Override' text:

Captura de pantalla -2019-10-18 09-22-10

Well, I think it is because of the DocBlock methods documentation; with the linked error appearing there is not 'Override' text at all in my code with this files with this DocBlocks.

@Gert-dev
Copy link
Owner

Damn, and I was just happy that I could finally drop the legacy annotations behavior 😄 . I chose this approach because this is also the approach taken by other editors such as Visual Studio Code.

I'm trying to not introduce too much additional logic for this in this package for these kinds of things, as I'm hoping atom-languageclient and atom-ide-ui (now atom-ide-community) will pick up support for code lenses at some point. Currently this package uses a homebaked implementation because they don't have any yet.

The problem with the original annotations was also that they could basically only display one thing, i.e. there were no menus of any kind (not that they can't be added, of course).

Hopefully we can have a atom-ide-code-lens-annotations and atom-ide-code-lens-markers or something similar in the future to allow users to choose.

That said, with annotations I had some logic that didn't just remove and readd them constantly on every response. Instead, it tried to only prune those that no longer apply. Doing the same for this would ensure that the movement only happens the first time they are loaded.

@nelson6e65 Is it possible that the magic methods or properties in your docblock are actually overriding existing methods from the base class? In that way, they actually are an override (Serenata isn't smart enough yet to actually place them inside your docblock), but I agree that it doesn't look great in your screenshot 😄. I had to do some tinkering with the markers, because Atom apparently has trouble displaying multiple of them on the same line.

@nelson6e65
Copy link

Yes, They take me to the method when I click on them. They are functional; just have a wrong display. 😅

@jeremyFreeAgent
Copy link
Author

My current workaround is:

.php-ide-serenata-code-lens {
    display: block;
    position: fixed;
    right: 20px
}

It is not perfect, but it is avoiding the selection weird issue.

@nelson6e65
Copy link

My current workaround is:

.php-ide-serenata-code-lens {
    display: block;
    position: fixed;
    right: 20px
}

It is not perfect, but it is avoiding the selection weird issue.

Thanks, @jeremyFreeAgent. I'll use this in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants