Add solidity support to nvim
parent
46d03f9b13
commit
7cb1f435a0
|
@ -51,4 +51,23 @@ case $SERVER in
|
||||||
tar -xf /tmp/hls.tar.gz -C $HOME/lsp/haskell/hls
|
tar -xf /tmp/hls.tar.gz -C $HOME/lsp/haskell/hls
|
||||||
chmod +x $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
|
esac
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
set -gx PATH $PATH $HOME/lsp/solidity/solang
|
|
@ -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())
|
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
|
|
||||||
-- Lsp default language servers
|
-- 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
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup {
|
lspconfig[lsp].setup {
|
||||||
on_attach = common_config.on_attach,
|
on_attach = common_config.on_attach,
|
||||||
|
|
Loading…
Reference in New Issue