Conversation
There was a problem hiding this comment.
Code Review
This pull request updates several Neovim plugin versions in lazy-lock.json, adjusts the placement of the effortLevel setting in the Claude configuration, and introduces a styled_title function in the WezTerm configuration to format tab titles. Feedback was provided regarding .config/wezterm/on.lua, where the logic for constructing tab title segments is duplicated between single-pane and multi-pane scenarios. Additionally, a redundant style attribute was identified within the styling logic. Refactoring these sections to initialize the segments once would improve code maintainability and reduce complexity.
| local function styled_title(title) | ||
| local app, content = title:match("^([^:]+):(.+)$") | ||
| if app then | ||
| return { | ||
| { Attribute = { Intensity = "Bold" } }, | ||
| { Text = app .. ":" }, | ||
| { Attribute = { Intensity = "Normal" } }, | ||
| { Text = content }, | ||
| { Attribute = { Intensity = "Normal" } }, | ||
| } | ||
| end | ||
| return { { Text = title } } | ||
| end | ||
|
|
||
| if #panes <= 1 then | ||
| return { { Text = prefix .. active_title } } | ||
| local segments = { { Text = prefix } } | ||
| for _, s in ipairs(styled_title(active_title)) do | ||
| table.insert(segments, s) | ||
| end | ||
| return segments | ||
| end |
There was a problem hiding this comment.
The logic for building the tab title segments is duplicated between the single-pane and multi-pane cases. Additionally, the styled_title function contains a redundant Intensity = "Normal" attribute (line 47) since it was already set at line 45.
You can refactor this by initializing and styling the segments list once at the beginning of the function. This improves maintainability and avoids unnecessary function calls and table allocations.
local segments = { { Text = prefix } }
local app, content = active_title:match("^([^:]+):(.+)$")
if app then
table.insert(segments, { Attribute = { Intensity = "Bold" } })
table.insert(segments, { Text = app .. ":" })
table.insert(segments, { Attribute = { Intensity = "Normal" } })
table.insert(segments, { Text = content })
else
table.insert(segments, { Text = active_title })
end
if #panes <= 1 then
return segments
end
| local segments = { { Text = prefix } } | ||
| for _, s in ipairs(styled_title(active_title)) do | ||
| table.insert(segments, s) | ||
| end |
There was a problem hiding this comment.
Pull request overview
Updates the wezterm tab-title rendering to apply different styling to app:content-shaped titles, while also including unrelated repository maintenance updates (Neovim plugin lockfile bumps and a Claude settings reordering).
Changes:
- Adjust wezterm tab title segmentation to bold only the
app:prefix when titles matchapp:content. - Update multiple pinned plugin commits in Neovim’s
lazy-lock.json. - Move
effortLevelwithin Claude’ssettings.json(no semantic change, but unrelated to wezterm styling).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .config/wezterm/on.lua | Adds styled_title helper and changes tab title segment construction for new styling behavior. |
| .config/nvim/lazy-lock.json | Bumps pinned commits for a number of Neovim plugins. |
| .config/claude/settings.json | Reorders/moves effortLevel within the JSON config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| local function styled_title(title) | ||
| local app, content = title:match("^([^:]+):(.+)$") | ||
| if app then | ||
| return { | ||
| { Attribute = { Intensity = "Bold" } }, | ||
| { Text = app .. ":" }, | ||
| { Attribute = { Intensity = "Normal" } }, | ||
| { Text = content }, | ||
| { Attribute = { Intensity = "Normal" } }, | ||
| } | ||
| end | ||
| return { { Text = title } } | ||
| end |
There was a problem hiding this comment.
styled_title is defined inside create_tab_title, so a new closure is allocated every time the tab title is formatted (which can happen frequently during UI redraws). Consider hoisting styled_title to a module-level local function (or otherwise avoiding per-call function allocation) to reduce overhead in this hot path.
| { Text = app .. ":" }, | ||
| { Attribute = { Intensity = "Normal" } }, | ||
| { Text = content }, | ||
| { Attribute = { Intensity = "Normal" } }, |
There was a problem hiding this comment.
In styled_title, the { Attribute = { Intensity = "Normal" } } entry appears twice (before and after content). Given format-tab-title already appends a reset at the end, the final Normal looks redundant and can be removed to simplify the segment list.
| { Attribute = { Intensity = "Normal" } }, |
| "LspUI.nvim": { "branch": "main", "commit": "946fdfc6cdab03681fc9aafb21cc7086d93509b7" }, | ||
| "LuaSnip": { "branch": "master", "commit": "a62e1083a3cfe8b6b206e7d3d33a51091df25357" }, | ||
| "blink-copilot": { "branch": "main", "commit": "7ad8209b2f880a2840c94cdcd80ab4dc511d4f39" }, | ||
| "blink-ripgrep.nvim": { "branch": "main", "commit": "f1e2f0132d4d8b8591e29f4f86f518f6d463371d" }, | ||
| "blink-ripgrep.nvim": { "branch": "main", "commit": "6a21f6f68513c630b0f3a498f1a38397c83ec12f" }, | ||
| "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, | ||
| "blink.lib": { "branch": "main", "commit": "b68335357e9fcc2b20445acfcee48034376d64b5" }, | ||
| "blink.lib": { "branch": "main", "commit": "a459c8fbf51359902971874b5ebe05f6602db8b4" }, | ||
| "blink.pairs": { "branch": "main", "commit": "4e43012356d33a26f69eae475f746fbe9f325f44" }, |
There was a problem hiding this comment.
This PR is titled as a wezterm tab-style change, but this lockfile updates multiple Neovim plugin pinned commits. To keep changes reviewable and to avoid coupling unrelated updates, consider moving the lazy-lock.json bump into a separate PR (or updating the PR title/description to reflect the extra scope).
| "podman" | ||
| ] | ||
| }, | ||
| "effortLevel": "high", | ||
| "autoUpdatesChannel": "latest", | ||
| "skipDangerousModePermissionPrompt": true, | ||
| "skipAutoPermissionPrompt": true |
There was a problem hiding this comment.
This PR is titled as a wezterm tab-style change, but it also modifies Claude configuration (effortLevel moved). Consider splitting this into a separate PR (or updating the PR title/description) so the wezterm UI change can be reviewed independently.
No description provided.