Skip to content

fix: normalize keymap keys before merging user config - #725

Closed
barrettruth wants to merge 1 commit into
stevearc:masterfrom
barrettruth:fix/keymap-normalization
Closed

barrettruth wants to merge 1 commit into
stevearc:masterfrom
barrettruth:fix/keymap-normalization

Conversation

@barrettruth

Copy link
Copy Markdown

Problem: user keymap overrides like failed to replace the default because the keys were compared as raw strings during merge, leaving both entries in the table.

Solution: use nvim_replace_termcodes to compare keymap keys by their internal representation, removing any default entry that normalizes to the same key as the user-provided one before inserting it.

Problem: user keymap overrides like <c-t> failed to replace the
default <C-t> because the keys were compared as raw strings during
merge, leaving both entries in the table.

Solution: use nvim_replace_termcodes to compare keymap keys by their
internal representation, removing any default entry that normalizes
to the same key as the user-provided one before inserting it.
@github-actions
github-actions Bot requested a review from stevearc February 18, 2026 05:20
barrettruth added a commit to barrettruth/canola.nvim that referenced this pull request Feb 20, 2026
Problem: user keymap overrides like <c-t> failed to replace the
default <C-t> because the keys were compared as raw strings during
merge, leaving both entries in the table.

Solution: use nvim_replace_termcodes to compare keymap keys by their
internal representation, removing any default entry that normalizes
to the same key as the user-provided one before inserting it.

Closes stevearc#692
Cherry-picked from: stevearc#725
barrettruth added a commit to barrettruth/canola.nvim that referenced this pull request Mar 15, 2026
Problem: Issue stevearc#416 (case-sensitive keymap comparison preventing
remaps) was listed as `open` despite being fixed by the keymap
normalization in PR stevearc#725.

Solution: Mark as `fixed — cherry-picked (stevearc#725)`. The
`nvim_replace_termcodes` normalization in `config.lua` resolves
case variants like `<c-e>` and `<C-e>` to the same key.
barrettruth added a commit to barrettruth/canola.nvim that referenced this pull request Mar 15, 2026
#132)

* docs(upstream): track #254 in canola.nvim#129

Problem: Issue #254 (highlights lost during mid-edit) was listed as
`open`. Investigation shows a decoration provider approach can solve
this despite stevearc's extmark limitation assessment.

Solution: Created #129 with full technical
analysis and proposed `nvim_set_decoration_provider` approach. Mark
#254 as `tracked in #129`.

* docs(upstream): mark stevearc#449 not actionable

Problem: Issue stevearc#449 (LSP rename failing on TypeScript files) was listed
as `open` despite being a configuration issue.

Solution: Mark as `not actionable`. The LSP rename times out on large
TypeScript projects; increasing `lsp_file_methods.timeout_ms` resolves
it. stevearc confirmed this in the issue thread.

* docs(upstream): mark stevearc#416 fixed via cherry-picked stevearc#725

Problem: Issue stevearc#416 (case-sensitive keymap comparison preventing
remaps) was listed as `open` despite being fixed by the keymap
normalization in PR stevearc#725.

Solution: Mark as `fixed — cherry-picked (stevearc#725)`. The
`nvim_replace_termcodes` normalization in `config.lua` resolves
case variants like `<c-e>` and `<C-e>` to the same key.
barrettruth added a commit to barrettruth/canola.nvim that referenced this pull request Mar 15, 2026
* docs(upstream): track #254 in canola.nvim#129

Problem: Issue #254 (highlights lost during mid-edit) was listed as
`open`. Investigation shows a decoration provider approach can solve
this despite stevearc's extmark limitation assessment.

Solution: Created #129 with full technical
analysis and proposed `nvim_set_decoration_provider` approach. Mark
#254 as `tracked in #129`.

* docs(upstream): mark stevearc#449 not actionable

Problem: Issue stevearc#449 (LSP rename failing on TypeScript files) was listed
as `open` despite being a configuration issue.

