Skip to content

Fix file_type matching for local single-file worktrees#60307

Open
notpeter wants to merge 1 commit into
zed-industries:mainfrom
notpeter:single_file_worktree_language_selection
Open

Fix file_type matching for local single-file worktrees#60307
notpeter wants to merge 1 commit into
zed-industries:mainfrom
notpeter:single_file_worktree_language_selection

Conversation

@notpeter

@notpeter notpeter commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Objective

Solution

Fixes custom file_types language matching for single-file worktrees.
Adds a new file_system_abs_path API with full local or remote filesystem paths for glob matching.

Testing

New tests ensure file_types takes precedence over path_suffixes in single file worktrees, both locally and remotely.

I manually validated builds with this change are also fixed. Validation:

  1. Install ini extension
  2. Add "file_types": {"Plain Text": ["**/.ssh/config"]} to your zed settings.json:
  3. From a command prompt:
    mkdir -p /tmp/foo/.ssh/
    touch  /tmp/foo/.ssh/config
    # these work now:
    cargo run -- /tmp/foo/.ssh/config
    cargo run -- ssh://think21:~/.ssh/config

Self-Review Checklist:

  • [Yes] I've reviewed my own diff for quality, security, and reliability
  • [N/A] Unsafe blocks (if any) have justifying comments
  • [N/A] The content adheres to Zed's UI standards (UX/UI and icon guidelines)
  • [Yes] Tests cover the new/changed behavior
  • [Yes] Performance impact has been considered and is acceptable

Release Notes:

  • Fixed language association for file_type path globs with single-file worktrees

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jul 2, 2026
@smitbarmase smitbarmase added the area:languages An umbrella label for all programming languages syntax behaviors label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:languages An umbrella label for all programming languages syntax behaviors cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Single File Worktrees don't respect file_types globs

2 participants