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

No autocomplete for sub-classes on scss #19

Closed
Kcko opened this issue Feb 14, 2019 · 15 comments
Closed

No autocomplete for sub-classes on scss #19

Kcko opened this issue Feb 14, 2019 · 15 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@Kcko
Copy link

Kcko commented Feb 14, 2019

Hi gencer,

with today i started work on new project and i see a strange behavior with some mistakes
which were to be corrected in the previous commits / issues.

Video + explanation inside ... http://bit.ly/2S524WJ

:-(

@gencer
Copy link
Owner

gencer commented Feb 14, 2019

This is not a bug but a missing feature.

To autocomplete such SCSS selectors, we need to compile SCSS first.

For example;

.class { // We can auto complete this.
  &--connected {
    // we cannot know this until SCSS compiled.
  }
}

But I think I can hack into it and show such completions. Let me do some demos on my end and update here.

What I can do here is, hack into such completions and merge myself in parser. This can be done. But need a work to do.

@gencer gencer changed the title New project - strange buggy No autocomplete for sub-classes on scss Feb 14, 2019
@Kcko
Copy link
Author

Kcko commented Feb 14, 2019

In video you can see that im using app.css in project (where is everything after scss compilation).

@Kcko
Copy link
Author

Kcko commented Feb 14, 2019

And it works on previous project (plugin show completitions for latte / php / css )
and when im setup scssUsing : true also in scss files.
Now its works strangely.

@gencer
Copy link
Owner

gencer commented Feb 14, 2019

Are you sure that file is indexed by this extension? Is it local? Can you send me that file via email again? If it works on my end then this files does not get indexed in your workspace.

@gencer
Copy link
Owner

gencer commented Feb 14, 2019

So it works with that option?

@gencer
Copy link
Owner

gencer commented Feb 14, 2019

Ah and one more thing:

As you know we introduced incremental build that's mean when you change something after VSCode opens, we will include that changes.

This does not counts changed files on disk. This means, If you build that app.css files via gulp or something, vscode will not see that file. You need to click action button bottom of vscode. Try this. If it works, I will add this event to vscode.

@imichall
Copy link

Ah and one more thing:

As you know we introduced incremental build that's mean when you change something after VSCode opens, we will include that changes.

This does not counts changed files on disk. This means, If you build that app.css files via gulp or something, vscode will not see that file. You need to click action button bottom of vscode. Try this. If it works, I will add this event to vscode.

Yeah, it should be the problem @Kcko. Otherwise, will be this function added as feature into this extension as automatically? That will be watching changing files / dirs like a gulp or something like that? Just question.

@gencer
Copy link
Owner

gencer commented Feb 14, 2019

Yeah, it should be the problem @Kcko. Otherwise, will be this function added as feature into this extension as automatically? That will be watching changing files / dirs like a gulp or something like that? Just question.

Yup. That was what I am thinking of. I will watch changed files on disk. But I need @Kcko to confirm this. He probably restarted vscode thats why it did worked on second time -not by option-. Because next time he start vscodei app.css was there already.

@Kcko
Copy link
Author

Kcko commented Feb 14, 2019

Project eshop: (buggy)

css file here: http://nette-bootstrap.r.dev7.andweb.cz/assets/css/dev/app.css?1550137895
new video here: http://bit.ly/2X2m7c0

of course i press "uncache" btn on the bottom of VSC and after for sure I restarted VSC a several times - without change.

All files ale local.

@Kcko
Copy link
Author

Kcko commented Feb 14, 2019

Soccer project: (buggy less)

Video: http://bit.ly/2WYWYyK

Still with "html-css-class-completion.enableScssFindUsage": false

classes from BS are visible but occurences are only in (latte / php / html)
css -> missing -> bad (we set findUsage on false, but this should control only scss file)
scss -> missing -> godd (because we set findUsage on false)

Some idea whats bad?

@Kcko
Copy link
Author

Kcko commented Feb 14, 2019

and one small piece at the end, when i wrote exact name for class, it never on first position in the suggestion list.

@gencer
Copy link
Owner

gencer commented Feb 14, 2019

I will look into this and release new version.

Soccer project: (buggy less)

Video: http://bit.ly/2WYWYyK

Still with "html-css-class-completion.enableScssFindUsage": false

classes from BS are visible but occurences are only in (latte / php / html)
css -> missing -> bad (we set findUsage on false, but this should control only scss file)
scss -> missing -> godd (because we set findUsage on false)

Some idea whats bad?

It will be fixed in next build.

@gencer
Copy link
Owner

gencer commented Feb 14, 2019

Project eshop: (buggy)

css file here: http://nette-bootstrap.r.dev7.andweb.cz/assets/css/dev/app.css?1550137895
new video here: http://bit.ly/2X2m7c0

of course i press "uncache" btn on the bottom of VSC and after for sure I restarted VSC a several times - without change.

All files ale local.

I will look deeper on this.

@Kcko
Copy link
Author

Kcko commented Feb 14, 2019

So we should be clear about the behavior of plugin, I'm already losing myself.

It should works like that:

default behavior

Autocompletition for

  • latte
  • html
  • php
  • whatever without scss (because it slows down performance, can be solved at future)

When i add / change / delete some class or id in css file, it will rescan only file where i did it.
Fullscan will run only once (when i loaded project / workspace at first).

When i set "html-css-class-completion.enableScssFindUsage": true autocompletition will work on scss file now + will show occurences also.

Is it allright like this?

@gencer
Copy link
Owner

gencer commented Feb 14, 2019

Yes but i think you misunderstood how enableScssFindUsage works. I will explain in detail on readme later.

@gencer gencer self-assigned this Feb 15, 2019
@gencer gencer added bug Something isn't working enhancement New feature or request labels Feb 15, 2019
@gencer gencer closed this as completed May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants