phpactor / vscode-phpactor

Phpactor VS Code Extension
MIT License
124 stars 8 forks source link

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

Open leocavalcante opened 6 months ago

leocavalcante commented 6 months ago

Not sure what I'm missing here.

Screenshot 2024-05-08 at 18 01 34
dantleech commented 6 months ago

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

leocavalcante commented 6 months ago

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
dantleech commented 6 months ago

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

leocavalcante commented 6 months ago

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.

dantleech commented 6 months ago

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

leocavalcante commented 6 months ago

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?

dantleech commented 6 months ago

They should...