justinmk / vim-sneak

The missing motion for Vim :athletic_shoe:
http://www.vim.org/scripts/script.php?script_id=4809
MIT License
3.26k stars 88 forks source link

Add support for `vscode-neovim` #284

Closed searleser97 closed 3 years ago

searleser97 commented 3 years ago

Context

  1. vscode-neovim does not support conceal properly when highlighting for now, therefore, when using let g:sneak#label = 1 the labels were not shown as expected, instead, the first character of the match is shown always.
  2. vscode-neovim supports text decorations to be shown on top of existing text with the option "vscode-neovim.textDecorationsAtTop": true in vscode's settings.json
  3. easymotion plugin had a similar issue that was solved using textDecorations for vscode. See https://github.com/asvetliakov/vscode-neovim#vim-easymotion and commit adding text decorations

https://user-images.githubusercontent.com/5056411/136433077-53bd524c-09e1-49fd-ba71-10d9e5ffbda6.mp4

note 1: all the labels have the same key on them note 2: you can see the key strokes on the status line at the bottom

What does this PR do?

It adds support for vscode-neovim by adding text-decorations just when the user is in vscode

Evidence

https://user-images.githubusercontent.com/5056411/136434014-5f5ad353-11f3-4c18-b4a5-e1008d4f63de.mp4

justinmk commented 3 years ago

Thank you very much for the effort. But this is out of scope.

  1. vscode-neovim does not support conceal properly when highlighting for now,

Needs to be fixed in vscode-neovim (and any other Nvim UI). Nvim has a UI protocol. If there is something lacking the UI protocol then we need to think about that.

3. easymotion plugin had a similar issue that was solved using textDecorations for vscode.

easymotion has all kinds of random bloat that will not be added to vim-sneak.