Solution: Mark as `not actionable`. The LSP rename times out on large
TypeScript projects; increasing `lsp_file_methods.timeout_ms` resolves
it. stevearc confirmed this in the issue thread.

* docs(upstream): mark stevearc#416 fixed via cherry-picked stevearc#725

Problem: Issue stevearc#416 (case-sensitive keymap comparison preventing
remaps) was listed as `open` despite being fixed by the keymap
normalization in PR stevearc#725.

Solution: Mark as `fixed — cherry-picked (stevearc#725)`. The
`nvim_replace_termcodes` normalization in `config.lua` resolves
case variants like `<c-e>` and `<C-e>` to the same key.

* docs(upstream): mark stevearc#479 not actionable

Problem: Issue stevearc#479 (harpoon integration recipe) was listed as `open`
despite being a stale documentation request from 2024 with zero
engagement.

Solution: Mark as `not actionable — no demand, stale`.
barrettruth added a commit to barrettruth/canola.nvim that referenced this pull request Mar 17, 2026
#132)

* docs(upstream): track #254 in canola.nvim#129

Problem: Issue #254 (highlights lost during mid-edit) was listed as
`open`. Investigation shows a decoration provider approach can solve
this despite stevearc's extmark limitation assessment.

Solution: Created #129 with full technical
analysis and proposed `nvim_set_decoration_provider` approach. Mark
#254 as `tracked in #129`.

* docs(upstream): mark stevearc#449 not actionable

Problem: Issue stevearc#449 (LSP rename failing on TypeScript files) was listed
as `open` despite being a configuration issue.

Solution: Mark as `not actionable`. The LSP rename times out on large
TypeScript projects; increasing `lsp_file_methods.timeout_ms` resolves
it. stevearc confirmed this in the issue thread.

* docs(upstream): mark stevearc#416 fixed via cherry-picked stevearc#725

Problem: Issue stevearc#416 (case-sensitive keymap comparison preventing
remaps) was listed as `open` despite being fixed by the keymap
normalization in PR stevearc#725.

Solution: Mark as `fixed — cherry-picked (stevearc#725)`. The
`nvim_replace_termcodes` normalization in `config.lua` resolves
case variants like `<c-e>` and `<C-e>` to the same key.
barrettruth added a commit to barrettruth/canola.nvim that referenced this pull request Mar 17, 2026
* docs(upstream): track #254 in canola.nvim#129

Problem: Issue #254 (highlights lost during mid-edit) was listed as
`open`. Investigation shows a decoration provider approach can solve
this despite stevearc's extmark limitation assessment.

Solution: Created #129 with full technical
analysis and proposed `nvim_set_decoration_provider` approach. Mark
#254 as `tracked in #129`.

* docs(upstream): mark stevearc#449 not actionable

Problem: Issue stevearc#449 (LSP rename failing on TypeScript files) was listed
as `open` despite being a configuration issue.

Solution: Mark as `not actionable`. The LSP rename times out on large
TypeScript projects; increasing `lsp_file_methods.timeout_ms` resolves
it. stevearc confirmed this in the issue thread.

* docs(upstream): mark stevearc#416 fixed via cherry-picked stevearc#725

Problem: Issue stevearc#416 (case-sensitive keymap comparison preventing
remaps) was listed as `open` despite being fixed by the keymap
normalization in PR stevearc#725.

Solution: Mark as `fixed — cherry-picked (stevearc#725)`. The
`nvim_replace_termcodes` normalization in `config.lua` resolves
case variants like `<c-e>` and `<C-e>` to the same key.

* docs(upstream): mark stevearc#479 not actionable

Problem: Issue stevearc#479 (harpoon integration recipe) was listed as `open`
despite being a stale documentation request from 2024 with zero
engagement.

Solution: Mark as `not actionable — no demand, stale`.
@barrettruth
barrettruth deleted the fix/keymap-normalization branch March 20, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant