vscode-phpactor
vscode-phpactor copied to clipboard
can we have a commnd to clear the project cache ?
i dont think the reindex command actually re-index the whole project from scratch, rather it caches new files only.
this is helpfull incase u changed something from the config, ex. removing/adding from container.extension_classes
you can phpactor index:build --reset
but adding a command to do that should be fairly simple:
https://github.com/phpactor/vscode-phpactor/blob/master/src/extension.ts#L118
adding a new command reindex (hard)
or similar:
languageClient.sendRequest('indexer/reindex', {"soft": false});
oh ok, i can make a PR with that logic if u want.
btw i think the LS should be restarted afterward, ex. changeing worse_reflection.stub_dir
then runing the phpactor index:build --reset
from the project root, doesnt update the LS until u restart the editor.
you don't have to restart the editor, Reload window
from the command palette will restart the LSP server.
Reload window
from the command palette will restart the LSP server
ah yes thats what i meant, hopefully the new command can do that internally without the need to manually reload the window.
side question:
why its always 500 files only to be indexed ?
no, you will always need to restart the LSP after changing the config.
500 is the number of stub files - you'd see that if you were running index
in a folder with no PHP files (or if it couldn't find any PHP files)
no, you will always need to restart the LSP after changing the config
maybe we can add executeCommand('workbench.action.reloadWindow')
after languageClient.sendRequest('indexer/reindex', {"soft": false});
has finished.
you'd see that if you were running index in a folder with no PHP files (or if it couldn't find any PHP files)
actually i see it all the time regardless, whether i ran Phpactor: Re-index workspace
or phpactor index:build --reset
from the project root path which has multiple php files ex._ide_helper.php