atom / autocomplete-html

HTML tag and attribute completions
MIT License
60 stars 82 forks source link

Autocomplete CSS class/id in HTML/PHP files (and vice versa optionally) #13

Open PixelT opened 9 years ago

PixelT commented 9 years ago

It will be nice, when I write:

<div class="">

and the cursor is betwteen class="|" the autocomplete will show the class / id which I defined in my sass / scss / less / css files

Optionally: When I start write in sass / scss / less / css files by typing . or # the autocomplete display class / id which I defined in my HTML / PHP files.

florianbouvot commented 9 years ago

+1

sadovnychyi commented 8 years ago

Take a look on my PR #21

PixelT commented 8 years ago

Somebody think / work about this functionality?

sadovnychyi commented 8 years ago

@PixelT https://github.com/atom/autocomplete-html/pull/21 – it works, but still needs a lot of improvements.

admosity commented 8 years ago

This has been the crux of my life since I switched to atom. I work a lot in angular and none of the word completions are available to me.

I can switch autocomplete-plus' default provider to fuzzy search instead of symbol, but then I don't get the nice symbol notifications:

image

Fuzzy (yes! completions):

image

Symbol (no auto completions 😦 ):

image

I am pretty new to atom plugin development, but I've done some PRs to some linters in atom. If someone can point me to some docs and where to start to help out; I'd gladly contribute!

onetrev commented 7 years ago

I was super bummed when I saw recently that Atom 1.18 beta listed this in the improvements: "Improved suggestions in autocomplete-html"

But sadly, that did not include any movement on this issue. Am I in the minority here thinking the lack of this functionality is a major hinderance to anyone doing web dev with Atom, which has to be a big percentage of the users?

winstliu commented 7 years ago

Yep I'm aware. As you can see by #21, integrating CSS completions properly is a much harder task to do than the improvements I made in Atom 1.18. No one has had time to review that PR yet.

onetrev commented 7 years ago

Hey @PixelT, @florianbouvot and @admosity ... I recently found this package https://github.com/aidistan/atom-symbols-view-plus which solves the main request of autocompletion in your HTML class declarations without having to have all the files open. Atocomplete of classes in your sass / css / etc, is still not possible as far as I know, but I think that's probably less important.

Hopefully now with the Filesystem watcher API coming in Atom 1.21, both these items can finally be tackled and with core packages! But for now at least the package above definitely helps.