You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some snippets already work well, but I noticed that when auto-filling the arms of a match, the placeholders don't get parsed properly.
For example, for the following completing the match arms in this code
let test = Some(42);match test {}
using the Fill match arms action results in this code:
let test = Some(42);match test {Some(${1:_}) => ${2:todo!()},None => ${3:todo!()},}
It would be great if these placeholders were parsed such that the actual placeholder values are inserted (in this example _, todo!(), and todo!()) and navigation between these is possible (<c-j> and <c-k> using the default mappings).
I took a brief look at the code and it seems that the snippets which are currently not working are parsed in commands.ts:parseSnippet. The working snippets (e.g. the ile postfix snipped) don't seem to be parsed in this function, but I have not yet found out how they are handled. Since those work, there presumably is a working implementation somewhere already.
What's the output of :CocInfo
## versions
vim version: NVIM v0.10.2
node version: v23.1.0
coc.nvim version: 0.0.82-28ad86db 2024-12-07 14:40:45 +0800
coc.nvim directory: ~/.local/share/nvim/lazy/coc.nvim
term: xterm-kitty
platform: linux
## Log of coc.nvim
2024-12-11T00:58:31.435 INFO (pid:69983) [extension:coc-git] - Looking for git in: git
2024-12-11T00:58:31.669 INFO (pid:69983) [plugin] - coc.nvim initialized with node: v23.1.0 after 419
2024-12-11T00:58:31.670 INFO (pid:69983) [services] - LanguageClient Rust Analyzer Language Server state change: stopped => starting
2024-12-11T00:58:31.671 INFO (pid:69983) [attach] - receive notification: highlight []
2024-12-11T00:58:31.680 INFO (pid:69983) [language-client-index] - Language server "rust-analyzer" started with 70007
2024-12-11T00:58:31.729 INFO (pid:69983) [services] - LanguageClient Rust Analyzer Language Server state change: starting => running
2024-12-11T00:58:31.759 INFO (pid:69983) [services] - service rust-analyzer started
2024-12-11T00:58:32.676 INFO (pid:69983) [attach] - receive notification: highlight []
2024-12-11T00:58:33.618 INFO (pid:69983) [attach] - Request action: diagnosticList []
2024-12-11T00:58:34.166 INFO (pid:69983) [attach] - receive notification: highlight []
2024-12-11T00:58:34.314 INFO (pid:69983) [attach] - Request action: diagnosticList []
2024-12-11T00:58:35.003 INFO (pid:69983) [attach] - receive notification: codeAction [ 'cursor' ]
2024-12-11T00:58:35.324 INFO (pid:69983) [attach] - receive notification: highlight []
2024-12-11T00:58:39.645 INFO (pid:69983) [attach] - Request action: diagnosticList []
2024-12-11T00:58:40.946 INFO (pid:69983) [attach] - receive notification: highlight []
2024-12-11T00:58:44.680 INFO (pid:69983) [attach] - receive notification: showInfo []
What's the output of :CocCommand rust-analyzer.serverVersion
rust-analyzer 0.3.2212-standalone
What's your coc-rust-analyzer version? You can get it from :CocList extensions
0.77.5 (also tested locally on the latest commit (4283825)
The text was updated successfully, but these errors were encountered:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax
Some snippets already work well, but I noticed that when auto-filling the arms of a
match
, the placeholders don't get parsed properly.For example, for the following completing the
match
arms in this codeusing the
Fill match arms
action results in this code:It would be great if these placeholders were parsed such that the actual placeholder values are inserted (in this example
_
,todo!()
, andtodo!()
) and navigation between these is possible (<c-j>
and<c-k>
using the default mappings).I took a brief look at the code and it seems that the snippets which are currently not working are parsed in
commands.ts:parseSnippet
. The working snippets (e.g. theile
postfix snipped) don't seem to be parsed in this function, but I have not yet found out how they are handled. Since those work, there presumably is a working implementation somewhere already.What's the output of
:CocInfo
What's the output of
:CocCommand rust-analyzer.serverVersion
rust-analyzer 0.3.2212-standalone
What's your coc-rust-analyzer version? You can get it from
:CocList extensions
0.77.5
(also tested locally on the latest commit (4283825)The text was updated successfully, but these errors were encountered: