Vscode-neovim: Set extensionKind to ["ui", "workspace"]

Created on 12 Jan 2020  路  13Comments  路  Source: asvetliakov/vscode-neovim

As it stands, it's not possible to use the extension in Remote WSL, because the extensionKind is set only to ui. I believe, the correct setting would be ui, workspace.

Point is, I'm trying to set up a remote WSL session and it won't let me install it inside WSL, which is something you mentioned in another issue that we should be doing.

question

All 13 comments

Nope. Don't set workspace extensionKind. It will be slow with remote extension host.

To use WSL neovim, set useWSL to true and specify wsl (linux) path to neovim

Does this apply to WSL 2, too? When I try setting it up with the linux path to my nvim.appimage, nothing happens. I don't see any errors, nothing in the logs, basically just nothing at all.

Here's the relevant section from my config file. I'd love to help debug it, if I can.

    "vscode-neovim.neovimPath": "/home/dany/nvim.appimage",
    "vscode-neovim.useWSL": true

Does this apply to WSL 2, too?

Yes, i'm using neovim installed in WSL 2 ArchLinux, but not through the appimage

Dumb question, but did you reload vscode after setting the config?

yep, I did. Let me try and get a non-appimage version.

I just tried appimage version - works for me after installing required deps (libfuse and may be something else) and chmod +x nvim.appimage

sudo pacman -S fuse3 libappimage fixes it for me (for archlinux)

Try to run appimage through the terminal and see if it works

ya, it's happily loading. Just to be sure, it should be sitting in the user config, right? Or any other one of them?

Is there any kind of log I could see what's going on?

running this from command line works perfectly fine, btw:

wsl /home/dany/nvim.appimage

Just to be sure, it should be sitting in the user config, right? Or any other one of them?

Can be in other config i think, but non-user configs haven't been tested

Is there any kind of log I could see what's going on?

Not yet. Check in developer tools if you see any exception - vscode also usually displays notification if the initialization throws

I'd suggest to try non-appimage version then

I'll have to debug it next weekend or so, going on a business trip next week. I'll keep you posted, once I figure it out.

Ok, I know what's the problem. The command for launching in nvim is bash-specific and therefore it fails to create a process. Or, more precisely, the process dies almost immediately after being created, because it doesn't actually spawn nvim.

https://github.com/asvetliakov/vscode-neovim/blob/21ba0eb0ac483f45d73fb1333e46ae3178e4448d/src/controller.ts#L267

This line does a $(wslpath 'c:\blabla'). But that code doesn't work in fish, which is my default shell. So we should probably either start nvim inside of a bash, or somehow make the path resolution shell-agnostic.

Sorry to cause trouble.

Oh yeah, thank you for the investigation, i'll create separate issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zeljkofilipin picture zeljkofilipin  路  3Comments

ppwwyyxx picture ppwwyyxx  路  4Comments

hholst80 picture hholst80  路  3Comments

albert-ying picture albert-ying  路  4Comments

DrakeXiang picture DrakeXiang  路  4Comments