Vscode-intelephense: Use `search.exclude` instead of `files.exclude`?

Created on 8 Jan 2019  路  10Comments  路  Source: bmewburn/vscode-intelephense

Thanks for the hard work.

Since Intellisense helps with searching for code completion, symbols, signatures, etc, shouldn't the indexer obey search.exclude instead of files.exclude?

The use case here is that I do not want my huge Vendor directory to be indexed, but I do want to see it in the Explorer panel, so that I can manually open a file from there. By putting **/Vendor in search.exclude I successfully prevent VS from presenting files from Vendor when I use "File->Open...", but I can still pick a file in Vendor from the explorer. Unfortunately, vscode-intelephense uses files.excludes...

Most helpful comment

Though ideally an indexing.exclude would be nice...

All 10 comments

Thanks @sebastienbarre, I agree this is a most wanted feature.

It could also be controlled by an extension specific setting entry.

Cheers

Hello,
Hi think I have the same problem.

I'm using VS Code 1.30.2 on Mac OS 10.14.3 and my work's folder is on samba server.

/Volumes/space/libs/
/Volumes/space/commons/
/Volumes/space/Works/project1/
/Volumes/space/Works/project2/

I work on "space" volume but I don't need to index all folders because there are too many files.

I tried configuring Watcher Exclude and Search Exclude but indexing go on causing traffic congestion on server.

"search.exclude": {
    "**/Volumes/space/commons/**": true,
    "**/Volumes/space/libs/**": true,
},
"files.watcherExclude": {
    "**/Volumes/space/commons/**": true,
    "**/Volumes/space/libs/**": true,
},

How can I solve it?

I'm having a similar problem, but I disagree with OP.
The search.useIgnoreFiles is for limiting the search results, which should be independent of what gets indexed for intelephense. Eg. when doing a search and replace I don't want any results from the vendor folder, but I still want indexing for vendor classes.

I mentioned search.useIgnoreFiles, but I think its relevant to the other search.* settings

@aNickzz Your files.exclude is also automatically used when you do search/replace, according to a few sources (see here).

Though ideally an indexing.exclude would be nice...

1.0 has a new setting intelephense.files.exclude that takes an array of file globs to exclude.

1.0 has a new setting intelephense.files.exclude that takes an array of file globs to exclude.

Is this the corrects configuration?

"intelephense.files.exclude": [
        "**/.js",
        "**/.png",
        "**/.jpg",
        "**/.css",
        "**/.pdf",
        "**/.txt",
        "**/Volume/aaa/**",
        "**/Volume/bbb/**"
],

Are the **/.js etc directories? If so it should be **/.js/**. If they are file extensions it would be **/*.js but this is unnecessary as only files associated with php are looked for. To exclude whole directories and contents the pattern **/Volume/aaa/** is correct.

Ok, thanks. Great work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

superadmini picture superadmini  路  4Comments

zlianon picture zlianon  路  3Comments

ghnp5 picture ghnp5  路  3Comments

swashata picture swashata  路  3Comments

usrnm-nk picture usrnm-nk  路  3Comments