Skip to content

Add configurable word characters#59530

Open
Zhaoyikaiii wants to merge 3 commits into
zed-industries:mainfrom
Zhaoyikaiii:configure-word-characters
Open

Add configurable word characters#59530
Zhaoyikaiii wants to merge 3 commits into
zed-industries:mainfrom
Zhaoyikaiii:configure-word-characters

Conversation

@Zhaoyikaiii

Copy link
Copy Markdown

Summary

Adds a word_characters language setting that lets users configure extra characters considered part of a word for editor selection. With:

{
  "word_characters": ["-"]
}

double-click selection can include foo-bar as one word.

This uses existing language settings merging, so the setting can be defined globally or under languages. Language extension word characters continue to apply through the existing classifier path.

VS Code imports translate editor.wordSeparators into word_characters for ASCII punctuation that VS Code does not treat as a separator.

Validation

  • git diff --check
  • cargo fmt -p language -p multi_buffer -p editor -p settings -p settings_content --check
  • npx prettier --check src/reference/all-settings.md
  • cargo check -p settings_content --lib
  • cargo check -p language --lib
  • cargo test -p language test_surrounding_word_with_extra_word_characters
  • cargo test -p settings test_vscode_import
  • cargo check -p editor --lib

Release Notes:

  • Added word_characters setting for configuring word selection behavior.

@cla-bot

cla-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @Zhaoyikaiii 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'.

@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jun 18, 2026
@Zhaoyikaiii

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 18, 2026
@cla-bot

cla-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

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

@Zhaoyikaiii

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 372fed46d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/editor/src/selection.rs
Comment thread crates/settings_content/src/language.rs Outdated
Comment thread assets/settings/default.json Outdated
@Zhaoyikaiii

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 599b0a3abc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/settings_content/src/language.rs
@Zhaoyikaiii

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: d0a21f6fef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Zhaoyikaiii Zhaoyikaiii marked this pull request as ready for review June 18, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant