marlonfan / coc-phpls Goto Github PK
View Code? Open in Web Editor NEW🐭 php language server for coc.nvim
License: MIT License
🐭 php language server for coc.nvim
License: MIT License
Hi,
when renaming a variable using
nmap <leader>rn <Plug>(coc-rename)
after renaming the various buffers affected by the changes are not saved.
I can't get evidence of the modification using git (status)
Describe the bug
I am not exactly sure whether this is an issue with coc-phpls
or intelephense
.
I have added the following configuration for enabling the function text object. But when I try to select inside a function with vif
, the opening brace is included with the selection.
If the opening brace is on the same line as the function header, then it is working correctly.
" Create mappings for function text object, requires document symbols feature of languageserver.
xmap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap if <Plug>(coc-funcobj-i)
omap af <Plug>(coc-funcobj-a)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
Hi.
Not sure if I'm right here but I feel like I need to start somewhere: I installed this extension to enable coc for PHP files. Due to the nature of the project, there are a few unused private static properties in the classes. Is there a way, to configure what to warn or show errors about?
Thanks in advance, appreciate the effort you take.
这几天插件工作不正常,过来看文档之后发现有会员特性了,作者这是要开始收费了吗?
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Show implementation without using go reference
Screenshots
https://asciinema.org/a/V8yhF1hBnRNr3R4jVREozDzSW
Desktop (please complete the following information):
Describe the bug
I'm not sure if this is a bug, configurable option, intended behavior, or a planned feature, but it seems like when a new php file is created you have to close and reopen vim in order to get it indexed. Is there a way to autoindex new files, or at least force a reindex with a command?
Jump to definition only works after a 30 seconds timeout when jumping to a definition which is defined in the same buffer.
To Reproduce
class Foo
Foo::caller()
and Foo::callee()
callee
from Foo::caller
... i.e. $this->callee()
callee
inside Foo::caller
method, use coc's goto definition
to jump to callee
Expected behavior
Goto definition shouldn't end up in a 30 seconds timeout.
Desktop
coc-settings.json
{
"list.normalMappings": {
"<C-c>": "do:exit"
},
"list.insertMappings": {
"<C-c>": "do:exit"
},
"intelephense.telemetry.enabled": false
}
~/.config/coc/extensions/package.json
contents:
{
"dependencies": {
"coc-phpls": ">=2.1.8"
}
}
Additional information
Using CocActionAsync
solves the problem.
When goto definition is triggered for a none-async action, whole vim "freezes" for the duration of 30 seconds before the timeout happens.
:CocOpenLog
right after the problem occurs gives:
2020-04-14T14:51:19.757 INFO (pid:16453) [language-client-index] - phpls started with 16468
2020-04-14T14:51:19.769 INFO (pid:16453) [plugin] - coc 0.0.78-fc983ce6dd initialized with node: v12.16.1
Temporary solution:
"nmap <silent> <leader>gd <Plug>(coc-definition)
nmap <silent> <leader>gd :call CocActionAsync('jumpDefinition')<CR>
" nmap <silent> <leader>gr <Plug>(coc-references)
nmap <silent> <leader>gr :call CocActionAsync('jumpReferences')<CR>
I see many _
around parameter or namespace names and duplicate \
in my hover or documentation popups:
app\tasks\Task::__construct
@param array $config
__app\\tasks\\Task::\_\_construct__
_@param_ array $config
[Trace - 11:04:05 AM] Received response 'textDocument/hover - (2)' in 9ms.
Result: {
"contents": {
"kind": "markdown",
"value": "__app\\\\tasks\\\\Task::\\_\\_construct__\n\n```php\n<?php\npublic function __construct($config = []) { }\n```\n\n_@param_ `array $config` \nobject configuration. The special key 'options' can\ncontain immutable options that will override default options from\n[[options()]]. Options can be fetched from [[getOption()].\n\n_@return_ `void`\n\n_@throws_ `yii\\base\\InvalidConfigException` — if an unknown option is passed"
},
"range": {
"start": {
"line": 406,
"character": 20
},
"end": {
"line": 406,
"character": 31
}
}
}
vim version: NVIM v0.5.0-506-gda6f38ab3
node version: v10.20.1
coc.nvim version: 0.0.78-0033e4e624
term: screen-256color
platform: linux
I don't know if this is a problem of intelephense, coc.nvim or this extension. Any help welcome.
Premium intelephense features are resulting in provider not found for current document
when using intelephense version 1.3.2.
The key is my only config setting
{
"intelephense.licenceKey": "[key is here]"
}
The features are working in vscode, so I know it's no the licence key itself.
Here is my :CocInfo
## versions
vim version: NVIM v0.4.3
node version: v10.15.3
coc.nvim version: 0.0.74-d83536aa4e
term: xterm
platform: linux
## Messages[coc.nvim] Rename provider not found for current document
[coc.nvim] Type definition provider not found for current document
[coc.nvim] Implementation provider not found for current document
## Output channel: phpls
[Info - 1:35:58 PM] Initialising intelephense 1.3.2
[Info - 1:35:58 PM] Reading state from /home/derek/.config/coc/extensions/coc-phpls-data/1938e530.
[Info - 1:35:59 PM] Initialised in 1375 ms
[Info - 1:35:59 PM] Intelephense 1.2.3
I am using version 2.1.2 of coc-phpls according to ~/.config/coc/extensions/node_modules/coc-phpls/package.json
.
i'm using coc.nvim with coc-phpls and when i'm trying to use the find implementation feature on a interface symbol using
nmap <silent> gi <Plug>(coc-implementation)
I receive this message
[coc.nvim] Error on 'jumpImplementation': Cannot read property 'start' of undefined
Add option for configure intelephense, like setting maximum file size for indexing, default stubs, file exclude...
https://github.com/bmewburn/intelephense-docs
{
"intelephense.files.maxSize": {
"type": "number",
"default": 1000000,
"description": "Maximum file size in bytes.",
"scope": "window"
},
"intelephense.files.associations": {
"type": "array",
"default": [
"*.php",
"*.phtml"
],
"description": "Configure glob patterns to make files available for language server features.",
"scope": "window"
},
"intelephense.files.exclude": {
"type": "array",
"default": [],
"description": "Configure glob patterns to exclude certain files and folders from all language server features.",
"scope": "window"
},
"intelephense.stubs": {
"type": "array",
"default": [
"apache",
"bcmath",
"bz2",
"calendar",
"com_dotnet",
"Core",
"csprng",
"ctype",
"curl",
"date",
"dba",
"dom",
"enchant",
"exif",
"fileinfo",
"filter",
"fpm",
"ftp",
"gd",
"hash",
"iconv",
"imap",
"interbase",
"intl",
"json",
"ldap",
"libxml",
"mbstring",
"mcrypt",
"mssql",
"mysql",
"mysqli",
"oci8",
"odcb",
"openssl",
"password",
"pcntl",
"pcre",
"PDO",
"pdo_ibm",
"pdo_mysql",
"pdo_pgsql",
"pdo_sqlite",
"pgsql",
"Phar",
"posix",
"pspell",
"readline",
"recode",
"Reflection",
"regex",
"session",
"shmop",
"SimpleXML",
"snmp",
"soap",
"sockets",
"sodium",
"SPL",
"sqlite3",
"standard",
"superglobals",
"sybase",
"sysvmsg",
"sysvsem",
"sysvshm",
"tidy",
"tokenizer",
"wddx",
"xml",
"xmlreader",
"xmlrpc",
"xmlwriter",
"Zend OPcache",
"zip",
"zlib"
],
"description": "Configure stub files for built symbols and common extensions. The default includes PHP core and all bundled extensions.",
"scope": "window"
},
"intelephense.completion.insertUseDeclaration": {
"type": "boolean",
"default": true,
"description": "Use declarations will be automatically inserted for namespaced classes, traits interfaces, functions, and constants.",
"scope": "window"
},
"intelephense.completion.fullyQualifyGlobalConstantsAndFunctions": {
"type": "boolean",
"default": false,
"description": "Global namespace constants and functions will be fully qualified (prefixed with a backslash).",
"scope": "window"
},
"intelephense.format.enable": {
"type": "boolean",
"default": true,
"description": "Enables formatting",
"scope": "window"
},
"intelephense.trace.server": {
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Traces the communication between client and server.",
"scope": "window"
}
}
I want to have system wide neovim plugins.
The global config belongs to root.
In /etc/xdg/nvim/init.vim
I have
call plug#begin('/etc/xdg/nvim/plugged') " Use a shared folder
Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end() " required
" Config directory for CoC plugin
let g:coc_config_home = '/etc/xdg/nvim/coc'
let g:coc_data_home = '/etc/xdg/nvim/coc'
This makes the extension end up in /etc/xdg/nvim/coc/extensions/node_modules/coc-phpls/
.
Only root can now work with coc, because it creates cache files in /etc/xdg/nvim/coc/extensions/coc-phpls-data/
. Normal users don't have (and should not have) write permissions there.
# ls -l /etc/xdg/nvim/coc/extensions/coc-phpls-data/597539a9/
insgesamt 1828
-rw-r--r-- 1 root root 82 Mai 14 15:10 intelephense_data_1
-rw-r--r-- 1 root root 13482 Mai 14 15:10 intelephense_data_2
-rw-r--r-- 1 root root 1128647 Mai 14 15:10 intelephense_data_3
-rw-r--r-- 1 root root 710458 Mai 14 15:10 intelephense_data_4
-rw-r--r-- 1 root root 1635 Mai 14 15:10 intelephense_data_5
-rw-r--r-- 1 root root 2400 Mai 14 15:10 intelephense_data_6
-rw-r--r-- 1 root root 0 Mai 14 15:10 intelephense_data_7
Is there a configuration option to make this path configurable?
If not, can such an option be added? In best case this should default somewhere in the users's home directory.
A quick naive search on github using a query “intelephense.licenceKey” reveals the problem very soon - people committing their keys into the version control.
Would be nice to have intelephense.licenceKeyFile
or intelephense.licenceKeyEnvVar
to stop this from happening.
While it’s not implemented, how do I safely store the key if I still want to commit my coc-settings.json?
A feature of intelephense is "Configurable auto phpdoc creation that infers return types and identifies thrown exceptions." Is there a way to call this via coc.nvim?
Describe the bug
On initialisation Intelephense fails after 2 minutes when trying to read the workspace state, even though at first it's empty. After timing out it properly re-indexes the project and saves its state. On next open it hangs again and this time doesn't write (probably because there are no changes). I just need a confirmation this isn't vim
/coc-phpls
related before I open an issue upstream.
To Reproduce
Steps to reproduce the behavior:
vim
coc.nvim
coc-phpls
Expected behavior
I expect Intelephense to load quickly, not hang while reading state and then timeout.
Screenshots
Related parts of :CocInfo
output:
## versions
vim version: NVIM v0.3.8
node version: v12.13.0
coc.nvim version: 0.0.74-bc017b02e6
term: screen-256color
platform: linux
## Output channel: phpls
[Info - 15:09:55] Initialising intelephense 1.3.5
[Info - 15:09:55] Reading state from /home/user/.config/coc/extensions/coc-phpls-data/674614e2.
[Warn - 15:12:06] undefined
[Info - 15:12:06] Initialised in 130624 ms
[Info - 15:12:06] Intelephense 1.2.3
[Info - 15:12:06] Indexing started.
[Info - 15:12:07] Indexing ended. 98 files indexed in 1s.
[Info - 15:12:07] Indexing started.
[Info - 15:12:22] Indexing ended. 10169 files indexed in 14s.
[Info - 15:12:22] Writing state to /home/user/.config/coc/extensions/coc-phpls-data/674614e2.
[Info - 15:12:23] Wrote state in 1.7s.
coc-settings.json
:
{
"intelephense.licenceKey": "***",
"intelephense.files.exclude": ["var"]
}
Desktop (please complete the following information):
coc-phpls
: 2.1.4, Intelephense
: 1.3.5Describe the bug
Duplication in all information that showed from coc-phpls
nvim config:
"" PHP
call coc#add_extension('coc-phpls')
let g:coc_filetypes += ['php']
coc-settings.json:
{
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": ["c", "cpp", "objc", "objcpp"],
"rootPatterns": [
".ccls",
"compile_commands.json",
".vim/",
".git/",
".hg/"
],
"initializationOptions": {
"cacheDirectory": "/tmp/ccls"
}
},
"intelephense": {
"command": "intelephense",
"args": ["--stdio"],
"filetypes": ["php"],
"initializationOptions": {
"storagePath": "/tmp/intelephense"
}
}
}
}
To Reproduce
Steps to reproduce the behavior:
npm i intelephense -g
)Screenshots
Desktop (please complete the following information):
Additional context
coc-go
, coc-rls
, and coc-python
works well.
When phpls starts, it creates a folder in $HOME directory named "intelephense".
Steps to reproduce the behavior:
Expected behavior
No new folder in $HOME directory, or an option to configure directory creation.
Desktop:
Comments
Thank you for your work I love this extension and want to improve it but I don't know how to do it.
Hey!
I have a new problem, when I'm in vim and install php package with composer i must to restart vim, or restart language server with CocRestart for index package, but the problem is that every time everything is over indexing... It would be nice if this were resolved and some one added caching system. Thanks!
Again sorry for my very bad English... :D
[Info - 2:19:30 PM] watchman watching project: /var/www/html
[Info - 2:19:30 PM] subscribing "{}" in /var/www/html
[Info - 2:19:30 PM] subscribing "**/*.{php,phtml}" in /var/www/html
Describe the bug
With the latest version of this extension, PHP workspaces are no longer being indexed.
To Reproduce
Steps to reproduce the behavior:
intelephense.index.workspace
through :CocCommand
Error: Unhandled method indexWorkspace
is shownExpected behavior
Messages regarding workspace being indexed are shown.
Additional context
Running :CocOpenLog
reveals (home directory path snipped):
2019-08-14T16:45:38.988 INFO (pid:33693) [services] - registed service "phpls"
2019-08-14T16:45:38.990 INFO (pid:33693) [services] - PHP Language Server state change: stopped => starting
2019-08-14T16:45:39.001 INFO (pid:33693) [language-client-index] - phpls started with 33696
2019-08-14T16:45:39.009 INFO (pid:33693) [plugin] - coc 0.0.73-e9ef666cb5 initialized with node: v12.6.0
2019-08-14T16:45:39.769 INFO (pid:33693) [services] - PHP Language Server state change: starting => running
2019-08-14T16:45:39.775 INFO (pid:33693) [services] - service phpls started
2019-08-14T16:45:45.315 ERROR (pid:33693) [commands] - Error: Unhandled method indexWorkspace
at handleResponse (../nvim/plugged/coc.nvim/build/index.js:38047:48)
at processMessageQueue (../nvim/plugged/coc.nvim/build/index.js:37874:17)
at Immediate.<anonymous> (../nvim/plugged/coc.nvim/build/index.js:37858:13)
at processImmediate (internal/timers.js:439:21)
Describe the bug
It seems that the plugin is not able to find the definitions. I get all kind of undefined ... errors.
However the Intelephense plugin for VS Code works just fine. See screenshots.
To Reproduce
Steps to reproduce the behavior:
abort
or app
Expected behavior
I'd expect the functions and classes to be found ^^
Desktop
vim version: NVIM v0.4.3
node version: v13.5.0
coc.nvim version: 0.0.74-cd348f4905
term: iTerm.app
platform: darwin
[coc.nvim] Your Intelephense licence key has been activated.
[phpls] Undefined function 'main\array_slice'. [E]
[phpls] Undefined function 'main\array_slice'. [E]
[phpls] Undefined function 'main\array_slice'. [E]
[phpls] Undefined function 'main\array_slice'. [E]
[phpls] Undefined function 'main\array_slice'. [E]
[Info - 6:43:12 PM] Initialising intelephense 1.3.6
[Info - 6:43:12 PM] Reading state from /Users/mrsong/.config/coc/extensions/coc-phpls-data/3c2c6bd6.
[Info - 6:43:13 PM] Initialised in 972 ms
[Info - 6:43:13 PM] Intelephense 1.2.3
<--- Last few GCs --->
[13253:0x104900000] 84371 ms: Mark-sweep 1950.8 (2067.2) -> 1937.2 (2063.9) MB, 618.9 / 0.0 ms (average mu = 0.243, current mu = 0.198) allocation failure scavenge might not succeed
[13253:0x104900000] 84429 ms: Scavenge 1951.1 (2063.9) -> 1938.8 (2065.4) MB, 5.0 / 0.0 ms (average mu = 0.243, current mu = 0.198) allocation failure
[13253:0x104900000] 84481 ms: Scavenge 1952.8 (2065.4) -> 1940.5 (2066.9) MB, 4.1 / 0.0 ms (average mu = 0.243, current mu = 0.198) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x10074e5f9]
Security context: 0x1ee16f440921
1: split [0x1ee16f44d1a1](this=0x1ee172550159 <String[432]: Library/Application Support/Steam/Steam.AppBundle/Steam/Contents/Frameworks/Steam Helper.app/Contents/Frameworks/HTML5App.app/Contents/Frameworks/Steam Helper EH.app/Contents/Frameworks/Steam Helper.app/Contents/Frameworks/Steam Helper EH.app/Contents/Frameworks/HTML5App.app/Contents/Frameworks/Ste...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x100b9f982 node::Abort() (.cold.1) [/usr/local/Cellar/node/13.5.0/bin/node]
2: 0x100084338 node::FatalError(char const*, char const*) [/usr/local/Cellar/node/13.5.0/bin/node]
3: 0x100084460 node::OnFatalError(char const*, char const*) [/usr/local/Cellar/node/13.5.0/bin/node]
4: 0x10017dfc1 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node/13.5.0/bin/node]
5: 0x10017df6b v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node/13.5.0/bin/node]
6: 0x100297f23 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/Cellar/node/13.5.0/bin/node]
7: 0x1002992a8 v8::internal::Heap::MarkCompactPrologue() [/usr/local/Cellar/node/13.5.0/bin/node]
8: 0x100296e76 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/Cellar/node/13.5.0/bin/node]
9: 0x100295955 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/Cellar/node/13.5.0/bin/node]
10: 0x10029d2f4 v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/13.5.0/bin/node]
11: 0x10029d34a v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/13.5.0/bin/node]
12: 0x10027a04a v8::internal::Factory::New(v8::internal::Handlev8::internal::Map, v8::internal::AllocationType) [/usr/local/Cellar/node/13.5.0/bin/node]
13: 0x10027d9f1 v8::internal::Factory::NewProperSubString(v8::internal::Handlev8::internal::String, int, int) [/usr/local/Cellar/node/13.5.0/bin/node]
14: 0x100501e73 v8::internal::Runtime_StringSplit(int, unsigned long*, v8::internal::Isolate*) [/usr/local/Cellar/node/13.5.0/bin/node]
15: 0x10074e5f9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/usr/local/Cellar/node/13.5.0/bin/node]
16: 0x10073c402 Builtins_StringPrototypeSplit [/usr/local/Cellar/node/13.5.0/bin/node]
[Info - 6:44:37 PM] Connection to server got closed. Server will restart.
[Info - 6:44:37 PM] Initialising intelephense 1.3.6
[Info - 6:44:37 PM] Reading state from /Users/mrsong/.config/coc/extensions/coc-phpls-data/3c2c6bd6.
[Info - 6:44:37 PM] Initialised in 9 ms
hello 🤚
first of all i really ❤️ this project, its such a lightweight PHPLS
but i am struggeling getting it to work in my day-to-day php-fight.
example:
$var = "test";
if i type $va
it suggests $var
- selecting and confirming it with
changes $va
to $$var
- and additionally adds a newline sometimes
any ideas how i can get around this?
When I expand a snippet from coc-phpls, I expect it to present argument placeholders like in this demo from the coc.nvim readme:
This seems to work out of the box with coc-tsserver, but with coc-phpls it just completes the function name and gives me an empty ()
:
Is this a known limitation of this project, or of intelephense? Or do I have something set up wrong? Thanks!
Can you please explain me what is the difference (or benefits) on using this extension instead of using intelephense globally installed via npm.
In the coc.nvim wiki page( language servers sections), I see that for PHP the options are this extension or to use the bmewburn/intelephense-docs (or even php-language-server) but I couldn't understand which one is better and why since both are using intelephense.
Thanks
问下,coc-phpls 是否支持显示 $_GET, $_POST, $_FILES 这类全局变量的提示??
Describe the bug
[coc.nvim]Error on load extension coc-phpls from /home/zdm/.config/coc/extensions/node_modules/coc-phpls/l
ib/index.js: Error: Cannot find module 'tslib'
Require stack:
Desktop (please complete the following information):
uname -a
Linux ar 5.6.14-arch1-1 #1 SMP PREEMPT Wed, 20 May 2020 20:43:19 +0000 x86_64 GNU/Linux
nvim --version
NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.3/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Additional context
I install tslib with pacman -S tslib but still have this problem
Hey!
I have a problem, when accept variable completion i get e.g.
$number = 5;
echo // when accept $number completion i get, $$number, but it should be $number
Sorry for my bad English. Thanks!
Describe the bug
Show error Undefined type 'Route'
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Auto show error
Desktop (please complete the following information):
Additional context
Use coc-phpls in neovim
Hi,
After the recent update of intelephense there are a lot of issues with undefined symbols, types, failures to find the definition and so forth.
There are extremely few documents on inelephense and coc-phpls. It would really help if you would provide some kind of documentation on how to set up completion for a particular project.
Some points of the docs that would be very appreciated:
Thank you.
Thank you for this extension! I bought intelephense premium to support the author.
Does it make sense to add the licence key like intelephense.licenceKey
to the configuration?
Sorry, I have no minimal test case, since the issue occurs only in a large closed-source project.
In about half of the time, coc-rename
command silently terminates without any message and, more importantly, no action. For example, I have an interface with a method and a class implementing the interface. Now I put cursor over the method name in the interface, and press <leader>rn
which is mapped as follows:
nmap <leader>rn <Plug>(coc-rename)
After that, a prompt suggesting to enter new name appears. I enter a new name, then press Enter
. Then nothing -- no modified buffers, no changes at all. But sometimes, mostly with private and protected members, the same procedure works fine.
Now the question is how do I go about this issue? Should I look at a log file or something?
By the way, similar thing happens when I try to find references of the problematic method using coc-references
command. But this command seems to be blocking, since Nvim hangs for about 5 seconds before returning control to me. Then, again, nothing happens -- no references, no messages, nothing. But coc-implementation
still finds implementations of the method without any issues.
Thanks.
Describe the bug
Can you please add an option to load the licenseKey from a file, so that coc-settings.json
can be version controlled? Currently I am unable to upload my coc-settings.json
to my dotfiles repository on GitHub, since it contains my license key.
After I upgrade coc.nvim to 0.0.64, when I start my vim show the follow message:
[coc.nvim] Error output from phpls: Connection to server got closed. Server will not be restarted.
Great extension, but I'm getting a ApplicationInsights:CorrelationIdManager [ { Error: connect ECONNREFUSED 0.0.0.0:443
every time I edit a php file.
Also initially high CPU.
Steps to reproduce the behavior:
Desktop (please complete the following information):
Kubuntu 18.04
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 06 2019 17:31:41)
Included patches: 1-1453
What is the use of Application Insights. Telemetry?
Can it be disabled or removed?
Describe the bug
The intelephense shows all core functions that ships with php as deprecated
Example: [intelephense 1007] [H] 'strtolower' is deprecated.
Desktop (please complete the following information):
vim version: NVIM v0.4.3
node version: v13.3.0
coc.nvim version: 0.0.74-d83536aa4e
term: iTerm.app
platform: darwin
When the LS has something to say, a gutter appears on the left of the edit area, and when the LS is happy this gutter goes away.
I find that, especially when writing code quickly this makes it hard to concentrate because the bit you're looking at keeps jumping left and right.
Is it possible to set the gutter to always show to avoid this?
Describe the Problem
coc-refactor
opens an empty refactor buffer instead of one I can use to refactor code
To Reproduce
Steps to reproduce the behavior:
coc-refactor
(in my case <leader>rf
)Expected behavior
A buffer assisting refactoring should show up (not sure how to call it ...)
Desktop (please complete the following information):
Additional context
Edit: I did not assign this issue to you intentionally, so, sorry about that.
I'm having a little difficulty figuring out whether or not there's a way to add stubs for Wordpress development?
I noticed this repository mentioned in an issue in the intelephense repo: https://github.com/php-stubs/wordpress-stubs but I'm having trouble figuring out whether or not it's possible to somehow include this in my COC configuration to prevent/stop intelephense errors on Wordpress built-in functions.
Hey,
I am trying to get this working in a small laravel project, but :CocInfo
gives me these errors:
## versions
vim version: NVIM v0.3.4
node version: v10.9.0
coc.nvim version: 0.0.64
term: tmux-256color
platform: darwin
## Error messages
## Output channel: watchman
[Info - 23:04:28] watchman watching project: /Users/t/Sites/test
[Info - 23:04:29] subscribing "**/*.php" in /Users/t/Sites/test
## Output channel: highlight
[Info - 23:04:28] Highlight server running in node v10.9.0
## Output channel: php
[Info - 23:04:29] Initialising
[Info - 23:04:30] Initialised in 357 ms
[Warn - 23:04:49] EISDIR: illegal operation on a directory, read
[Warn - 23:05:06] file:///Users/t/Sites/test/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Text.php exceeds max file size.
I ran :CocInstall coc-phpls
and set autocmd FileType php setl iskeyword+=$
.
Is there something I am doing wrong? Cheers
I have problem with -> trigger
e.g.
<?php
$pdo = new PDO('');
$pdo-> // no completions
$pdo-> // i must start typing something for get a completions for some class
// This problem not appear in vscode
// ccls for C++ have -> trigger and works fine
Sorry for my bad English. Thanks!
class Test {
publ // Then get a error message: [coc.nvim] phpls complete error: TypeError: items.forEach is not a function
}
Sorry for my bad English. Thanks!
I can rename A Php filename but when in vim i invoke this key [comma][c] then i type workspace.renameCurrentFile
I can change the Filename but The Current File Class Name is not change and all the Reference to this Class Name.
Is there a way i can rename and intelligently include all the reference to this Classname like in PHP storm???
Describe the bug
When I'm editing PHP files, sometimes the editor shows me the error for the correct piece of code. For example when I delete a couple of line of code as the screenshot below. coc/phpls then remove the error after that, but the underline lines remain. This issue happens randomly.
P.S: I don't know if this is the right place to report this bug, but I don't have this bug with tsserver. If it's coc.nvim bug, feel free to close this issue :).
Expected behavior
The underline should be removed with the wrong error.
After coc/phpls hide the error:
Desktop (please complete the following information):
Describe the bug
Context : I like to add my coc extensions inside of my init.vim file with my plugin manager vim-plug.
Plug 'neoclide/coc-html', {'do': 'yarn install --frozen-lockfile'}
errors on me
To Reproduce
Steps to reproduce the behavior:
Plug 'neoclide/coc-html', {'do': 'yarn install --frozen-lockfile'}
to init.vimYou can see the actual error by going into the plugged/coc-phpls directory and calling npm install or yarn.
Expected behavior
It should just work
Desktop (please complete the following information):
NOT A BUG
I'm using the plugin and loving it with CoC. I am working on Typescript on frontend and Laravel on backend. While autocompletion works perfectly fine on laravel project, I was just wondering if there is a way to auto inject the use
statements which is under the cursor? I don't want to install another plugin (phpactor/phpactor
) just to add this feature as this plugin (using Intelephense
) correctly suggests the auto completion and namespaces. Please help :).
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.