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

Language injections might block access to the file #48

Open
CertainLach opened this issue Jan 8, 2024 · 1 comment
Open

Language injections might block access to the file #48

CertainLach opened this issue Jan 8, 2024 · 1 comment

Comments

@CertainLach
Copy link

Having a following fragment in the file:

[
  #"alpha=https://[${fleet.alpha.services.fleetKubernetes.externalIp}]:2380"
  "beta=https://[${fleet.beta.services.fleetKubernetes.externalIp}]:2380"
]

(Etcd peer list, where the first entry is commented)

Causes neovim to be stuck in loop with E79: Cannot expand wildcards; Press ENTER or type command to continue every time the file is changed, making it impossible to do anything without disabled highlight (:TSDisable highlight), except quitting vim via hard reset, caused by "alpha=https://[${fleet.alpha.services.fleetKubernetes.externalIp}]:2380" being interpreted as language name, and trying to find matching parser:

Executing command: "vimglob() { while [ $# -ge 1 ]; do echo "$1"; shift; done }; vimglob >/tmp/nvim.lach/C9dClA/41 /nix/store/b9c39jpv0pciszc2bsjw72yjvgyk58ig-vim-pack-dir/pack/myNeovimPackages/start/rainbow-delimiters.nvim/parser/#\"alpha=https://[${fleet.alpha.services.fleetKubernetes.externalIp}]:2380\".*"


E79: Cannot expand wildcards

Executing command: "vimglob() { while [ $# -ge 1 ]; do echo "$1"; shift; done }; vimglob >/tmp/nvim.lach/C9dClA/42 /nix/store/b9c39jpv0pciszc2bsjw72yjvgyk58ig-vim-pack-dir/pack/myNeovimPackages/start/rust-tools.nvim/parser/#\"alpha=https://[${fleet.alpha.services.fleetKubernetes.externalIp}]:2380\".*"


E79: Cannot expand wildcards

Executing command: "vimglob() { while [ $# -ge 1 ]; do echo "$1"; shift; done }; vimglob >/tmp/nvim.lach/C9dClA/43 /nix/store/b9c39jpv0pciszc2bsjw72yjvgyk58ig-vim-pack-dir/pack/myNeovimPackages/start/telescope-manix/parser/#\"alpha=https://[${fleet.alpha.services.fleetKubernetes.externalIp}]:2380\".*"


E79: Cannot expand wildcards

Executing command: "vimglob() { while [ $# -ge 1 ]; do echo "$1"; shift; done }; vimglob >/tmp/nvim.lach/C9dClA/44 /nix/store/b9c39jpv0pciszc2bsjw72yjvgyk58ig-vim-pack-dir/pack/myNeovimPackages/start/telescope-symbols.nvim/parser/#\"alpha=https://[${fleet.alpha.services.fleetKubernetes.externalIp}]:2380\".*"


E79: Cannot expand wildcards

I'm not sure who is responsible for escaping glob here, might escalate this issue to neovim itself, but for this grammar plugin, maybe not every comment should be parsed as language identifier?
https://github.com/nix-community/tree-sitter-nix/blob/master/queries/injections.scm#L2

@CertainLach
Copy link
Author

CertainLach commented Jan 23, 2024

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

No branches or pull requests

1 participant