diff options
| author | LW <git@llllvvuu.dev> | 2023-09-22 17:00:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-23 08:00:51 +0800 |
| commit | ff5bc0e98cbf586fa9b878da43e3eebf40f879b6 (patch) | |
| tree | 2f7e8eda9b241db089a7bc122607b1994f68e9fe /lua | |
| parent | fix: remove usages of private (now deprecated) functions (#2822) (diff) | |
| download | nvim-lspconfig-ff5bc0e98cbf586fa9b878da43e3eebf40f879b6.tar nvim-lspconfig-ff5bc0e98cbf586fa9b878da43e3eebf40f879b6.tar.gz nvim-lspconfig-ff5bc0e98cbf586fa9b878da43e3eebf40f879b6.tar.bz2 nvim-lspconfig-ff5bc0e98cbf586fa9b878da43e3eebf40f879b6.tar.lz nvim-lspconfig-ff5bc0e98cbf586fa9b878da43e3eebf40f879b6.tar.xz nvim-lspconfig-ff5bc0e98cbf586fa9b878da43e3eebf40f879b6.tar.zst nvim-lspconfig-ff5bc0e98cbf586fa9b878da43e3eebf40f879b6.zip | |
feat(solidity_ls_nomicfoundation): add single_file_support and supported frameworks (#2724)
All are supported according to the LSP's documentation.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/solidity_ls_nomicfoundation.lua | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lua/lspconfig/server_configurations/solidity_ls_nomicfoundation.lua b/lua/lspconfig/server_configurations/solidity_ls_nomicfoundation.lua index 45261432..78ca720b 100644 --- a/lua/lspconfig/server_configurations/solidity_ls_nomicfoundation.lua +++ b/lua/lspconfig/server_configurations/solidity_ls_nomicfoundation.lua @@ -1,21 +1,36 @@ local util = require 'lspconfig.util' +local root_files = { + 'hardhat.config.js', + 'hardhat.config.ts', + 'foundry.toml', + 'remappings.txt', + 'truffle.js', + 'truffle-config.js', + 'ape-config.yaml', +} + return { default_config = { cmd = { 'nomicfoundation-solidity-language-server', '--stdio' }, filetypes = { 'solidity' }, - root_dir = util.root_pattern('.git', 'package.json'), + root_dir = util.root_pattern(unpack(root_files)) or util.root_pattern('.git', 'package.json'), + single_file_support = true, }, docs = { description = [[ https://github.com/NomicFoundation/hardhat-vscode/blob/development/server/README.md +`nomicfoundation-solidity-language-server` can be installed via `npm`: + +```sh npm install -g @ignored/solidity-language-server +``` A language server for the Solidity programming language, built by the Nomic Foundation for the Ethereum community. ]], default_config = { - root_dir = [[root_pattern(".git", "package.json")]], + root_dir = [[root_pattern("]] .. table.concat(root_files, '", "') .. [[", ".git", "package.json")]], }, }, } |
