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

[Future request] Go to Definition #61

Open
kanlukasz opened this issue Dec 8, 2020 · 7 comments
Open

[Future request] Go to Definition #61

kanlukasz opened this issue Dec 8, 2020 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed need more info

Comments

@kanlukasz
Copy link

Hello

I'm not sure if this is out of scope of this plugin, but maybe not.
Could you please consider adding a function like Go To Definition for CSS / SCSS.
Is it possible?

By the way, your plug is very good. Thank you!

@gencer
Copy link
Owner

gencer commented Dec 10, 2020

Hi @kanlukasz this is a bit out of scope of this extension. But I will leave this open maybe someday we can revisit here too.

At the moment I do not see enough reason to proceed for such action because this will lead me to write a Language Server which I just don't want to get in by myself at the moment. Without language server, it is still can be achieved somehow, but, this will increase both startup time and update time on your workspace horribly.

@gencer gencer assigned gencer and unassigned gencer Dec 10, 2020
@gencer gencer added enhancement New feature or request help wanted Extra attention is needed need more info labels Dec 10, 2020
@onetrev
Copy link

onetrev commented Mar 12, 2021

Hey @kanlukasz ... I think you may find that CSS Navigation actually does what you are looking for. It would be great if this extension could do the same as I find if you have both going you get some duplication, but neither one does everything I need all in one.

@SharakPL
Copy link

Isn't this already available? All you need is

  "html-css-class-completion.enableFindUsage": true,
  "html-css-class-completion.enableScssFindUsage": true,

in VSCode settings. It will show where suggested class was defined.

@kanlukasz
Copy link
Author

It will show where suggested class was defined.

Hmmm, I'm trying to test it now, but I don't understand how it's supposed to show the definitions. Can you elaborate more or show any example?

@SharakPL
Copy link

SharakPL commented Jan 2, 2023

You get the link to the file with definition so it's basically the same behaviour

@kanlukasz
Copy link
Author

Are you talking about it?
image

If so:

  • there is no linking for php files (of from php files)
  • there is no linking for the source file (style.css in this case)

By the way, from what I can see now, there is generally something wrong with the indexing for php files (but that is a matter for a separate issue)

I'm testing this on a fresh portable installation without any additional add-ons (but with SCSS-Everywhere, of course)

My settings:
image

OS for quick tests:

  • Win 11

Have you tested this on a fresh and clear VSCode?
Maybe you just have some another add-on that supports this linking for css files

@SharakPL
Copy link

SharakPL commented Jan 3, 2023

I also noticed only some classes have links to definition files (mainly .scss). Needs improvement for sure. Also paths can be broken for nested files: links work well but path shown in the link often has \ missing in the middle eg. \themes\default_dev\scss\main.scss
instead of
\themes\default\_dev\scss\main.scss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed need more info
Projects
None yet
Development

No branches or pull requests

4 participants