diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-08 10:55:17 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-08 10:55:17 +1100 |
| commit | 193e6ebd245fca345d83e5c4cbfd6cf7b5b062de (patch) | |
| tree | beeb7487feabd1d3a064dcbc7a34adffb863a921 /src/server/action.odin | |
| parent | e898b2d8dfaa121ff1a9375a0b18074e824b1e24 (diff) | |
| parent | 7d5b8ede0f4248773d71fbfffcf9cde40c9cc774 (diff) | |
Merge pull request #1273 from DireLines/master
feat: code action to populate remaining switch cases
Diffstat (limited to 'src/server/action.odin')
| -rw-r--r-- | src/server/action.odin | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/action.odin b/src/server/action.odin index cdf06cb..64516a3 100644 --- a/src/server/action.odin +++ b/src/server/action.odin @@ -71,6 +71,15 @@ get_code_actions :: proc(document: ^Document, range: common.Range, config: ^comm remove_unused_imports(document, strings.clone(document.uri.uri), config, &actions) } + if position_context.switch_stmt != nil || position_context.switch_type_stmt != nil { + add_populate_switch_cases_action( + document, + &ast_context, + &position_context, + strings.clone(document.uri.uri), + &actions, + ) + } add_invert_if_action(document, position_context.position, strings.clone(document.uri.uri), &actions) return actions[:], true |