language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

use file/folder list from the configured static folder in autocompletions for url helpers in <style> section

Open alf5 opened this issue 1 year ago • 4 comments

[Question] I was wondering if the displayed list can be configured to list the files/folder in the configured "static" folder for the project?

e.g. image

This ends up inserting "/static/images/bg.svg", it should be "/images/bg.svg".

It annoying having to always edit the resulting string and removing "/static".

alf5 avatar Jul 29 '22 00:07 alf5

I don't understand the question. If you go '/static/ is should show these AFAIK

dummdidumm avatar Jul 29 '22 09:07 dummdidumm

it ends up inserting "/static/images/bg.svg", what it should be inserting is "/images/bg.svg"

ill edit the original question.

alf5 avatar Jul 30 '22 01:07 alf5

Ok so you want the completion suggests to be relative to your static folder. Honestly not sure if this is possible, since this relies on the VS Code HTML Language Service. At the very least it would need some kind of config option to tell where to start from.

dummdidumm avatar Aug 04 '22 13:08 dummdidumm

Isn't that possible, in advance, to determine from where the user required to see autocompletions?

Thus we could:

  1. Use normal paths for <script> cases.
  2. Use paths relative to static folder for paths inside <script> tag, or inside style files (css, scss).

That would make the most sense, because that's basically how Svelte works.

Isn't that possible to determine this, from within extension?

jerrygreen avatar Jul 15 '23 20:07 jerrygreen