PHP: expose file_filter via ls_specific_settings (#1710) (#1711)

- PHP/Intelephense: expose `file_filter` via `ls_specific_settings["php"]`, so that additional
  extensions containing PHP sources (e.g. Drupal's `.module` / `.install` / `.inc` / `.theme`)
  become visible to the symbol tools and are indexed by the language server
- PHP: treat `.phtml` files as PHP sources by default (all PHP language servers)
This commit is contained in:
Vasil Boychev authored and GitHub committed 2026-07-20 11:47:29 +02:00
1 parent 5c85d961a0
commit f631a4bceb
6 files changed
+157 -2

No files matched your search

+13
View File
@@ -931,6 +931,19 @@ Supported settings:
| `ignore_vendor` | `true` | Ignore directories named `vendor` while indexing the project. |
| `maxFileSize` | unset | Forwarded as `intelephense.files.maxSize` in `initializationOptions`. |
| `maxMemory` | unset | Forwarded as `intelephense.maxMemory` in `initializationOptions`. |
| `file_filter` | unset | Additional file extensions (with leading dot) to treat as PHP sources, e.g. `[".module", ".install"]`; added to the defaults `.php` / `.phtml` (#1710). |
Example configuration making Drupal source files visible to the symbol tools:
```yaml
ls_specific_settings:
php:
file_filter: [".module", ".install", ".inc", ".theme", ".profile", ".engine"]
```
Notes:
- Extensions added via `file_filter` are synced into Serena's PHP source-file matcher and pushed to Intelephense as `intelephense.files.associations` globs at startup, so `find_symbol` and the language server treat the same files as PHP sources.
- The matcher is reset on every language server activation, so one project's `file_filter` does not leak into another.
#### PHP (`Phpactor`)