1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Solidity Language Server — PR benchmark config
# Usage: cargo build --release && lsp-bench
project: example
file: Shop.sol
line: 130
col: 26
iterations: 10
warmup: 2
timeout: 10
index_timeout: 15
output: benchmarks/latest
report: README.md
initializeSettings:
projectIndex:
fullProjectScan: true
# Exclude unimplemented methods
exclude:
- textDocument/typeDefinition
- textDocument/implementation
- textDocument/codeLens
- textDocument/documentColor
- textDocument/colorPresentation
- textDocument/rangeFormatting
- textDocument/onTypeFormatting
methods:
textDocument/definition:
line: 136
col: 40
expect:
file: Shop.sol
line: 41
textDocument/declaration:
line: 136
col: 40
expect:
file: Shop.sol
line: 41
textDocument/hover:
line: 136
col: 40
textDocument/references:
line: 136
col: 40
expect:
minCount: 2
textDocument/completion:
line: 136
col: 38
trigger: "."
expect:
containsItems:
- label: addTax
- label: getRefund
# PRICE.| — member access on uint256 via `using Transaction for uint256`
textDocument/signatureHelp:
line: 136
col: 45
# Inside PRICE.addTax(TAX, TAX_BASE) — parameter info on first arg
textDocument/documentHighlight:
line: 136
col: 40
expect:
minCount: 2
# addTax — declaration + callsite highlights
textDocument/inlayHint:
line: 135
col: 0
endLine: 147
endCol: 0
expect:
minCount: 1
# buy() function body — parameter names + gas estimates
textDocument/documentLink:
expect:
minCount: 1
workspace/symbol:
expect:
minCount: 1
textDocument/semanticTokens/range:
startLine: 0
startCol: 0
line: 100
col: 0
# First 100 lines — library through contract declarations
textDocument/codeAction:
line: 264
col: 8
expect:
titleContains: "Remove unused import"
textDocument/prepareRename:
line: 136
col: 40
expect:
line: 136
textDocument/rename:
line: 136
col: 40
textDocument/formatting:
didChange:
- file: Shop.unformatted.snapshot
line: 0
col: 0
servers:
- label: latest
description: Latest version
cmd: ./target/release/solidity-language-server
# - label: 0.1.24
# description: Last deployed version
# cmd: /Users/meek/.solidity-lsp/0.1.24/bin/solidity-language-server
# - label: solc
# description: Official Solidity compiler LSP
# link: https://docs.soliditylang.org
# cmd: solc
# args: ["--lsp"]
#
# - label: nomicfoundation
# description: Hardhat/Nomic Foundation Solidity Language Server
# link: https://github.com/NomicFoundation/hardhat-vscode
# cmd: nomicfoundation-solidity-language-server
# args: ["--stdio"]
#
# - label: juanfranblanco
# description: VSCode Solidity by Juan Blanco
# link: https://github.com/juanfranblanco/vscode-solidity
# cmd: vscode-solidity-server
# args: ["--stdio"]
#
# - label: qiuxiang
# description: Solidity Language Server by qiuxiang
# link: https://github.com/qiuxiang/solidity-ls
# cmd: solidity-ls
# args: ["--stdio"]