aboutsummaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2020-01-30 19:38:15 +0900
committerGitHub <noreply@github.com>2020-01-30 19:38:15 +0900
commitaa6f3bf0bfca99bff420460b7aca759d4db8b293 (patch)
treee095068b4c094607224de620ba8ebf5a01f79189 /installer
parent45cc9231a106eda4fcbf22e9590397a7d2cce1c3 (diff)
parent5600aedecf0d1c216ef81623f8983837685b15cb (diff)
downloadvim-lsp-settings-aa6f3bf0bfca99bff420460b7aca759d4db8b293.tar.gz
vim-lsp-settings-aa6f3bf0bfca99bff420460b7aca759d4db8b293.tar.bz2
vim-lsp-settings-aa6f3bf0bfca99bff420460b7aca759d4db8b293.zip
Merge pull request #120 from xuanduc987/fsautocomplete
add fsautocomplete for fsharp
Diffstat (limited to 'installer')
-rw-r--r--installer/install-fsautocomplete.cmd18
-rwxr-xr-xinstaller/install-fsautocomplete.sh27
2 files changed, 45 insertions, 0 deletions
diff --git a/installer/install-fsautocomplete.cmd b/installer/install-fsautocomplete.cmd
new file mode 100644
index 0000000..9403345
--- /dev/null
+++ b/installer/install-fsautocomplete.cmd
@@ -0,0 +1,18 @@
+@echo off
+
+setlocal
+
+curl -L -o dotnet-runtime-3.1.1-win-x64.zip "https://download.visualstudio.microsoft.com/download/pr/d9768135-4646-4839-9eea-b404bb940452/8275e4320514bab636b1627c62906ef9/dotnet-runtime-3.1.1-win-x64.zip"
+call "%~dp0\run_unzip.cmd" dotnet-runtime-3.1.1-win-x64.zip
+
+set url=https://ci.appveyor.com/api/projects/fsautocomplete/fsautocomplete/artifacts/bin/pkgs/fsautocomplete.netcore.zip?branch=master
+
+set zip=fsautocomplete.zip
+curl -L %url% -o %zip%
+call "%~dp0\run_unzip.cmd" %zip%
+
+echo @echo off ^
+
+%%~dp0\dotnet.exe fsautocomplete.dll %%* ^
+
+> fsautocomplete.cmd
diff --git a/installer/install-fsautocomplete.sh b/installer/install-fsautocomplete.sh
new file mode 100755
index 0000000..e19d2e8
--- /dev/null
+++ b/installer/install-fsautocomplete.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+set -e
+
+if command -v dotnet >/dev/null 2>&1; then
+ echo "dotnet installed"
+ dotnetcmd=dotnet
+else
+ echo "dotnet not found, installing..."
+ # REF https://github.com/neovim/nvim-lsp/blob/master/lua/nvim_lsp/pyls_ms.lua
+ curl -L https://dot.net/v1/dotnet-install.sh | bash -s -- -i "./.dotnet"
+ dotnetcmd="\\$DIR/.dotnet/dotnet"
+fi
+
+url="https://ci.appveyor.com/api/projects/fsautocomplete/fsautocomplete/artifacts/bin/pkgs/fsautocomplete.netcore.zip?branch=master"
+zip=fsautocomplete.zip
+curl -L "$url" -o "$zip"
+unzip -o -d "fsautocomplete.netcore" "$zip"
+
+cat <<EOF >fsautocomplete
+#!/bin/sh
+
+DIR=\$(cd \$(dirname \$0); pwd)
+$dotnetcmd \$DIR/fsautocomplete.netcore/fsautocomplete.dll
+EOF
+
+chmod +x fsautocomplete