vscode-neovim
vscode-neovim copied to clipboard
Rendering random characters
Random characters are sometimes rendered in place of true characters (the code is still correct when I run it, but doesn't display correctly). If I highlight the wrongly displayed characters and then unhighlight, the error corrects itself. It's really random when it happens and I don't know how best to reproduce it. However, this has happened on two of my machines running Windows 10 and 11.
Rendered wrong:
True text:

Rendered wrong:
True text:

- VS Code Version:
1.68.1
30d9c6cd9483b2cc586687151bcbcd635f373630
x64
-VSCode Neovim Version: v0.0.87
- OS Version:
Edition Windows 10 Pro
Version 21H2
Installed on 3/19/2021
OS build 19044.1766
Experience Windows Feature Experience Pack 120.2212.4180.0
Steps to Reproduce:
- Open a python file in VS Code with the "VSCode Neovim" extension
- Write code for a while, then random characters will be rendered in place of true characters.
https://github.com/microsoft/vscode/issues/154565
I think this is caused by bugs in the extmark-overlay PR.
For reference, having the same issue with VS Code version:
1.69.1
b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a
x64
Possible duplicate of #966
I also do have some strange behavior. VSCode: v1.69.2 VSCode Neovim: v0.0.88
When i'm in normal mode, everything is fine

When i start entering text, a charcter is shown in front of the cursor (Sometimes it also replaces the closing bracket and added another bracket)

Same occurs when undoing sometimes:
`ci{`
`
EDIT: I've reverted to version 0.0.84 and don't see this issue there.
not sure whether it's related, but I still have the messed up display even in version 0.0.85
this sometimes happens in visual mode:

Yeah I've had to go back to a higher version as well (since in 0.0.84 the visual mode doesn't work nicely) and there the random characters come back, which makes it kind of unusable since it includes quotes etc., so you're never really sure what the state of the buffer is.
This is what it looks when i go to input mode and enter "//some comment" Version v0.0.89

I don't have this behavior when i'm using version v0.0.84
I have graphical glitches happening when doing %s/foo/bar replace and then undo the change. Has happened in other scenarios as well, but don't remember what they are anymore.
Verified that this issue isn't there with v0.0.84 and it is there with v.0.0.85
EDIT: Example of this happening:
What it should look like:

Can confirm the behavior same as @erlais, see the attached screenshot, I have an extra 1 appearing to the left 16 corresponding to num_nodes, the glitch goes away if I go down to v0.0.84
the characters go away if I run the no-highlight command (:noh)
hi @theol0403, @windwp
I reverted the changes from #868 and it resolves the rendering issues I was facing, of course this makes lightspeed unusable with vscode. I have a fork which has the reverted changes, do you have any suggestions on how can I go about fixing this properly?
I still can't reproduce this issue. it will better if someone can send a file and a specify step to reproduce you can try this PR #1075 but i am not sure.
Hi, I am experiencing this issue as well with Version 1.73 of VSCode and neovim v0.8.0 My vscode-neovim plugin page states 'last modified: 08/11/2022, 08:07:47' (I could not figure out how to get the version number for the plugin)
- When I disable all plugins (except vscode-neovim) and set the
init.luaconfig path toNONEthen I do not experience the issue. - When I enable all plugins (except vscode-neovim) and still have the config path to
NONEI still do not experience this issue. (even with multiple linters installed, like Prettier, and markdownlint when editing markdown files) - When I introduce my config
init.luawithout any extensions; I begin to experience the issue (albeit less frequently than when I have vscode linting plugins andinit.luaenabled). - after removing all
autocmds and almost all keymaps (some of them with<c-...>do not like running inside vscode) the issue is pretty much gone.
So, I think it is most likely issues in the users init.lua. (Maybe this answer will help someone experiencing this issue as well.)
I also find that the vscode-neovim performs much worse in general when my config is loaded (even with most things removed)
Narrowing down what options need to be excluded with if vim.g.vscode then ... is quite a process if you already had a beefy init.lua and I think I need to work through my config again with the setup guide in the README and try to use VSCodeCall/VSCodeNotify as recommended.
In case this is still considered a bug (doubt)
Here is a file that I was testing with. It mostly happens when changing between modes and doing short inserts and quick movements around syntax elements like -, ##, 1. etc. and the issue is worse with larger files, and files with more syntax elements like code files.
# Lorem Ipsum
Velit quibusdam sint eos dolores ab iure. Dolorem nulla vitae et qui id. Voluptas unde rerum ipsam est doloribus eum ducimus. Nam fuga optio quo labore occaecati vel sint vel.
> Dolor quia vero voluptate ad illum dicta iste minus. Doloremque adipisci ut et porro illo suscipit. Omnis quod voluptatum dignissimos illum doloribus quasi reiciendis voluptatem. Et facilis iste quasi.
Ipsum aut sed tempora doloribus aut.
Nisi corporis nobis magnam quis molestias nemo.
Sed labore enim aperiam.
Repellat et enim earum cumque.
- Eos sint est corrupti consequatur blanditiis quasi est nam.
- Voluptate aut quas adipisci rerum.
- Aut cupiditate consequatur soluta dignissimos et laudantium.
- Velit aspernatur aut voluptates veritatis sunt quo.
- Eveniet reprehenderit vel cum quis.
- Earum ex distinctio veniam.
## Hic sit excepturi officiis
Quas dolor qui cupiditate adipisci odio culpa quod.
Numquam consequatur labore deserunt sed.
Illum dolorem omnis aut eos voluptas et sapiente.
Voluptas perferendis omnis consequatur facilis magnam quaerat corporis.
Fuga esse aliquid nostrum dolores dolorem culpa et vel.
\```text
Non asperiores placeat ipsam.
Nisi sapiente et minus a et.
Modi voluptates in ratione.
Ut sit tempore officiis doloribus distinctio id.
Dolorem numquam nobis atque.
\```
Non eaque ut et unde quibusdam iure totam.
1. Aut vero dignissimos laborum facilis aut quo corrupti.
1. Expedita quis in et aut explicabo temporibus aut et.
1. Corporis aliquid qui dolorem eos veritatis.
1. Et nemo dolores consequatur et excepturi expedita cupiditate fugit.
Dolores voluptatem reprehenderit necessitatibus dolorem sunt officia assumenda.
Voluptatibus non consequatur rem nostrum.
Voluptatem et nihil ut et dolore modi veritatis consequuntur.
Vel[^Vel] exercitationem dignissimos numquam pariatur magni quae et.
Unde ea autem vitae.
Nisi labore qui et dolores.
Quo necessitatibus quas voluptas sint sint et sit quasi.
Voluptatem ut est est neque quia eaque.
[^Vel] : Velit quibusdam sint eos dolores ab iure. Dolorem nulla vitae et qui id. Voluptas unde rerum ipsam est doloribus eum ducimus. Nam fuga optio quo labore occaecati vel sint vel.
hi @windwp , here is a series of steps to reproduce, I am listing out the steps I did:
- Clone and setup the latest vscode neovim, I followed the instructions here.
- Open the repo in VSCode, go to debug view and click
Run Extension (F5). - Create a file with the following code:
import argparse
import logging
logging.basicConfig(level=logging.INFO)
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--yolo", type="str", required=True)
args = parser.parse_args()
logging.info("this is a dummy test program which pipes your message")
logging.info(args.yolo)
if __name__ == "__main__":
main()
- Replace the
yoloin file withsomethingusing the command%s/yolo/somethingin vim command line. - Undo the modification.
- You will see a garbage character like the one in the image below:

I still can't reproduce this issue. it will better if someone can send a file and a specify step to reproduce you can try this PR #1075 but i am not sure.
@windwp I can confirm that your fix in #1075 works for me.
@abhiskk I cannot reproduce with your steps. Are you on latest version of nvim?
Yes, I am on the latest version of nvim on mac-osx
I can reproduce it . #1075 will fix that.
I'm still seeing this as an issue over time. I was able to trigger it once when using u but have not found a perfect reprod as of yet.
@CRSBMW Need stable reproduction method and screen recording
Yeah I've been trying to find one. I have a hunch its related to errorlens but a stable reproduction is very difficult. I will keep looking to see if I can find something thats at least not entirely random
@CRSBMW If you have a reproduction method or a screenshot of the problem, please open a new issue
@xiyaowong Seems quite reproducible with Rust Analyzer on. It's impossible to code rust in VSCode with NeoVim mode installed. It's specially bad when you start using o , O, cw and moving things around while in normal mode.
In the example below I create a new line (o) then delete it (dd).
@caiotoon Please open a new issue, I never encountered this while using rust-analyzer. Probably related to #1624 ?
I have had this happen to me when I setup neovim with kickstart. I hadn't modified kickstart base init.lua. Removed kickstart and it started looking fine. Is there anyway to get it working without having to remove kickstart?
@ayappaP No! Please do not use any community config when using vscode-neovim. These configs contain too many plugins and options. In fact, in vscode-neovim, you don't need any config, usually you just need mappings.