codeActionKindContains returns true if the requested kind equals or is a hierarchical parent of actionKind, using '.' as the separator. This matches the semantics of VS Code's HierarchicalKind.contains.
(requestedKind, actionKind lsproto.CodeActionKind)
| 232 | // hierarchical parent of actionKind, using '.' as the separator. This matches |
| 233 | // the semantics of VS Code's HierarchicalKind.contains. |
| 234 | func codeActionKindContains(requestedKind, actionKind lsproto.CodeActionKind) bool { |
| 235 | return requestedKind == actionKind || |
| 236 | requestedKind == "" || |
| 237 | strings.HasPrefix(string(actionKind), string(requestedKind)+".") |
| 238 | } |
| 239 | |
| 240 | // isFixAllKind returns true if the requested kind matches source.fixAll |
| 241 | func isFixAllKind(kind lsproto.CodeActionKind) bool { |
no test coverage detected