Skip to content

Server is not parsing all php files with other extensions. #145

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

Open
iddnet opened this issue Nov 11, 2016 · 9 comments
Open

Server is not parsing all php files with other extensions. #145

iddnet opened this issue Nov 11, 2016 · 9 comments

Comments

@iddnet
Copy link

iddnet commented Nov 11, 2016

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!

@felixfbecker
Copy link
Owner

.inc and .module could be any language really though

@kaloyan-raev
Copy link
Contributor

Perhaps, we could have a "valid PHP file extensions" (similar to CodeSniffer) configuration sent by the client.

@sunverwerth
Copy link
Contributor

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.

@felixfbecker
Copy link
Owner

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?

@sunverwerth
Copy link
Contributor

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.

@felixfbecker
Copy link
Owner

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

@corretge
Copy link

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"

@felixfbecker
Copy link
Owner

@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

@phil-s
Copy link

phil-s commented Sep 1, 2020

Is it still the case that we can't configure which file extensions are handled?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants