()
| 1159 | } |
| 1160 | |
| 1161 | function registerLintCommands() { |
| 1162 | addCommand({ |
| 1163 | name: "openLintPanel", |
| 1164 | description: "Open lint panel", |
| 1165 | readOnly: true, |
| 1166 | requiresView: true, |
| 1167 | run(view) { |
| 1168 | const resolvedView = resolveView(view); |
| 1169 | if (!resolvedView) return false; |
| 1170 | return openLintPanel(resolvedView); |
| 1171 | }, |
| 1172 | }); |
| 1173 | addCommand({ |
| 1174 | name: "closeLintPanel", |
| 1175 | description: "Close lint panel", |
| 1176 | readOnly: true, |
| 1177 | requiresView: true, |
| 1178 | run(view) { |
| 1179 | const resolvedView = resolveView(view); |
| 1180 | if (!resolvedView) return false; |
| 1181 | return closeLintPanel(resolvedView); |
| 1182 | }, |
| 1183 | }); |
| 1184 | addCommand({ |
| 1185 | name: "nextDiagnostic", |
| 1186 | description: "Go to next diagnostic", |
| 1187 | readOnly: true, |
| 1188 | requiresView: true, |
| 1189 | run(view) { |
| 1190 | const resolvedView = resolveView(view); |
| 1191 | if (!resolvedView) return false; |
| 1192 | return nextDiagnostic(resolvedView); |
| 1193 | }, |
| 1194 | }); |
| 1195 | addCommand({ |
| 1196 | name: "previousDiagnostic", |
| 1197 | description: "Go to previous diagnostic", |
| 1198 | readOnly: true, |
| 1199 | requiresView: true, |
| 1200 | run(view) { |
| 1201 | const resolvedView = resolveView(view); |
| 1202 | if (!resolvedView) return false; |
| 1203 | return previousDiagnostic(resolvedView); |
| 1204 | }, |
| 1205 | }); |
| 1206 | } |
| 1207 | |
| 1208 | function registerCommandsFromKeyBindings() { |
| 1209 | Object.entries(keyBindings).forEach(([name, binding]) => { |
no test coverage detected