Disabling LSP for specific file extensions #3237

Open
opened 2026-02-16 17:39:16 -05:00 by yindo · 2 comments
Owner

Originally created by @eislambey on GitHub (Dec 1, 2025).

Originally assigned to: @rekram1-node on GitHub.

Question

In Laravel projects, template files (Blade files) typically have the .blade.php suffix. However, the PHP LSP automatically detects these files and can cause incorrect behavior or issues within them.

Is there a way to disable the LSP specifically for files that have the .blade.php suffix?

Originally created by @eislambey on GitHub (Dec 1, 2025). Originally assigned to: @rekram1-node on GitHub. ### Question In Laravel projects, template files (Blade files) typically have the `.blade.php` suffix. However, the PHP LSP automatically detects these files and can cause incorrect behavior or issues within them. Is there a way to disable the LSP specifically for files that have the `.blade.php` suffix?
Author
Owner

@rekram1-node commented on GitHub (Dec 2, 2025):

yeah we need to have something for that....

@rekram1-node commented on GitHub (Dec 2, 2025): yeah we need to have something for that....
Author
Owner

@ckreiling commented on GitHub (Feb 7, 2026):

Similarly when developing Helm charts the template files are associated to yaml-ls which barfs on the templates, which are generally not valid yaml. Not a huge deal but it does add context bloat (not sure how much tbh) and can throw off smaller models like Claude Haiku.

To my knowledge there isn't a standard extension for Helm templates though, like there is for Blade files. Maybe reasoning about it more like an ignore file would be nice (e.g. being able to exclude **/templates/** from the yaml-ls LSP)

@ckreiling commented on GitHub (Feb 7, 2026): Similarly when developing Helm charts the template files are associated to `yaml-ls` which barfs on the templates, which are generally not valid yaml. Not a huge deal but it does add context bloat (not sure how much tbh) and can throw off smaller models like Claude Haiku. To my knowledge there isn't a standard extension for Helm templates though, like there is for Blade files. Maybe reasoning about it more like an ignore file would be nice (e.g. being able to exclude `**/templates/**` from the yaml-ls LSP)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3237