-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Custom file extensions not being indexed in Theia? #1233
Comments
No @jfcherng , the files.associations will be merged with intelephense.files.associations: vscode-intelephense/src/middleware.ts Lines 26 to 39 in ea26f7d
|
@verbruggenalex are you using short tags? |
@bmewburn no. Only full php opening tags (Drupal development .inc, .module, files...) For me it seems that neither files.associations and intelephense.files.associations settings have any effect on the indexing command process. Whenever I change intelephense.files.associations to only have ".inc" it still only indexes ".php" files for me. But when opening files in Theia it does seem to index the individual "*.inc" files that are opened. I'll see if I can make you a light docker image that you can check out to reproduce the issue. |
If you want to have a look @bmewburn :
|
Hi @bmewburn, I'm not really familiar with writing vscode plugins yet. But to me it seems that intelephense is not passing any pattern to the documentSelector within the clientOptions for the LanguageClient: vscode-intelephense/src/extension.ts Lines 153 to 155 in 32f027e
DocumentFilter API: https://code.visualstudio.com/api/references/vscode-api#DocumentFilter But I think that adding a pattern without language or scheme is required to have the custom exension files indexed. And this could possibly register non php files that have a custom file extension as a php file. Anywayz, this looks like a known issue also
I hope we can find a solution for this as it is blocking intelephense usage for a lot of frameworks that rely on non standard file extension names. |
@verbruggenalex is the issue just related to theia? In vscode adding |
Sorry to bother you again @bmewburn . But do you have any good resource on how I can compile the code in this repository? Running |
@verbruggenalex |
Thanks @bmewburn. I was able to successfully build the extension. But when trying to run it in the docker Theia instance the extension fails to activate.
I'm not really sure why Theia is using its own package for running vscode extensions. But it may be why it doesn't run exactly the same on Theia.
I'm afraid my knowledge in NPM is not sufficient to try and help on this issue. So I'm going to put this on hold for myself. I hope someone can pick this issue up. Solving it will enable full usage of Intelephense for popular services like GitPod or custom docker build images based on Theia:
|
I'm closing this issue because with the latest version of Intelephense (v1.5.4) I'm not experiencing the problem any longer. Thank you for the support @bmewburn. I will be enjoying your plugin a lot! If anyone is interested in the Docker image I created for developing PHP applications you can find it here: https://github.com/verbruggenalex/docker-theia-php I'm deleting the other repository that was used for debugging this issue. |
Describe the bug
For some reason using the following config I can't seem to get custom file extensions to be indexed:
To Reproduce
Expected behavior
Setting the files.associations array should allow the indexing of non-standard file extensions.
Not sure how to debug
I have been trying to resolve this issue for a couple of days now. But I'm not sure how to validate which files have been indexed. The only way I can see that they were not indexed is after I open an .inc file it will be indexed.
Platform and version
The text was updated successfully, but these errors were encountered: