Sublime Forum

How to install language server for dockerfile

#1

hi,
I installed this plugin for ST3 and the LSP server

and started the server on my local machine with docker-langserver --stdio, then restarted ST

Created a new Dockerfile but nothing happens. The default settings contain this line:

"command": ["${node_bin}", "${server_path}", "--stdio"],

am i supposed to edit these variables? The binaries are in my path. On “set syntax” i have 3 options for Dockerfile, not sure which one to pick.

0 Likes

#2

Did you also install the base LSP package? There is no need to start these language servers manually.

1 Like

#3

I did not. The documentation guides me directly to the language specific install steps:

Step 1: Find a server for the language of your choice in the list of language servers and follow its setup instructions.

It probably won’t hurt installing the base package as well.

0 Likes

#4

It is working now. Probably had to set the paths in the settings:

// Settings in here override those in "LSP-dockerfile/LSP-dockerfile.sublime-settings"
{
  "command": ["/usr/bin/node", "/usr/local/bin/docker-langserver", "--stdio"],
}
0 Likes

#5

It shouldn’t be necessary to have to adjust that command. LSP-dockerfile will auto-install the necessary server files in $CACHE/Package Storage. And ${node_bin} is by default node, which seems to be in your $PATH.

1 Like

#6

it wasn’t immediately obvious when it started working. I restarted ST and swapped the syntax multiple times.

i removed the user setting and restarted ST, still working.

1 Like