zed icon indicating copy to clipboard operation
zed copied to clipboard

LSP: Allow for an LSP extension match on any suffix, not just filename and ext

Open nathansbradshaw opened this issue 10 months ago • 5 comments

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

nathansbradshaw avatar May 02 '24 21:05 nathansbradshaw

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[bot] avatar May 02 '24 21:05 cla-bot[bot]

@cla-bot check

nb-midwestern avatar May 02 '24 21:05 nb-midwestern

The cla-bot has been summoned, and re-checked this pull request!

cla-bot[bot] avatar May 02 '24 21:05 cla-bot[bot]

Warnings
:warning:

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- (Added|Fixed|Improved) ... ([#<public_issue_number_if_exists>](https://github.com/zed-industries/zed/issues/<public_issue_number_if_exists>)).

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by :no_entry_sign: dangerJS against 7d78e3bd526c89d7ce0b18d1a56fbfecf5223352

zed-industries-bot avatar May 03 '24 09:05 zed-industries-bot

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.

maxbrunsfeld avatar May 03 '24 16:05 maxbrunsfeld

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.

ConradIrwin avatar Jul 10 '24 19:07 ConradIrwin