Skip to content

[POC] Support installing the server with custom version #425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion autoload/lsp_settings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,14 @@ function! s:vim_lsp_installer(ft, ...) abort
if l:missing !=# 0
continue
endif

if lsp_settings#executable(l:command)
return [l:conf.command, l:command]
let l:version = lsp_settings#get(l:conf.command, 'version', '')
return [l:conf.command, l:command . ' ' . l:version]
endif

endfor

return [v:false] " placeholder, so that empty() returns false, but len() < 2 returns true
endfunction

Expand Down
2 changes: 1 addition & 1 deletion installer/install-clojure-lsp.cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off

setlocal
set VERSION=2021.02.01-20.37.52
set VERSION=%1:-2021.02.01-20.37.52%
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea if this works, I used this tool to convert a bash expression to a bat one haha

curl -L -o clojure-lsp.cmd https://github.com/clojure-lsp/clojure-lsp/releases/download/%VERSION%/clojure-lsp
2 changes: 1 addition & 1 deletion installer/install-clojure-lsp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -e

version="2021.02.01-20.37.52"
version=${1:-"2021.02.01-20.37.52"}
curl -L -o clojure-lsp "https://github.com/clojure-lsp/clojure-lsp/releases/download/$version/clojure-lsp"
chmod +x clojure-lsp
2 changes: 1 addition & 1 deletion installer/install-elixir-ls.cmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off

setlocal
set VERSION=0.6.2
set VERSION=%1:-0.6.2
curl -L -o elixir-ls.zip "https://github.com/elixir-lsp/elixir-ls/releases/download/v%VERSION%/elixir-ls.zip"
call "%~dp0\run_unzip.cmd" elixir-ls.zip
del elixir-ls.zip
Expand Down
2 changes: 1 addition & 1 deletion installer/install-elixir-ls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

version="v0.6.2"
version=${1:-"v0.6.2"}
url="https://github.com/elixir-lsp/elixir-ls/releases/download/$version/elixir-ls.zip"
curl -LO "$url"
unzip elixir-ls.zip
Expand Down