Add solidity support to nvim

pull/2/head
Ensar Sarajčić 2021-10-19 10:03:52 +02:00
parent 46d03f9b13
commit 7cb1f435a0
3 changed files with 21 additions and 1 deletions

View File

@ -51,4 +51,23 @@ case $SERVER in
tar -xf /tmp/hls.tar.gz -C $HOME/lsp/haskell/hls
chmod +x $HOME/lsp/haskell/hls/*
;;
solang)
if [ -z "$VERSION" ]; then
VERSION="v0.1.8"
fi
case $UNAME in
Linux)
FILE_NAME="solang-linux"
;;
Windows)
FILE_NAME="solang.exe"
;;
Darwin)
FILE_NAME="solang-mac-intel"
;;
esac
mkdir -p $HOME/lsp/solidity/solang
wget -O - https://github.com/hyperledger-labs/solang/releases/download/$VERSION/$FILE_NAME > $HOME/lsp/solidity/solang/solang
chmod +x $HOME/lsp/solidity/solang/solang
;;
esac

View File

@ -0,0 +1 @@
set -gx PATH $PATH $HOME/lsp/solidity/solang

View File

@ -8,7 +8,7 @@ local common_config = require("lsp.server_config")
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
-- Lsp default language servers
local servers = { "bashls", "clangd", "cucumber_language_server", "crystalline", "dockerls", "jsonls", "hls", "pyright", "rust_analyzer", "kotlin_language_server", "mint", "vimls", "clojure_lsp", "gopls", "gdscript", "terraformls", "tsserver" }
local servers = { "bashls", "clangd", "cucumber_language_server", "crystalline", "dockerls", "jsonls", "hls", "pyright", "rust_analyzer", "kotlin_language_server", "mint", "vimls", "clojure_lsp", "gopls", "gdscript", "solang", "terraformls", "tsserver" }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = common_config.on_attach,