-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: configure file size limit #668
base: master
Are you sure you want to change the base?
Feature: configure file size limit #668
Conversation
Will take the options sent by the client. Option: php.intellisense.fileTypes = [".php"]
To sanitize the file type option, we provide a setter method for the property that will be called by the JsonMapper.
…into feature/allow-configurable-file-extension-for-indexing
Currently only the default Options type and the vscode format are accepted.
…figurable-file-extension-for-indexing
* merge latest upstream * remove currently not required code blocks * fix tests
@@ -221,7 +221,7 @@ private function indexFiles(array $files): Promise | |||
yield timeout(); | |||
$this->client->window->logMessage(MessageType::LOG, "Parsing $uri"); | |||
try { | |||
$document = yield $this->documentLoader->load($uri); | |||
$document = yield $this->documentLoader->load($uri, $this->options->fileSizeLimit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felixfbecker I think this is the right place to pass the file size limit, what do you think?
Just asking, because I need to adjust a lot of tests for that.
Please consider #308 (comment) |
Do you mean the one comment with renaming the class Options to InitializationOptions only? For the whole conversation I need to talk with you a bit more, because I have difficulties to understand why clients can't implement the initialization options. I understand why you want to move this to We can talk here or continue in #308. |
They can. But it's not defined in the protocol that |
Alright, now I get it :) thx for the patience. Here is my suggestion that should satisfy LSP: We can hook into I really really don't want to start reindexing after every change in |
Yeah, using
It would only have to reindex if a setting affecting the indexing changed, e.g. the file size limit. What is the problem with that? |
Yes that is right, that it would only reindex affected settings. If we would move it to In the end, it's your decision :) |
We could pretty easily. Ideally we would pass some sort of |
Alright, which of these 2 Options should I implement.
|
Both sounds like the best way - so we only start indexing after we know the initial configuration, but are still able to handle configuration changes (a |
After testing with So only the option for |
Could you explain this in more detail?
I would go with the simple method for now |
Now I feel dump... Did an upgrade and now I see it :) |
@JSteitz are still interested in getting this merged? |
Requires the PR from vscode-php-intellisense felixfbecker/vscode-php-intellisense#77
This PR is based on #308 and should be merged after
This solves issues / feature requests for #299 #548