roxma / ncm-phpactor Goto Github PK
View Code? Open in Web Editor NEWUSE https://github.com/phpactor/ncm2-phpactor FOR NCM2!
USE https://github.com/phpactor/ncm2-phpactor FOR NCM2!
Now that's NCM is deprecated, is there a way to use phpactor as completion source in NCM2? Are NCM source plugins compatible with NCM2?
I can't be able to make this plugin working. When I'm typing, there's no completion. I have to press <C-x><C-o>
to make the popup show.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class AppController extends Controller {
/**
* index
*
* @return void
*/
public function index(Request $request) {
$request-> // doesn't autocomplete by default, must use omnifunc
return 'test';
}
}
The complete
command now also returns a list of issues if any were encountered while determining the completion (e.g. the class was not found, variable not defined etc).
Is there a good way to feed these errors back to the user? (in omni-complete mode it seems I had to use echoe
which isn't great UX but it works)..
PS D:\WinTools\Office\Neovim\share\nvim\plugged\phpactor> composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 26 installs, 0 updates, 0 removals
Note: checking out '8d1573c6859266e932c3586a9d943da54782e0e0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b
HEAD is now at 8d1573c... Fix: Remove unnecessary parentheses (#510)
error: unable to create file docs/assertions-asserters.rst:3:: Invalid argument
fatal: Could not reset index file to revision '8d1573c6859266e932c3586a9d943da54782e0e0'.
Now trying to download from dist
[RuntimeException]
The archive may contain identical file names with different capitalization (which fails on case insensitive filesys
tems): ZipArchive::extractTo(D:\WinTools\Office\Neovim\share\nvim\plugged\phpactor/vendor/composer/bf73a860/phpbenc
h-phpbench-8d1573c\docs/assertions-asserters.rst:3:): failed to open stream: No such file or directory
[ErrorException]
ZipArchive::extractTo(D:\WinTools\Office\Neovim\share\nvim\plugged\phpactor/vendor/composer/bf73a860/phpbench-phpbe
nch-8d1573c\docs/assertions-asserters.rst:3:): failed to open stream: No such file or directory
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] []...
Something like 'file_get_contents' ใ'file_put_contents'
Error from logs:
2017-11-22 11:25:55,754 [DEBUG @ phpactor.py:cm_refresh:60] 28758 - args: ['php', '/Users/phatsk/.config/nvim/plugged/phpactor/bin/phpactor', 'complete', '--format=json', 'stdin', '17891'], result: []
2017-11-22 11:25:55,754 [ERROR @ cm.py:on_notification:267] 28758 - Failed processing method: cm_refresh, args: [{'scopes': ['php'], 'cm_refresh_patterns': ['-\\>', '::'], 'early_cache': 1, 'name': 'phpactor', 'priority': 9, 'enable': True, 'auto_popup': 1, 'sort': 1, 'scoping': True, 'cm_refresh_length': 3, 'channel': {'id': 9, 'module': 'cm_sources.phpactor', 'events': [], 'type': 'python3'}, 'abbreviation': 'php', 'word_pattern': '[$\\w]+'}, {'scope_match': 'php', 'lnum': 636, 'bufnr': 1, 'changedtick': 105, 'typed': 'outputHelp', 'base': 'outputHelp', 'filetype': 'php', 'curpos': [0, 636, 11, 0, 11], 'col': 11, 'early_cache': False, 'filepath': '/Users/phatsk/src/tools/ao-migrations/import-new-site.php', 'scope': 'php', 'force': 0, 'startcol': 1, 'match_end': 0}]
Traceback (most recent call last):
File "/Users/phatsk/.config/nvim/plugged/nvim-completion-manager/pythonx/cm.py", line 264, in on_notification
func(*args)
File "/Users/phatsk/.config/nvim/plugged/ncm-phpactor/pythonx/cm_sources/phpactor.py", line 62, in cm_refresh
result = json.loads(result)
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The command I ran:
echo import-new-site.php|'php' '/Users/phatsk/.config/nvim/plugged/phpactor/bin/phpactor' 'complete' '--format=json' 'stdin' '17891'
The console output:
[InvalidArgumentException]
Could not locate autoloaderPath file "/Users/phatsk/src/tools/ao-migra
tions/vendor/autoload.php"
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.