-
-
Notifications
You must be signed in to change notification settings - Fork 452
Description
Describe the issue
Hi! First, thanks for the great tech! CodeMirror is exactly what I needed for my project.
But I stumbled upon an issue while combining autocompletion with lsp-client : it seems that the regexp for tab stops here :
while (m = /[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(line)) {does not handle "simple" tab stops like $1, $0, etc, as defined in the LSP specification. These are heavily used in rust-analyzer, for instance. My workaround is to intercept the messages and convert all $n formatted tab stops into ${}, but it feels a bit hacky and it would probably be best handled in the regexp I linked.
The other issue is that the spec defines $0 as the last tab stop, and it looks like the code would handle it as the first (${0} does that)
I'd like to help, though, but was not sure if this support was not included for a specific reason. If there isn't, I'd gladly submit a PR and give back to the community. Just let me know :)
Browser and platform
No response
Reproduction link
No response