victorteokw / ac-html

Emacs auto complete source for html.
22 stars 9 forks source link

Support multiple html-stuff directories #14

Closed osv closed 9 years ago

osv commented 9 years ago

I think will be great if many customizable source directories will be available for user setup. Different directory tree like for bootstrap or for example angular.js. So other project, let say ac-html-bootstrap, that populate "class" completion for div, button, etc and some new attributes, may be started separately. But need way to enable source of "html-stuff" locally for each buffer by user command setting variable like directly in html file:

<!-- Local Variables:
 eval: (ac-html-bootstrap t)
 End
-->
victorteokw commented 9 years ago

Very nice idea. Since user always works on a project, use frameworks. This makes emacs and ac-html more intelligent and extendable than any other editor or plugin.

osv commented 9 years ago

Ok, I will try make this in next way: defcustom type alist

(html . 'package-dir-html-stuff)

where car of this alist html is name of html-stuff, I think will be cool to make popups item with that name, so if you have other html-stuff dirs for example,

(("html" . 'package-dir-html-stuff)
  ("Knockout" . "~/cool-html-stuff-for-knockout.js/"))

than make

(popup-make-item candidate-item
                  :summary car-alist))

:) Summary is right aligned text like below "Function..." summary

I'm lazy for prototype:)

For id and class names: maybe need external tools that scan project for less, css, etc and build on top of project file tree /global-class /global-id

victorteokw commented 9 years ago

Brilliant! Just go and do it! :-D

osv commented 9 years ago

Almost done, just value completin left popup

osv commented 9 years ago

Summary "html, G" mean that it global, discuss about design of summary are wellcome.

victorteokw commented 9 years ago

Nice! :-D For framework defined attribute, e.g. ng-... , can use "Angular" or "A" to denote.

osv commented 9 years ago

Almost done, lot of work and refactoring, lambdaling and name clean.

I dont use TTD practice, so tests are broken! I have no time to Sunday.

Also now tag list, attribute list, can have inline documentaion like attribute-values files separated by space.

You can check branch multy_dir. I merge to master at Monday maybe

victorteokw commented 9 years ago

Thanks! I don't have time until Monday, too. That's never mind. I wil update tests to follow.

victorteokw commented 9 years ago

I have a little worry if people will be freak-out. So I may invite some guy to help you and me on refactoring the code. And I will do the merge job.

osv commented 9 years ago

A, ok. However there not so much work, need recreate tests because candidates are not string list but popup-items.

victorteokw commented 9 years ago

Thanks.

osv commented 9 years ago

tests are done, prepare pull request :)?

victorteokw commented 9 years ago

I'm busy these days, just create a pull request. :-D

osv commented 9 years ago

Hello!

Want to ask, when branch will be merged? Want to publish other modules that depend on ac-html. You may give me access if busy nowadays :)

victorteokw commented 9 years ago

Hello!

Sorry for that. I am busy these days. If you are adding new features, you can use your forked repo.

If it's something else, could you explain what it is and how it works?

Thanks

Zhang Kai Yu

On Jan 18, 2015, at 8:55 PM, Olexandr Sydorchuk notifications@github.com wrote:

Hello!

Want to ask, when branch will be merged? Want to publish other modules that depend on ac-html. You may give me access if busy nowadays :)

— Reply to this email directly or view it on GitHub.

osv commented 9 years ago

Well, I have 2 project, ac-html-bootstrap bootstrap class helper and ac-html-csswatcher (css, less class completion for project), both require multidir branch and pull https://github.com/cheunghy/ac-html/pull/22 That all. Want MELPAing both.

osv commented 9 years ago

Ah, also there is https://github.com/osv/ac-html/compare/multy_dirs_tests branch that fix test using 2 sets of fixtures, I think better than broken test after merging multidir branch

victorteokw commented 9 years ago

Merged.

Thanks!

osv commented 9 years ago

Thanks!

osv commented 9 years ago

ah, olso maybe good idea to bump version, to make sure my module depend on fresh ac-html :)

victorteokw commented 9 years ago

Bumped version to 0.3

When the nice packages are available on melpa, notify me. I will update README.md to include them.

osv commented 9 years ago

Sure