atg / chocolat-public

Public bug tracker for the private chocolat project
http://chocolatapp.com
180 stars 4 forks source link

Autocompletion for functions, variables, and classes doesn't work in PHP or Ruby #1659

Closed obahareth closed 9 years ago

obahareth commented 9 years ago

Autocompletion only seems to be working in JavaScript. Completion when I hit escape works, but autocompletion and suggestions (including those nice documentation popups) never show for me on Ruby or PHP.

howanghk commented 9 years ago

Yes this is very frustrating! 😰 Chocolat's PHP autocompletion and documentation popups were working fine with Mavericks and Chocolat 2.3. But after upgrading to Yosemite and being forced to pay for Chocolat 3 upgrade, the PHP code completion and documentation popups are gone.

I have tested a few languages on Chocolat, some with code completion working and some didn't. Working: (auto complete function name with function prototype) Javascript, Python, HTML, CSS Partial Working: (auto complete function name, but no function prototype provided) C, C++, Perl Not Working: (no auto completion at all) PHP, Java, Objective-C, Ruby

eseres commented 9 years ago

It also does not work in Erlang or Lua. I would love to see that supported/fixed. Thank you.

locks commented 9 years ago

I just confirmed that Ruby works.

howanghk commented 9 years ago

confirmed PHP code completion is working again on 3.0.1, nice!

obahareth commented 9 years ago

PHP code completion only uses a predefined list it seems. It doesn't autosuggest user defined variables and functions. It doesn't suggest class names from other files open in the project. It doesn't suggest the $this keyword either.

obahareth commented 9 years ago

Ruby code autosuggestion is showing user defined functions but not variables, but it doesn't autosuggest from other classnames in the project, it doesn't autocomplete the name of parent class of the current class file I'm in, it also doesn't autosuggest the names of user defined local and instance variables.

atg commented 9 years ago

Yah sorry this was due to a mixup with how embedded languages are handled (I had disabled it for when the "bottom" language is HTML when it should have been the "top" language). It should all be back to normal now?

atg commented 9 years ago

@forgottenleaf it should show user defined functions. We don't (at this time) do user defined variables because there's no support for scoping (so you would get all variables ever mentioned in the entire project)

obahareth commented 9 years ago

@fileability Could this be added as an option perhaps? I actually do like to use that every once in a while.

atg commented 9 years ago

The embedded languages bug is fixed now. The lack of scoping in the indexer is a broader issue.