VonHeikemen / lsp-zero.nvim

A starting point to setup some lsp related features in neovim.
https://lsp-zero.netlify.app/v4.x/
MIT License
3.75k stars 95 forks source link

Missing `curl` requirement #329

Closed griloHBG closed 11 months ago

griloHBG commented 11 months ago

Hi all!

I was following the tutorial https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/tutorial.md from within an Alpine container (version 3.18.3 - using tag latest).

Here is my humble Dockerfile, built and tagged as alpine-nvim-lsp-zero-test:

Dockerfile

``` FROM alpine:latest RUN apk update && apk add \ curl \ git \ neovim \ neovim-doc RUN adduser -D --uid 1000 user && \ chmod o-rx /home/user USER user WORKDIR /home/user ```

It was launched like this (the bind mount helps me to keep the configuration between l[a]unches :stuck_out_tongue_closed_eyes: ):

docker run --rm -it -v /home/<user>/lsp-zero-test/:/home/user/ alpine-nvim-lsp-zero-test:latest

Then at this specific point:

Now you will have access to a command called :LspInstall. If you execute that command while you have a file opened mason-lspconfig.nvim will suggest a language server compatible with that type of file. Note that after you install a language server you need to restart Neovim so it can be configured properly.

Mason couldn't fetch the registry:

image

After adding curl to the Dockerfile, I was able to perform the LSP installation:

updated Dockerfile

``` FROM alpine:latest RUN apk update && apk add \ curl \ git \ neovim \ neovim-doc RUN adduser -D --uid 1000 user && \ chmod o-rx /home/user USER user WORKDIR /home/user ```

image

So I think curl is missing as a requirement in this tutorial (https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/tutorial.md#requirements).

And thanks for the great tool and tutorial(s)!

griloHBG commented 11 months ago

Btw, seems like bash is a requirement for lua_ls... Although might be on the LSP side, since it is referenced on the tutorial, I think the tip about its need would make sense.

VonHeikemen commented 11 months ago

Fair enough. I've added a link to mason.nvim's requirements to the tutorial.