r/vim • • 5d ago

Plugin vim9ls -- language server for vim9

https://github.com/h-east/vim9ls

Works with the latest vim master branch (or latest windows build from https://github.com/vim/vim-win32-installer/).

Looks pretty good so far combined with https://github.com/h-east/lsp.vim

21 Upvotes

10 comments sorted by

View all comments

0

u/Desperate_Cold6274 4d ago

I am giving it a shot right now. If I can give first a honest feedback, I don't really buy the distribution model. The LS should be distributed separately and should not be entangled to a Vim plugin.

3

u/habamax 4d ago

LS here is a combination of the same vim (in a separate process) and some harness in form of a vim plugin. Pretty convenient I would say, no external compilable dependencies.

0

u/Desperate_Cold6274 4d ago

Ok, I don't know what is inside the .cmd file, but as the author wrote is the LS itself (not the harness) entirely written in Vim9? I.e. the .cmd run another Vim process?

1

u/habamax 4d ago

Yes it is written entirely in vim9 (well, I don't know what is in those cmd files, if you use author's lsp client then they are not needed)

2

u/habamax 4d ago

1

u/Desperate_Cold6274 4d ago

Aha I see. It seems that the entire LS has been developed in "$here/../autoload/vim9ls.vim". That is cool. Issue is that respect to standard LS, this one require to have Vim installed. If we take e.g. pyright, clangd, etc. they don't require any specific tool installed. What if I want to edit a .vim file through VS Code and I don't have Vim installed? :)

Btw, I see that we are getting downvoted for some weird reason.

2

u/habamax 4d ago

For java LS you need the whole jdk installed (or more if it is eclipse based one), for pylsp you need python to be installed where pylsp is a ... package written in python and you essentially do pip install pylsp[all].

In your case with vs code you can install the other LS written in golang. (I end up not using it, was getting in my way more than I wanted)