Created
February 2, 2022 23:22
-
-
Save joeljuca/bc22aae1a522eb06c6299e8542849790 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# #!/usr/bin/env sh | |
# https://dragoshmocrii.com/fix-vscode-elixirls-intellisense-for-code-imported-with-use/ | |
function elixirls_update() { | |
if ! ls "${HOME}/.vscode/extensions" | grep "^jakebecker.elixir-ls"; then | |
echo "Aborting operation - extension not installed." | |
else | |
local extension_dirname="$(ls -1 ${HOME}/.vscode/extensions | grep '^jakebecker.elixir-ls' | head -n 1)" | |
local extension_dir="${HOME}/.vscode/extensions/${extension_dirname}" | |
local extension_release_dir="${extension_dir}/elixir-ls-release" | |
# local download_dirname="$(head /dev/random | md5 | cut -c 1-8)" | |
# local download_dir="${extension_dir}/elixir-ls-${download_dirname}" | |
local download_dir="$(mktemp -d)" | |
# mkdir -p $download_dir | |
wget -P "${download_dir}" "https://github.com/elixir-lsp/elixir-ls/releases/download/v0.8.1/elixir-ls.zip" | |
# unzip "${download_dir}/elixir-ls.zip" | |
# Remove download directories | |
ls -lha $extension_dir/elixir-ls-* | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment