zed
zed copied to clipboard
LSP: Allow for an LSP extension match on any suffix, not just filename and ext
Angular shares file extensions with html
and ts
. It is conventional for an angular file to follow the format *.component.html
or *.component.ts
. This PR allows LSP to add an optional Language detection field called path_regex
that can be used to sort out duplicate Languages, such as in the case of angular files.
Release Notes:
- Added
Path_Regex
option for LSP configs
We require contributors to sign our Contributor License Agreement, and we don't have @nb-midwestern on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.
@cla-bot check
The cla-bot has been summoned, and re-checked this pull request!
Warnings | |
---|---|
:warning: |
This PR is missing release notes. Please add a "Release Notes" section that describes the change:
If your change is not user-facing, you can use "N/A" for the entry:
|
Generated by :no_entry_sign: dangerJS against 7d78e3bd526c89d7ce0b18d1a56fbfecf5223352
I agree, it seems like a path_suffixes
need to not just match against the extension and the filename, but rather split the filename on a .
, and check if any suffix of that split list matches the entry.
Sorry for the slow response here.
I am going to close this for now. I think we need to consolidate our file ending handling so we can fix this in just one place.