peekmo / atom-autocomplete-php Goto Github PK
View Code? Open in Web Editor NEWAutocomplete for PHP in atom editor
License: MIT License
Autocomplete for PHP in atom editor
License: MIT License
When a class is selected via PhpClassProvider, PhPStaticProvider should be triggered
(@see https://github.com/atom-community/autocomplete-plus/pull/184)
It seems that alt + click does not work on OSX version 1.0.3
Hello
It seems that in the most recent release 0.1.10, the members of $this are incorrectly shown after method calls when typing a dash, i.e.:
// As soon as the dash '-' is typed, I get completion containing the methods of $this again.
$this->test()-
The same happens when typing a greater than sign '>' instead of the dash:
$this->test()>
Thanks in advance
Hello
I just noticed that, if I cancel the alt-click (or ctrl-alt-g
) popup using the escape key, focus is not restored to the editor it was invoked on (or the input cursor is moved somewhere else). You have to click inside the editor to resume typing.
Thanks in advance
[Enter steps to reproduce below:]
Atom Version: 1.0.4
System: Mac OS X 10.10.1
Thrown From: atom-autocomplete-php package, v0.6.4
Uncaught TypeError: Cannot read property 'split' of undefined
At /Users/aanceau/github/atom-autocomplete-php/lib/goto/function-goto.coffee:46
TypeError: Cannot read property 'split' of undefined
at GotoFunction.module.exports.GotoFunction.gotoFromWord (/Users/aanceau/github/atom-autocomplete-php/lib/goto/function-goto.coffee:46:25)
at GotoFunction.<anonymous> (/Users/aanceau/github/atom-autocomplete-php/lib/goto/abstract-goto.coffee:120:30)
at /Users/aanceau/github/atom-autocomplete-php/lib/goto/abstract-goto.coffee:210:18
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at TextEditor.module.exports.TextEditor.cursorMoved (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1595:27)
at /Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:56:31
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at Marker.module.exports.Marker.notifyObservers (/Applications/Atom.app/Contents/Resources/app.asar/src/marker.js:270:27)
at /Applications/Atom.app/Contents/Resources/app.asar/src/marker.js:65:26
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at Marker.module.exports.Marker.emitChangeEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker.js:401:20)
at Marker.module.exports.Marker.update (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker.js:346:12)
at MarkerStore.module.exports.MarkerStore.restoreFromSnapshot (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker-store.js:208:20)
at TextBuffer.module.exports.TextBuffer.revertToCheckpoint (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:791:26)
at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:758:14)
at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1155:26)
at AutocompleteManager.module.exports.AutocompleteManager.replaceTextWithMatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:528:26)
at AutocompleteManager.replaceTextWithMatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61)
at AutocompleteManager.module.exports.AutocompleteManager.confirm (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:480:12)
at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at SuggestionList.module.exports.SuggestionList.confirm (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/suggestion-list.js:135:27)
at SuggestionList.confirm (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/suggestion-list.js:3:61)
at autocomplete-suggestion-list.SuggestionListElement.confirmSelection (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/suggestion-list-element.js:251:27)
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at SuggestionList.module.exports.SuggestionList.confirmSelection (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/suggestion-list.js:139:27)
at atom-text-editor.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/suggestion-list.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:177:20)
-0:20.2.0 core:close (input.hidden-input)
-0:15.9.0 docblockr:parse-enter (input.hidden-input)
-0:15.8.0 editor:newline (input.hidden-input)
-0:15.7.0 core:copy (input.hidden-input)
-0:13.7.0 core:undo (input.hidden-input)
-0:12.9.0 docblockr:parse-enter (input.hidden-input)
-0:12.9.0 editor:newline (input.hidden-input)
-0:12.7.0 core:paste (input.hidden-input)
-0:10.7.0 core:cut (input.hidden-input)
-0:10.1.0 snippets:next-tab-stop (input.hidden-input)
-0:10.1.0 snippets:expand (input.hidden-input)
-0:10.1.0 docblockr:parse-tab (input.hidden-input)
-0:10.1.0 editor:indent (input.hidden-input)
-0:09.5.0 core:backspace (input.hidden-input)
-0:02.4.0 core:move-up (input.hidden-input)
-0:01.7.0 autocomplete-plus:confirm (input.hidden-input)
{
"core": {
"themes": [
"one-light-ui",
"one-light-syntax"
],
"excludeVcsIgnoredPaths": false,
"disabledPackages": [
"autocomplete-snippets",
"vim-mode",
"robin-language-php"
]
},
"atom-autocomplete-php": {
"binComposer": "/usr/local/bin/composer"
}
}
# User
atom-autocomplete-php, v0.6.4
atom-beautify, v0.28.8
atom-html-preview, v0.1.11
atom-ternjs, v0.7.1
atom-twitter-client, v0.4.2
autoclose-html, v0.18.0
autocomplete-phpunit, v1.0.2
block-cursor, v0.13.1
color-picker, v2.0.11
docblockr, v0.7.3
docs-snippets, v0.8.0
file-icons, v1.6.2
highlight-selected, v0.10.1
linter, v1.3.1
linter-eslint, v3.0.2
linter-php, v1.0.3
php-getters-setters, v0.5.5
php-twig, v4.0.0
phpunit, v1.1.1
phpunit-snippets, v0.1.0
tabular, v0.1.0
# Dev
No dev packages
Hello
Autocompletion of use statements ignores the already present prefix or text when slashes are present. For example, here I get suggestions (correct):
use Foo\Bar\
/----------------\
| Foo\Bar\Class1 |
| Foo\Bar\Class2 |
| Foo\Bar\Class3 |
| Foo\Bar\Class4 |
\----------------/
I now select Foo\Bar\Class1
, but now I get:
use Foo\Bar\Foo\Bar\Class1
Instead of:
use Foo\Bar\Class1
I think this has something to do with the slashes again, if you enter:
use Foo
And now select Foo\Bar\Class1
, you (correctly) receive:
use Foo\Bar\Class1
Thanks in advance
Hello
I was wondering if there is a reason the package is trying to access my home folder? I have the following filesystem lay-out with an open_basedir restriction:
For some reason, when opening MyProject, php/parser.php generates a warning that an attempt was made to chdir() to the home folder (~). This message doesn't seem to break any functionality, but I thought I'd ask anyway to be sure this wasn't an unintended side effect.
Thanks in advance
Maybe join projects (or just share ideas?) with https://github.com/steelbrain/AutoComplete-Hack ?
Fill the changelog.
You might want to take a look at php-reflect, a library and tool that is able to analyze PHP sources without triggering any error. Moreover, it provides extension points, allowing to visit the parsed sources.
[Enter steps to reproduce below:]
Atom Version: 1.0.0
System: Mac OS X 10.10.3
Thrown From: atom-autocomplete-php package, v0.1.4
Uncaught Error: Unable to find composer.json file or to open it.
At /Users/abhiraj/.atom/packages/atom-autocomplete-php/lib/services/php-proxy.coffee:77
Error: Unable to find composer.json file or to open it.
at readComposer (/Users/abhiraj/.atom/packages/atom-autocomplete-php/lib/services/php-proxy.coffee:77:13)
at Object.module.exports.composer (/Users/abhiraj/.atom/packages/atom-autocomplete-php/lib/services/php-proxy.coffee:114:12)
at Object.module.exports.createNamespace (/Users/abhiraj/.atom/packages/atom-autocomplete-php/lib/services/namespace.coffee:13:25)
at atom-workspace.atom.commands.add.atom-autocomplete-php:namespace (/Users/abhiraj/.atom/packages/atom-autocomplete-php/lib/config.coffee:43:19)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:180:20)
-2:39.8.0 core:move-up (atom-text-editor.editor.is-focused)
-2:39.7.0 core:move-down (atom-text-editor.editor.is-focused)
-2:39.1.0 core:move-up (atom-text-editor.editor.is-focused)
-2:38.7.0 core:backspace (atom-text-editor.editor.is-focused)
-1:15.2.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
-1:15.2.0 editor:newline (atom-text-editor.editor.is-focused)
4x -0:30 core:backspace (atom-text-editor.editor.is-focused)
-0:28.7.0 application:new-file (atom-text-editor.editor.is-focused)
-0:26.1.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
-0:26.1.0 editor:newline (atom-text-editor.editor.is-focused)
-0:25.9.0 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
-0:25.9.0 editor:newline (atom-text-editor.editor.is-focused)
-0:24.2.0 core:move-up (atom-text-editor.editor.is-focused)
-0:09.6.0 core:backspace (atom-text-editor.editor.is-focused)
-0:08.1.0 core:select-down (atom-text-editor.editor.is-focused)
-0:02.3.0 atom-autocomplete-php:namespace (atom-text-editor.editor.is-focused)
{
"core": {
"themes": [
"atom-light-ui",
"atom-dark-syntax"
],
"disabledPackages": [
"autocomplete-plus"
]
},
"atom-autocomplete-php": {}
}
# User
atom-autocomplete-php, v0.1.4
autoclose-html, v0.18.0
autocomplete-php, v0.3.6
emmet, v2.3.10
jshint, v1.3.8
project-manager, v1.15.10
# Dev
No dev packages
Task list before first alpha of the plugin (publish in atom packages)
I missed auto-completion for class variables and methods
parent::{method}
It would be nice to have a key command I could hit that would add the class of the file similar to the add namespace command (maybe combined?).
Ideally it would be smart enough to:
App\Http\Controllers\HardwareController
, check for a App\Http\Controllers\Controller
class, and if found, assume HardwareController
extends it). In this case, output class HardwareController extends Controller { ... }
. Also, if there are any abstract methods for that class (from either an abstract class it extends or an interface it implements), those would automatically be pulled in.Basically, I would like to be able to open an empty PHP file (no <?php
tag yet or anything) and when I press a key command the following would show up.
<?php
namespace App\Http\Controllers;
class HardwareController extends Controller
{
//
}
And with abstract methods
<?php
namespace App\Http\Transformers;
class HardwareTransformer extends Transformer
{
/**
* Transform an item into an array
* @param Model|null $item
* @return array
*/
public function item($item)
{
return [array];
}
}
where app/Http/Tansformers/Transformer.php
is something like
<?php
namespace App\Http\Transformers;
abstract class Transformer
{
/**
* Transform an item into an array
* @param Model|null $item
* @return array
*/
public abstract function item($item);
}
It would be smart to separate the two tasks above into separate commands (and one command that does everything combined). That way, say you wanted to extend a Laravel contract. You could create an empty file, app/Services/Pusher/PusherService.php
, then press [ctrl-alt-c]
(for example) to insert the class and namespace, getting:
<?php
namespace App\Services\Pusher;
class PusherService
{
//
}
Then put use Illuminate\Contracts\Some\Contract;
and implements Contract
in the appropriate location and then [ctrl-alt-m]
(for example) to insert the abstract methods from that contract. This would yield:
<?php
namespace App\Services\Pusher;
use Illuminate\Contracts\Some\Contract;
class PusherService implements Contract
{
/**
* <PHP Doc for push from Contract pasted here, can be modified by developer accordingly>
*/
public function push($path, $data)
{
//
}
}
I'm not an Atom developer yet nor do I have a lot of time otherwise I'd build this myself, but I'm happy to offer insight or ideas and bug test (on Ubuntu).
How do i install this on Atom
The classes list is too long to generate for a big project (as Symfony2). To avoid that, I suggest to create an index for classes lists. This index will be stored in plugin config in a json file (which will be named as path to the folder)
My development environment is on Windows and I've installed this package. As soon as I try typing anything inside a PHP file I get the titled error, more specifically, "'php' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.". This is followed by an error in the console, "Uncaught Error: spawn php ENOENT".
I have verified this is the package causing the problem as the problem disappears as soon as I disable only this package. In addition I have verified that the directory for PHP is in my path, and has been loaded by Atom, by checking process.env.PATH variable while loaded. I also have verified that it is functioning on my system.
Task list for 0.2.0 version (to be completed) :
NUFF SAID
Hello
It would be neat if, like atom-ternjs, a tooltip with the parameters of the method the cursor is currently on are displayed in a tooltip (optionally highlighting the parameter the cursor is currently at). This could happen when either the cursor is on the method or in its body. Something like:
/**
* My method.
*
* @param int $param1 This is parameter 1.
* @param string|null $param2 This is parameter 2.
*
* @return void
*/
protected function foo($param1, $param2 = null)
{
// ...
}
protected function bar()
{
// | is where the cursor is and param2 would be highlighted in bold in the tooltip.
foo(5, |'test');
/------------------------------------\
| int $param1[, string|null $param2] |
|------------------------------------|
| This is parameter 2. |
\------------------------------------/
}
This would majorly complement the current autocompletion list as you get the current list when autocompleting methods and then, when you open the paranthesis of the body or the cursor jumps to the first argument on completion, you get the parameter list.
Just wanted to mention that this is not a required feature for me (I'm already very happy to even have the package at all, thanks for this!), but just to feed you with idea's :-).
Thanks for this great package!
Hello
When coding today with version 0.1.10, I noticed that I get very high CPU usage from the PHP process (php binary) spawned when autocompletion is provided. The CPU usage is high enough to end up in Atom completely freezing until I manually kill the spawned PHP processes.
I can reproduce it with the following sample in my codebase:
public function __construct()
{
$this->test()-> // Freeze as soon as the '>' is typed.
}
/**
* Test
*
* @return $this
*/
protected function test()
{
}
In the used codebase, $this
contains quite a bit of methods, but displaying completion using just $this->
works fine and without much performance impact, which made me suspect there is a bug. I am using PHP 5.5 on the background.
Thanks in advance
A command to test that PHP and COMPOSER are correctly configured.
Should this Plugin work for single files or small projects without composer interaction?
E.g. if I have something like this:
<?php
class Bar {
public $var_abc = null;
public $var_xyz = null;
public $var_foo = null;
public function foourz() { }
}
class Foo {
public function foobar($a) {
return new Bar();
}
public function test() {
}
}
$f = new Foo();
$f->
If I type $f->f
the built in autocompleter show me all identifiers with starts with f
, even those who aren't in class Foo (e.g. foourz
) from Bar. I've tried your plugin on Windows 8.1 but I saw no difference.
Today $this->x->y->z
only works on the same line.
Would be great to enable
$this
->x
->y
->z
TypeError: Cannot read property 'command' of undefined
at Object.module.exports.init (/home/alexandernst/.atom/packages/atom-autocomplete-php/lib/config.coffee:42:23)
at Object.module.exports.activate (/home/alexandernst/.atom/packages/atom-autocomplete-php/lib/peekmo-php-atom-autocomplete.coffee:40:12)
at Package.module.exports.Package.activateNow (/usr/share/atom/resources/app.asar/src/package.js:238:19)
at /usr/share/atom/resources/app.asar/src/package.js:219:30
at Package.module.exports.Package.measure (/usr/share/atom/resources/app.asar/src/package.js:163:15)
at Package.module.exports.Package.activate (/usr/share/atom/resources/app.asar/src/package.js:211:14)
at PackageManager.module.exports.PackageManager.activatePackage (/usr/share/atom/resources/app.asar/src/package-manager.js:451:21)
at /usr/share/atom/resources/app.asar/node_modules/settings-view/lib/package-manager.js:362:29
at exit (/usr/share/atom/resources/app.asar/node_modules/settings-view/lib/package-manager.js:53:16)
at triggerExitCallback (/usr/share/atom/resources/app.asar/src/buffered-process.js:213:47)
at /usr/share/atom/resources/app.asar/src/buffered-process.js:220:18
at Socket.<anonymous> (/usr/share/atom/resources/app.asar/src/buffered-process.js:98:18)
at emitOne (events.js:82:20)
Hello
This is not really a bug, as I think this just isn't taken into account yet, but namespace aliases are ignored, for example:
use Foo\Bar\Test as MyClass;
// No matches found when alt-clicking MyClass. Should go to Foo\Bar\Test.
class B extends MyClass
{
}
I rarely use namespace aliasing, but I thought I'd just mention it anyway so you know it exists and can put it on your 'someday' roadmap ;-).
Thanks in advance
I'm on Debian Linux, Atom .206. I'm currently working on a project which uses composer, but I don't see any autocomplete at all.
I opened dev tools to check if the plugin was crashing behind the scene, but it's not. I do see a Building index
and Build done
messages in the console, but I don't see any autocomplete.
[Enter steps to reproduce below:]
Atom Version: 1.0.2
System: elementary OS
Thrown From: atom-autocomplete-php package, v0.5.0
Failed to activate the atom-autocomplete-php package
At EACCES: permission denied, open '/home/exupero/.atom/packages/atom-autocomplete-php/php/tmp.php'
Error: EACCES: permission denied, open '/home/exupero/.atom/packages/atom-autocomplete-php/php/tmp.php'
at Error (native)
at Object.fs.openSync (fs.js:544:18)
at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:118:20)
at Object.fs.writeFileSync (fs.js:1155:15)
at Object.module.exports.writeConfig (/home/exupero/.atom/packages/atom-autocomplete-php/lib/config.coffee:41:17)
at Object.module.exports.init (/home/exupero/.atom/packages/atom-autocomplete-php/lib/config.coffee:56:12)
at Object.module.exports.activate (/home/exupero/.atom/packages/atom-autocomplete-php/lib/peekmo-php-atom-autocomplete.coffee:56:14)
at Package.module.exports.Package.activateNow (/usr/share/atom/resources/app.asar/src/package.js:240:19)
at /usr/share/atom/resources/app.asar/src/package.js:221:30
at Package.module.exports.Package.measure (/usr/share/atom/resources/app.asar/src/package.js:165:15)
at Package.module.exports.Package.activate (/usr/share/atom/resources/app.asar/src/package.js:213:14)
at PackageManager.module.exports.PackageManager.activatePackage (/usr/share/atom/resources/app.asar/src/package-manager.js:452:21)
at /usr/share/atom/resources/app.asar/src/package-manager.js:436:29
at Config.module.exports.Config.transact (/usr/share/atom/resources/app.asar/src/config.js:311:16)
at PackageManager.module.exports.PackageManager.activatePackages (/usr/share/atom/resources/app.asar/src/package-manager.js:431:19)
at PackageManager.module.exports.PackageManager.activate (/usr/share/atom/resources/app.asar/src/package-manager.js:412:46)
at Atom.module.exports.Atom.startEditorWindow (/usr/share/atom/resources/app.asar/src/atom.js:645:21)
at Object.<anonymous> (/usr/share/atom/resources/app.asar/src/window-bootstrap.js:12:8)
at Object.<anonymous> (/usr/share/atom/resources/app.asar/src/window-bootstrap.js:23:4)
at Module._compile (module.js:452:26)
at Object.loadFile [as .js] (/usr/share/atom/resources/app.asar/src/babel.js:162:21)
at Module.load (module.js:347:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at setupWindow (file:///usr/share/atom/resources/app.asar/static/index.js:96:23)
at window.onload (file:///usr/share/atom/resources/app.asar/static/index.js:36:7)
{
"core": {
"disabledPackages": [
"language-ruby",
"RubyMotion",
"livescript-compile",
"JSL",
"JSL",
"JSL",
"livescript-compile",
"JSL",
"JSL",
"JSL",
"JSL",
"JSL",
"JSL",
"JSL",
"JSL",
"JSL",
"livescript-compile",
"text-to-string-for-javascript-converter",
"robin-language-php",
"Modo",
"language-javascript-subtlegradient",
"language-python-django-templates",
"linter-metascript",
"robin-language-php",
"ruby-slim",
"text-to-string-for-javascript-converter",
"live-doc-viewer",
"linter-python-pyflakes",
"linter-python-pep8"
]
},
"atom-autocomplete-php": {}
}
# User
.bin, vundefined
aligner-ruby, v1.4.0
atom-autocomplete-php, v0.5.0
atom-phpcs, v0.8.0
atom-python-debugger, v0.3.4
atom-ternjs, v0.6.8
autocomplete-php, v0.3.6
autocomplete-phpunit, v1.0.2
autocomplete-plus-python-jedi, v0.3.6
autocomplete-python, v0.5.1
autocomplete-ruby, v0.1.0
ember-cli-helper, v0.7.2
ember-snippets, v1.4.0
javascript-snippets, v1.0.0
jsformat, v0.9.0
jshint, v1.3.9
language-babel, v0.10.2
language-javascript-jsx, v0.3.7
linter, v1.2.4
linter-pep257, v0.2.1
linter-php, v0.0.15
linter-phpcs, v1.0.5
linter-phpmd, v0.0.11
linter-pylama, v0.1.4
linter-pylint, v0.2.2
linter-rubocop, v0.2.7
linter-ruby, v0.1.6
php-debug, v0.1.2
php-getters-setters, v0.5.5
php-introspector, v1.0.0
phpunit, v1.1.1
phpunit-snippets, v0.1.0
python-for-glyphs, v0.1.0
python-isort, v0.0.7
python-jedi, v0.3.0
python-yapf, v0.7.0
rhino-python, v0.6.2
robe, v0.1.0
ruby-block, v0.3.4
ruby-block-converter, v3.5.0
ruby-define-method, v0.2.1
script-runner, v1.8.3
sinatra-snippets, v1.4.0
standard-formatter, v1.0.0
symfony-snippets, v0.3.0
# Dev
No dev packages
Hello
I'm experiencing high CPU usage (up to the point where my CPU starts heating up and fans start spinning at maximum). This is probably because I save pretty often and each save initiates a rebuild of the index. I'm not entirely sure what can be done about this, but I just wanted to report it anyway so you know it's happening :P.
Thanks in advance
Hello
I see that this plugin works by using vendor/autoload.php to index the code. I just wanted to drop a link here to the Padawan project which aims to do the same but offers a separate editor-agnostic server, which you may be able to hook into without duplicating efforts. Either way there aren't many plugins or efforts like this around (which seems strange, since PHP is a very popular language), so thanks for this effort!
I see that auto complete works, so it must know something, but it doesn't seem to have full symbols support since "Go to declaration" is not working.
Hi @Peekmo can you please update to the new autocomplete-plus API? https://github.com/atom-community/autocomplete-plus/wiki/Provider-API
The old API will be removed on Tuesday, February 10th, 2015.
Open the PHP file related to the class or function under the cursor.
Opening the file to the line where the function is defined (for example) could be very nice.
Atom Version: 1.0.0
System: Windows 7
Thrown From: atom-autocomplete-php package, v0.1.7
Uncaught TypeError: Cannot read property 'autocomplete' of null
At C:\Users\ggonzalezdominguez\.atom\packages\atom-autocomplete-php\lib\providers\class-provider.coffee:27
TypeError: Cannot read property 'autocomplete' of null
at ClassProvider.module.exports.ClassProvider.fetchSuggestions (C:\Users\ggonzalezdominguez\.atom\packages\atom-autocomplete-php\lib\providers\class-provider.coffee:27:19)
at ClassProvider.module.exports.AbstractProvider.getSuggestions (C:\Users\ggonzalezdominguez\.atom\packages\atom-autocomplete-php\lib\providers\abstract-provider.coffee:23:13)
at C:\Users\ggonzalezdominguez\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\autocomplete-plus\lib\autocomplete-manager.js:255:56
at Array.forEach (native)
at AutocompleteManager.module.exports.AutocompleteManager.getSuggestionsFromProviders (C:\Users\ggonzalezdominguez\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\autocomplete-plus\lib\autocomplete-manager.js:234:17)
at AutocompleteManager.getSuggestionsFromProviders (C:\Users\ggonzalezdominguez\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\autocomplete-plus\lib\autocomplete-manager.js:3:61)
at AutocompleteManager.module.exports.AutocompleteManager.findSuggestions (C:\Users\ggonzalezdominguez\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\autocomplete-plus\lib\autocomplete-manager.js:221:19)
at C:\Users\ggonzalezdominguez\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\autocomplete-plus\lib\autocomplete-manager.js:3:61
2x -4:07.2.0 core:backspace (atom-text-editor.editor.is-focused)
-4:05.4.0 core:move-down (atom-text-editor.editor.is-focused)
2x -4:04.6.0 core:save (atom-text-editor.editor.is-focused)
-3:40.1.0 atom-beautify:beautify-editor (atom-text-editor.editor.is-focused)
-3:23.2.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
-3:23.2.0 snippets:expand (atom-text-editor.editor.is-focused)
-3:23.2.0 editor:indent (atom-text-editor.editor.is-focused)
-3:22.9.0 core:save (atom-text-editor.editor.is-focused)
-2:22.6.0 find-and-replace:show (atom-text-editor.editor.is-focused)
-2:20.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-2:19.2.0 project-find:show (atom-text-editor.editor.mini.is-focused)
-2:17.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:23 project-find:show (atom-text-editor.editor.is-focused)
-0:22 core:paste (atom-text-editor.editor.mini.is-focused)
-0:15.1.0 core:move-left (atom-text-editor.editor.is-focused)
-0:12.9.0 core:save (atom-text-editor.editor.is-focused)
{
"core": {},
"atom-autocomplete-php": {
"binPhp": "D:\\php\\php.exe",
"binComposer": "C:\\ProgramData\\ComposerSetup\\bin\\composer"
}
}
# User
atom-autocomplete-php, v0.1.7
atom-beautify, v0.28.7
line-ending-converter, v1.2.0
linter, v1.1.0
linter-jshint, v0.1.7
linter-php, v0.0.15
linter-phpcs, v0.0.15
linter-phpmd, v0.0.11
live-archive, v0.1.15
minimap, v4.10.1
minimap-git-diff, v4.1.3
minimap-linter, v1.0.0
php-twig, v4.0.0
remote-sync, v3.1.2
symfony-snippets, v0.3.0
# Dev
No dev packages
Manage autocomplete on function's local variables.
public function test()
{
$x = new \DateTime();
$x->{autocomplete}
}
Hello
I think I figured out one of the issues I was having with alt hovering not triggering in docblocks, it appears they are just not added for newly added comments, for example:
/**
* Test
*
* @return SomeType
*/
Using alt and hovering over SomeType
works correctly. However, if you now remove the line with * @return SomeType
, save, readd it, and save again, you can now no longer hover over it using the alt key. Closing the file tab and reopening it fixes the problem, so I think the handlers are just not connected for new code in comments (perhaps the file is only scanned once when it is opened)? This does work correctly for code outside comments.
Thanks in advance
The following shows no autocomplete:
<?php namespace Services;
class SomeService
{
public function __construct()
{
$this->{fail}
}
}
While this does:
<?php
namespace Services;
class SomeService
{
public function __construct()
{
$this->{YEAHHH}
}
}
v0.5.0
If there's (@@,@@@,@@) in the label, using a snippet for each argument would be great (like sublime text)
[Enter steps to reproduce below:]
/** @var DateTime */
$x = new DateTime();
$x-> (on this point fails)
Atom Version: 1.0.2
System: Ubuntu 14.04.2
Thrown From: atom-autocomplete-php package, v0.5.0
Uncaught TypeError: Cannot read property '1' of null
At /home/roderick/.atom/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:94
TypeError: Cannot read property '1' of null
at Object.module.exports.findUseForClass (/home/roderick/.atom/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:94:12)
at Object.module.exports.getVariableType (/home/roderick/.atom/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:317:19)
at Object.module.exports.parseElements (/home/roderick/.atom/packages/atom-autocomplete-php/lib/services/php-file-parser.coffee:363:24)
at AutocompleteProvider.module.exports.AutocompleteProvider.fetchSuggestions (/home/roderick/.atom/packages/atom-autocomplete-php/lib/providers/autocomplete-provider.coffee:29:24)
at AutocompleteProvider.module.exports.AbstractProvider.getSuggestions (/home/roderick/.atom/packages/atom-autocomplete-php/lib/providers/abstract-provider.coffee:23:13)
at /usr/share/atom/resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:255:56
at Array.forEach (native)
at AutocompleteManager.module.exports.AutocompleteManager.getSuggestionsFromProviders (/usr/share/atom/resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:234:17)
at AutocompleteManager.getSuggestionsFromProviders (/usr/share/atom/resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61)
at AutocompleteManager.module.exports.AutocompleteManager.findSuggestions (/usr/share/atom/resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:221:19)
at AutocompleteManager.findSuggestions (/usr/share/atom/resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61)
at atom-text-editor.subscriptions.add.atom.commands.add.autocomplete-plus:activate (/usr/share/atom/resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:197:26)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:241:29)
at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:177:20)
-3:15.4.0 core:paste (atom-text-editor.editor.is-focused)
-3:14.2.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
-2:35.1.0 core:copy (atom-text-editor.editor.is-focused)
-2:30.1.0 core:paste (atom-text-editor.editor.is-focused)
-2:28 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
-1:59.9.0 core:save (atom-text-editor.editor.is-focused)
2x -1:58.6.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
-1:45.1.0 core:save (atom-text-editor.editor.is-focused)
2x -1:43.8.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
-0:18.7.0 editor:newline (atom-text-editor.editor.is-focused)
-0:18.2.0 core:move-down (atom-text-editor.editor.is-focused)
-0:17.4.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
-0:17 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
-0:11 core:backspace (atom-text-editor.editor.is-focused)
-0:10.3.0 core:save (atom-text-editor.editor.is-focused)
2x -0:09.1.0 autocomplete-plus:activate (atom-text-editor.editor.is-focused)
{
"core": {
"disabledPackages": [
"php-introspector",
"atom-phpcs",
"atom-beautify",
"doctrine",
"delorean",
"autocomplete-php"
]
},
"atom-autocomplete-php": {
"binComposer": "/home/roderick/Developer/composer.phar",
"binPhp": "/usr/bin/php"
}
}
# User
atom-autocomplete-php, v0.5.0
local-history, v3.2.3
php-twig, v4.0.0
symfony-snippets, v0.3.0
# Dev
No dev packages
[Enter steps to reproduce below:]
Atom Version: 1.0.2
System: Ubuntu 15.04
Thrown From: atom-autocomplete-php package, v0.5.0
Uncaught TypeError: Cannot read property 'autoload' of undefined
At /home/f/.atom/packages/atom-autocomplete-php/lib/services/namespace.coffee:17
TypeError: Cannot read property 'autoload' of undefined
at Object.module.exports.createNamespace (/home/f/.atom/packages/atom-autocomplete-php/lib/services/namespace.coffee:17:5)
at atom-workspace.atom.commands.add.atom-autocomplete-php:namespace (/home/f/.atom/packages/atom-autocomplete-php/lib/config.coffee:49:19)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:241:29)
at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:177:20)
-8:27.1.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
-7:48.2.0 timecop:view (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
-7:38 debugger:toggle (div.settings-view.pane-item)
2x -7:28.7.0 atom-php-navigation:toggle (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
-7:09.1.0 linter:set-bubble-transparent (atom-text-editor.editor.is-focused)
-6:47.8.0 bracket-matcher:select-inside-brackets (atom-text-editor.editor.is-focused)
-6:41.5.0 atom-php-navigation:toggle (atom-text-editor.editor.is-focused)
-6:37.7.0 linter:set-bubble-transparent (atom-text-editor.editor.is-focused)
-2:28.7.0 core:backspace (atom-text-editor.editor.mini.is-focused)
2x -2:21.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:24.5.0 core:select-all (atom-text-editor.editor.mini.is-focused)
-0:24.3.0 core:paste (atom-text-editor.editor.mini.is-focused)
-0:22.6.0 core:select-all (atom-text-editor.editor.mini.is-focused)
-0:22.5.0 core:paste (atom-text-editor.editor.mini.is-focused)
-0:22.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:01.4.0 atom-autocomplete-php:namespace (atom-text-editor.editor.is-focused)
{
"core": {
"disabledPackages": [
"lesscompile",
"lesscompile",
"linter-php",
"linter-xmllint",
"linter-xmllint",
"linter-phpcs"
]
},
"atom-autocomplete-php": {}
}
# User
atom-autocomplete-php, v0.5.0
atom-debugger, v0.1.4
atom-minify, v0.2.0
atom-php-navigation, v0.5.0
autoclose-html, v0.18.0
autocomplete-paths, v1.0.2
autocomplete-php, v0.3.6
autocomplete-phpunit, v1.0.2
autocomplete-sass, v0.1.0
color-picker, v2.0.11
compile-watch, v0.1.4
debugger, v0.0.1
documentation-renderer, v0.2.1
file-icons, v1.5.8
filesize, v0.2.0
flex-tool-bar, v0.4.4
git-diff-details, v0.18.0
git-go, v1.0.1
git-log, v0.4.1
language-twig, v1.6.2
less-compiler, v0.6.2
linter, v1.2.4
minimap, v4.12.0
php-composer-completion, v0.3.0
php-debug, v0.1.2
php-twig, v4.0.0
pigments, v0.8.4
sass-compiler, v0.4.0
silent-sync, v1.2.1
tab-control, v0.6.7
tab-numbers, v0.2.0
text-manipulation, v0.6.0
tree-view-git-status, v0.1.2
w3c-validation, v0.2.0
webbox-color, v0.5.8
# Dev
No dev packages
Hello
This is more of an idea, but since docblocks are already parsed, it would be neat if the description (short and/or long summary) from the docblock could be shown when selecting an item in the autocompletion list. I believe atom-ternjs [1] also does this for JavaScript methods. Optionally the docblocks of the parameters could also be shown in the description (e.g. by making the parameter names bold and placing the description behind them in the popup).
For methods without a docblock, the docblock from the parent class or interface should probably be selected (but I think the same already applies for the current code).
Thanks in advance
When a methods has more than 2 parameters, the "tab" works only for the 2 first params, after it just indent the whole line.
EDIT : Only when for "pairs" snippets.
E.G :
new PDOException($message,$code,$previous); // Success
new PDOException($message,$code,$previous); // Fail
new PDOException($message,$code,$previous); // Success
new PDOException($message,$code,$previous); // Fail
Atom Version: 1.0.4
System: Mac OS X 10.10.4
Thrown From: atom-autocomplete-php package, v0.6.4
I have vim-mode and php getter setter in atom.
When adding a new private property to an Entity, trying to generate getters and setters for it through the UI, here's the error :
Uncaught TypeError: Cannot read property 'trim' of undefined
At /Users/xxx/.atom/packages/atom-autocomplete-php/lib/goto/function-goto.coffee:38
TypeError: Cannot read property 'trim' of undefined
at GotoFunction.module.exports.GotoFunction.gotoFromWord (/Users/xxx/.atom/packages/atom-autocomplete-php/lib/goto/function-goto.coffee:38:32)
at GotoFunction.<anonymous> (/Users/xxx/.atom/packages/atom-autocomplete-php/lib/goto/abstract-goto.coffee:120:30)
at /Users/xxx/.atom/packages/atom-autocomplete-php/lib/goto/abstract-goto.coffee:210:18
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at TextEditor.module.exports.TextEditor.cursorMoved (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:1595:27)
at /Applications/Atom.app/Contents/Resources/app.asar/src/cursor.js:56:31
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at Marker.module.exports.Marker.notifyObservers (/Applications/Atom.app/Contents/Resources/app.asar/src/marker.js:270:27)
at /Applications/Atom.app/Contents/Resources/app.asar/src/marker.js:65:26
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at Marker.module.exports.Marker.emitChangeEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker.js:401:20)
at MarkerStore.module.exports.MarkerStore.createSnapshot (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/marker-store.js:232:20)
at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:766:83)
at TextBuffer.module.exports.TextBuffer.setTextInRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:522:21)
at TextBuffer.module.exports.TextBuffer.setText (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:459:19)
at TextEditor.module.exports.TextEditor.setText (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:715:26)
at BaseCommand.module.exports.BaseCommand.writeAtEnd (/Users/xxx/.atom/packages/php-getters-setters/lib/base-command.coffee:18:16)
at Object.module.exports.allGettersSetter (/Users/xxx/.atom/packages/php-getters-setters/lib/php-getters-setters.coffee:154:12)
at UIView.module.exports.UIView.generate (/Users/xxx/.atom/packages/php-getters-setters/lib/ui.view.coffee:77:19)
at HTMLButtonElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/lib/space-pen.js:220:36)
at HTMLButtonElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at HTMLButtonElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
-1:43.2.0 vim-mode:activate-normal-mode (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
-1:41 vim-mode:undo (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
-1:39.7.0 vim-mode:insert-after (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
-1:39.4.0 docblockr:parse-enter (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
-1:38.9.0 vim-mode:activate-normal-mode (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
-1:38.5.0 core:save (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
-1:24.9.0 settings-view:open (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
-1:21.5.0 core:paste (atom-text-editor.editor.mini.is-focused)
-1:21 core:confirm (atom-text-editor.editor.mini.is-focused)
-1:17.4.0 core:paste (atom-text-editor.editor.mini.is-focused)
-1:16.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:46 editor:select-to-first-character-of-line (atom-text-editor.editor.mini.is-focused)
-0:24.8.0 core:close (atom-text-editor.editor.mini.is-focused)
-0:21 command-palette:toggle (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
-0:17.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:17.4.0 php-getters-setters:showUI (atom-text-editor.editor.vim-mode.normal-mode)
{
"core": {
"projectHome": "/Users/xxx/Sites",
"disabledPackages": [
"minimap"
],
"excludeVcsIgnoredPaths": false
},
"atom-autocomplete-php": {}
}
# User
atom-autocomplete-php, v0.6.4
docblockr, v0.7.3
file-icons, v1.6.2
linter, v1.3.1
linter-php, v1.0.3
php-getters-setters, v0.5.5
php-twig, v4.0.0
pigments, v0.9.3
vim-mode, v0.57.0
# Dev
No dev packages
Handle PHP fatal error when a vendor or an other class depends on an existing or unfound class
Hello
Sometimes alt-clicking an identifier will ask you which one you want to open, even when the package actually already knows which one to select (i.e. which one is the correct one):
/**
* @return Foo\BarInterface
* ________________
*/
Clicking on Foo\BarInterface
will open a dialog asking me to select any of
Foo\BarInterface
Foo\BarTestInterface
Foo\BarSomeInterface
The only correct one here is, of course, Foo\BarInterface
, i.e. the alt-click dialog should not pop up at all. Perhaps this has something to do with fuzzy matching going haywire (as the last two also include the text of the first)?
Thanks in advance
Hello
In some cases (I recall this working before), alt-clicking the return type in the docblock does not work. It does work in the method itself, so the name is correctly resolved, for example:
/**
* Second function.
*
* @param string $param1
* @param array|null $param2
*
* @return FooClass
*/
public function func2($param1, array $param2 = null)
{
$obj = new FooClass();
return $obj;
}
Alt-clicking FooClass
in the docblock here does nothing, whilst alt-clicking it after the new
statement works correctly.
I've taken the liberty to try and do some debugging of this for you to try and help out and found out that the click event in abstract-goto.coffee:104 is not attached or invoked. It appears that the docblock @return
only has .region
as HTML class, which is not part of clickEventSelectors
, but is part of hoverEventSelectors
, which is why hovering works, but clicking doesn't. However, simply adding it does not work. I'm not familiar with Atom's internals, but when inspecting the FooClass
in the docblock in the inspector, the div has no text set:
<div class="highlight comment-clickable comment"><div class="region" style="box-sizing: border-box; top: 176px; left: 105px; width: 56px; height: 16px;"></div></div>
... causing the click handler to not know what to look for, as the .text()
method returns an empty string.
Sometimes it also happens that I can't get autocompletion for a method that has a valid docblock and return statement, but seeing as here the docblock isn't correctly parsed, this may be related. I'll test that separately again as soon as you were able to take a look at this one :).
Thanks in advance
No completion with
$x->y($this->
But there is with a whitespace
$x->y( $this->
Hi @Peekmo ! I have a few questions regarding this plugin :)
it will only works for composer projects
-> do you plan adding adding support for files outside of a composer project? I mean, sometimes I tend to create a small set of files somewhere in /tmp
just to test something. It would be nice if this plugin could work with that usage case too.the autocompletion for 'new Class()' is currently disabled because I'm working on it
-> do you mean that in the future you'll support autocomplete on objects from external classes, not part of PHP's set of classes?$mathObj->
, I'd expect the autocomplete to show the following: f className() string
f sum($a, $b) int
f square($a, $b) int
p max_int int
p min_int int
f
stands for "function" (could be m
for "method" too) and p
stands for "property". On the right side is shown the returned data type.
Keep the good work! ;)
Hello
It appears that, when attempting to alt-click on classes after the extends/implements keyword, backward slashes are treated as word separators. This does not happen for use statements. For example:
namespace Foo\SomeNamespace;
use Foo\Bar;
// Holding the alt key underlines only MyBarInterface instead of Bar\MyBarInterface.
interface SomeInterface extends Bar\MyBarInterface
______________
{
// ...
}
The result of this is that when alt-clicking MyBarInterface, you get the dialog asking you what class to open (if there are multiple MyBarInterfaces present in your code).
The only correct class is, of course, Foo\Bar\MyBarInterface (because of the use statement). If MyBarInterface is directly imported, there is no issue.
It should be noted that this does work correctly in comments and use statements and this feature is already working very well, regardless of this minor issue, thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.