vscode-phpactor icon indicating copy to clipboard operation
vscode-phpactor copied to clipboard

Phpactor Language Server must be initialized with a root URI, NULL provided

Open leocavalcante opened this issue 1 year ago • 7 comments

Not sure what I'm missing here.

Screenshot 2024-05-08 at 18 01 34

leocavalcante avatar May 08 '24 21:05 leocavalcante

Does this happen if you open a folder? Does it always happen? Which version of VS code

dantleech avatar May 08 '24 21:05 dantleech

I just create New Text file with Cmd + N and Change it's mode to PHP

VSCode 1.89

Screenshot 2024-05-08 at 18 10 13

leocavalcante avatar May 08 '24 21:05 leocavalcante

Phactor needs a project root, try opening the folder where you want to create the file

dantleech avatar May 08 '24 21:05 dantleech

Thank you. It is working now, opening a folder with an existing PHP file.

May I ask. How to make Phpactor gain priority over the basic suggestions?

Screenshot 2024-05-08 at 18 35 33

I'd like to see bar() and qux() as the first suggestions, for example.

I mean:

If I disable php.suggest.basic I can see only Phpactor suggestions, then it looks nice: Screenshot 2024-05-08 at 18 39 54 But then I don't have completions of basic function likes the array_* functions.

leocavalcante avatar May 08 '24 21:05 leocavalcante

IIRC you need to disable VS code's default PHP integration, there will be a setting for it somewhere....

dantleech avatar May 08 '24 21:05 dantleech

IIRC you need to disable VS code's default PHP integration, there will be a setting for it somewhere....

Yeah, I can set php.suggest.basic to false, but when I do this, global functions like array_map, for example, isn't suggested... They should come up from Phpactor?

leocavalcante avatar May 08 '24 22:05 leocavalcante

They should...

dantleech avatar May 09 '24 06:05 dantleech