Open iddnet opened 7 years ago
.inc
and .module
could be any language really though
Perhaps, we could have a "valid PHP file extensions" (similar to CodeSniffer) configuration sent by the client.
IMHO this is a real shortcoming in the protocol... the IDE should be the one to decide which files the language server needs to see. Not the other way around.
the IDE should be the one to decide which files the language server needs to see
How can the IDE know what files the LS needs?
How can the IDE know what files the LS needs?
Right now it can't. But this was more a thought about extending the LSP.
The LS could announce to the client the language(s) it supports and have the client send it a list of paths/file contents to parse. Most editors have a global map of suffix-->language after all.
It's not as simple as that. LS don't only need files like *.php
, they may also need files like composer.json
, package.json
, ...
Requesting the files from the client is already being implemented in #136
With #136 excludes works?
I have this settings.json :
{
"search.exclude": {
"**/.git": true,
"app/cache": true,
"app/logs": true,
"var": true,
"vendor": true
},
"files.exclude": {
"app/cache": true,
"app/logs": true
}
}
but app/cache folder is parsed. I'm executing version 3.0.1
"name": "felixfbecker/language-server",
"version": "v3.0.1",
"source": {
"type": "git",
"url": "https://github.com/felixfbecker/php-language-server.git",
"reference": "bec24383d4c0b896ff20bf94c7edc4714976c0e1"
@corretge #136 has nothing to do with excludes, neither does this issue and neither do the settings search.exclude
and files.exclude
have anything to do with this server
Is it still the case that we can't configure which file extensions are handled?
I think the server is not parsing all files which are set to be php language files. I am basing this overvation on the fact that I do not see any of these files in the language server output when it is parsing all of the files.
This would be helpful because some of us may have .inc files, and also .module files set to the php language. This is because Drupal and some of it's modules are using these extensions. Maybe we could query VS code for all files set to php language and include them as well.
Thanks!