Commit d0e99b5
authored
Rewrite hover provider in Rego (#1951)
And get rid of all related code previously written in Go. The biggest
win here is IMO how this allows us to entirely get rid of one of our
continuous "watcher" processes, and instead use only data from input
and storage, like we do in all Rego handlers. Quite an improvement!
Notable other changes:
- Move ast.keywords to lsp.hover.keywords as they're only used in hover
- Move lsp.completion.location to lsp.location as useful outside completion handlers
Besides the tests, also manually tested hovering both built-ins and keywords
and all seem to work well!
Fixes #1905
Signed-off-by: Anders Eknert <anders.eknert@apple.com>1 parent 0a0f1f8 commit d0e99b5
49 files changed
Lines changed: 721 additions & 1093 deletions
File tree
- .github/workflows
- build/workflows
- bundle/regal
- ast
- lsp
- completion/providers
- booleans
- builtins
- commonrule
- default
- import
- inputdotjson
- input
- locals
- packagename
- packagerefs
- package
- regov1
- ruleheadkeyword
- rulename
- rulerefs
- snippet
- hover
- example
- keywords
- location
- util/find
- cmd
- internal
- lsp
- cache
- examples
- hover
- testdata/hover
- rego
- query
- test
- types
- testutil
- pkg/lsp
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
This file was deleted.
This file was deleted.
This file was deleted.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments