Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping C-/ fails #3210

Closed
thor314 opened this issue Jul 27, 2022 · 1 comment · Fixed by #4939
Closed

Mapping C-/ fails #3210

thor314 opened this issue Jul 27, 2022 · 1 comment · Fixed by #4939
Labels
C-bug Category: This is a bug

Comments

@thor314
Copy link
Contributor

thor314 commented Jul 27, 2022

Summary

The following produces no errors, but fails:

[keys.normal]
"C-/" = "toggle_comments" #nope

The following produces an error, and fails:

[keys.normal]
C-/ = "toggle_comments" #nope

The following works as expected:

[keys.normal]
"/" = "toggle_comments"

Recommended short term action:
make a note in the key-remapping section in docs, until bug can be resolved.

Reproduction Steps

No response

Helix log

Config file: /home/thor/.config/helix/config.toml
Language file: /home/thor/.config/helix/languages.toml
Log file: /home/thor/.cache/helix/helix.log
Runtime directory: /home/thor/.config/helix/runtime

Language           LSP                DAP                Highlight          Textobject         Indent             
bash               ✔ bash-language…   None               ✔                  ✘                  ✘                  
c                  ✘ clangd           ✔ lldb-vscode      ✔                  ✔                  ✔                  
c-sharp            ✘ OmniSharp        None               ✔                  ✘                  ✘                  
cairo              None               None               ✔                  ✘                  ✘                  
clojure            ✘ clojure-lsp      None               ✔                  ✘                  ✘                  
cmake              ✘ cmake-languag…   None               ✔                  ✔                  ✔                  
comment            None               None               ✔                  ✘                  ✘                  
cpon               None               None               ✔                  ✘                  ✔                  
cpp                ✘ clangd           ✔ lldb-vscode      ✔                  ✔                  ✔                  
css                ✘ vscode-css-la…   None               ✔                  ✘                  ✘                  
dart               ✘ dart             None               ✔                  ✘                  ✔                  
devicetree         None               None               ✔                  ✘                  ✔                  
dockerfile         ✘ docker-langse…   None               ✔                  ✘                  ✘                  
edoc               None               None               ✔                  ✘                  ✘                  
eex                None               None               ✔                  ✘                  ✘                  
ejs                None               None               ✔                  ✘                  ✘                  
elixir             ✘ elixir-ls        None               ✔                  ✔                  ✘                  
elm                ✘ elm-language-…   None               ✔                  ✘                  ✘                  
elvish             ✘ elvish           None               ✔                  ✘                  ✘                  
erb                None               None               ✔                  ✘                  ✘                  
erlang             ✘ erlang_ls        None               ✔                  ✔                  ✘                  
fish               None               None               ✔                  ✔                  ✔                  
fortran            ✘ fortls           None               ✔                  ✘                  ✔                  
gdscript           None               None               ✔                  ✘                  ✔                  
git-attributes     None               None               ✔                  ✘                  ✘                  
git-commit         None               None               ✔                  ✘                  ✘                  
git-config         None               None               ✔                  ✘                  ✘                  
git-diff           None               None               ✔                  ✘                  ✘                  
git-ignore         None               None               ✔                  ✘                  ✘                  
git-rebase         None               None               ✔                  ✘                  ✘                  
gleam              ✘ gleam            None               ✔                  ✔                  ✘                  
glsl               None               None               ✔                  ✔                  ✔                  
go                 ✘ gopls            ✘ dlv              ✔                  ✔                  ✔                  
gomod              ✘ gopls            None               ✔                  ✘                  ✘                  
gowork             ✘ gopls            None               ✔                  ✘                  ✘                  
graphql            None               None               ✔                  ✘                  ✘                  
hare               None               None               ✔                  ✘                  ✔                  
haskell            ✘ haskell-langu…   None               ✔                  ✘                  ✘                  
hcl                ✘ terraform-ls     None               ✔                  ✘                  ✔                  
heex               None               None               ✔                  ✘                  ✘                  
html               ✘ vscode-html-l…   None               ✔                  ✘                  ✘                  
idris              ✘ idris2-lsp       None               ✘                  ✘                  ✘                  
iex                None               None               ✔                  ✘                  ✘                  
java               ✘ jdtls            None               ✔                  ✘                  ✘                  
javascript         ✘ typescript-la…   ✘                  ✔                  ✘                  ✔                  
jsdoc              None               None               ✔                  ✘                  ✘                  
json               ✘ vscode-json-l…   None               ✔                  ✘                  ✔                  
jsx                ✘ typescript-la…   None               ✔                  ✘                  ✔                  
julia              ✘ julia            None               ✔                  ✘                  ✘                  
kotlin             ✘ kotlin-langua…   None               ✔                  ✘                  ✘                  
latex              ✘ texlab           None               ✔                  ✘                  ✘                  
lean               ✘ lean             None               ✔                  ✘                  ✘                  
ledger             None               None               ✔                  ✘                  ✘                  
llvm               None               None               ✔                  ✔                  ✔                  
llvm-mir           None               None               ✔                  ✔                  ✔                  
llvm-mir-yaml      None               None               ✔                  ✘                  ✔                  
lua                ✘ lua-language-…   None               ✔                  ✘                  ✔                  
make               None               None               ✔                  ✘                  ✘                  
markdown           None               None               ✔                  ✘                  ✘                  
meson              None               None               ✔                  ✘                  ✔                  
mint               ✘ mint             None               ✘                  ✘                  ✘                  
nickel             ✘ nls              None               ✔                  ✘                  ✔                  
nix                ✘ rnix-lsp         None               ✔                  ✘                  ✔                  
nu                 None               None               ✔                  ✘                  ✘                  
ocaml              ✘ ocamllsp         None               ✔                  ✘                  ✔                  
ocaml-interface    ✘ ocamllsp         None               ✔                  ✘                  ✘                  
odin               None               None               ✔                  ✘                  ✘                  
openscad           ✘ openscad-lang…   None               ✔                  ✘                  ✘                  
org                None               None               ✔                  ✘                  ✘                  
perl               None               None               ✔                  ✔                  ✔                  
php                ✘ intelephense     None               ✔                  ✔                  ✔                  
prisma             ✘ prisma-langua…   None               ✔                  ✘                  ✘                  
prolog             ✘ swipl            None               ✘                  ✘                  ✘                  
protobuf           None               None               ✔                  ✘                  ✔                  
python             ✔ pylsp            None               ✔                  ✔                  ✘                  
r                  ✘ R                None               ✔                  ✘                  ✘                  
racket             ✘ racket           None               ✘                  ✘                  ✘                  
regex              None               None               ✔                  ✘                  ✘                  
rescript           ✘ rescript-lang…   None               ✔                  ✔                  ✘                  
rmarkdown          ✘ R                None               ✔                  ✘                  ✔                  
ron                None               None               ✔                  ✘                  ✔                  
ruby               ✘ solargraph       None               ✔                  ✔                  ✔                  
rust               ✔ rust-analyzer…   ✔ lldb-vscode      ✔                  ✔                  ✔                  
scala              ✘ metals           None               ✔                  ✘                  ✔                  
scheme             None               None               ✔                  ✘                  ✘                  
scss               ✘ vscode-css-la…   None               ✔                  ✘                  ✘                  
solidity           ✘ solc             None               ✔                  ✘                  ✘                  
sql                None               None               ✔                  ✘                  ✘                  
sshclientconfig    None               None               ✔                  ✘                  ✘                  
starlark           None               None               ✔                  ✔                  ✘                  
svelte             ✘ svelteserver     None               ✔                  ✘                  ✔                  
swift              ✘ sourcekit-lsp…   None               ✔                  ✘                  ✘                  
tablegen           None               None               ✔                  ✔                  ✔                  
tfvars             ✘ terraform-ls     None               ✘                  ✘                  ✘                  
toml               ✔ taplo            None               ✔                  ✘                  ✘                  
tsq                None               None               ✔                  ✘                  ✘                  
tsx                ✘ typescript-la…   None               ✔                  ✘                  ✘                  
twig               None               None               ✔                  ✘                  ✘                  
typescript         ✘ typescript-la…   None               ✔                  ✘                  ✔                  
ungrammar          None               None               ✔                  ✘                  ✘                  
v                  ✘ vls              None               ✔                  ✘                  ✘                  
vala               ✘ vala-language…   None               ✔                  ✘                  ✘                  
verilog            ✘ svlangserver     None               ✔                  ✔                  ✘                  
vue                ✘ vls              None               ✔                  ✘                  ✘                  
wgsl               ✘ wgsl_analyzer…   None               ✔                  ✘                  ✘                  
yaml               ✘ yaml-language…   None               ✔                  ✘                  ✔                  
zig                ✘ zls              None               ✔                  ✘                  ✔                  

Platform

PopOS linux-gnu

Terminal Emulator

alacritty 0.11.0-dev (63ef6c93)

Helix Version

helix 22.05 (19e51c8)

@thor314 thor314 added the C-bug Category: This is a bug label Jul 27, 2022
@the-mikedavis
Copy link
Member

The

[keys.normal]
C-/ = "toggle_comments" #nope

case is expected: that's invalid TOML.

It looks like the terminal or crossterm are a bit confused about the C-/. Using crossterm's event-read example:

Event: Key(KeyEvent { code: Char('/'), modifiers: NONE })
Event: Key(KeyEvent { code: Char('7'), modifiers: CONTROL })

It's interpreted as C-7 🤔

I think this falls under #1085

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants