# worktree: Implement \`read_only_files\` worktree setting \(\#44376\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/dba13522d6343e046294397465009f9b3e7ab165)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: dba13522d6343e046294397465009f9b3e7ab165

Requested commit: dba13522d6343e046294397465009f9b3e7ab165

Commit: dba13522d6343e046294397465009f9b3e7ab165

Tree: eb952edcb9c9d43a4cd15e759445722f0ffba553

Author: Lukas Wirth

Committer: GitHub

## Message

```
worktree: Implement `read_only_files` worktree setting (#44376)

This mimics VSCode's `files.readonlyExclude` setting, to allow setting
specific path matches as readonly locations like lockfiles and generated
sources etc.

Also renders a lock icon to the right side of the path names for
readonly files now.
This does a couple more things for completion sake:
- Tabs of readonly buffers now render a file lock icon
- Multibuffer buffer headers now render a file lock icon if the excerpts
buffer is readonly
- ReadWrite multibuffers now no longer allow edits to read only buffers
contained within

Release Notes:

- Added `read_only_files` setting to allow specifying glob patterns of
files that should not be editable by default

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
```

## Parents

- [848d3cc34e64658463b112397e8ae656ac4d7100](https://git.cafe/gitcafe/zed/commit/848d3cc34e64658463b112397e8ae656ac4d7100?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/dba13522d6343e046294397465009f9b3e7ab165?format=markdown)
