Skip to content

Commit

Permalink
Update references
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Jun 16, 2022
1 parent c3c83a7 commit 332fc9f
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/langserver/handlers/code_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func (svc *service) textDocumentCodeAction(ctx context.Context, params lsp.CodeA
Title: "Format Document",
Kind: action,
Edit: lsp.WorkspaceEdit{
Changes: map[string][]lsp.TextEdit{
string(dh.FullURI()): edits,
Changes: map[lsp.DocumentURI][]lsp.TextEdit{
lsp.DocumentURI(dh.FullURI()): edits,
},
},
})
Expand Down
54 changes: 54 additions & 0 deletions internal/langserver/handlers/complete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ func TestModuleCompletion_withValidData(t *testing.T) {
"id": 3,
"result": {
"isIncomplete": false,
"itemDefaults": {
"editRange": {
"start": {"line": 0, "character": 0},
"end": {"line": 0, "character": 0}
}
},
"items": [
{
"label": "alias",
Expand Down Expand Up @@ -355,6 +361,12 @@ func TestModuleCompletion_withValidDataAndSnippets(t *testing.T) {
"id": 3,
"result": {
"isIncomplete": false,
"itemDefaults": {
"editRange": {
"start": {"line": 0, "character": 0},
"end": {"line": 0, "character": 0}
}
},
"items": [
{
"label": "alias",
Expand Down Expand Up @@ -663,6 +675,12 @@ func TestVarsCompletion_withValidData(t *testing.T) {
"id": 4,
"result": {
"isIncomplete": false,
"itemDefaults": {
"editRange": {
"start": {"line": 0, "character": 0},
"end": {"line": 0, "character": 0}
}
},
"items": [
{
"label": "test",
Expand Down Expand Up @@ -809,6 +827,12 @@ output "test" {
"id": 3,
"result": {
"isIncomplete": false,
"itemDefaults": {
"editRange": {
"start": {"line": 0, "character": 0},
"end": {"line": 0, "character": 0}
}
},
"items": [
{
"label": "providers",
Expand Down Expand Up @@ -891,6 +915,12 @@ output "test" {
"id": 4,
"result": {
"isIncomplete": false,
"itemDefaults": {
"editRange": {
"start": {"line": 0, "character": 0},
"end": {"line": 0, "character": 0}
}
},
"items": [
{
"label": "module.refname.testout",
Expand Down Expand Up @@ -1066,6 +1096,12 @@ output "test" {
"id": 3,
"result": {
"isIncomplete": false,
"itemDefaults": {
"editRange": {
"start": {"line": 0, "character": 0},
"end": {"line": 0, "character": 0}
}
},
"items": [
{
"label": "alpha-var",
Expand Down Expand Up @@ -1148,6 +1184,12 @@ output "test" {
"id": 4,
"result": {
"isIncomplete": false,
"itemDefaults": {
"editRange": {
"start": {"line": 0, "character": 0},
"end": {"line": 0, "character": 0}
}
},
"items": [
{
"label": "beta-var",
Expand Down Expand Up @@ -1230,6 +1272,12 @@ output "test" {
"id": 5,
"result": {
"isIncomplete": false,
"itemDefaults": {
"editRange": {
"start": {"line": 0, "character": 0},
"end": {"line": 0, "character": 0}
}
},
"items": [
{
"label": "module.alpha",
Expand Down Expand Up @@ -1386,6 +1434,12 @@ variable "ccc" {}
"id": 3,
"result": {
"isIncomplete": false,
"itemDefaults": {
"editRange": {
"start": {"line": 0, "character": 0},
"end": {"line": 0, "character": 0}
}
},
"items": [
{
"label": "var.aaa",
Expand Down
4 changes: 2 additions & 2 deletions internal/langserver/handlers/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ func initializeResult(ctx context.Context) lsp.InitializeResult {
DocumentFormattingProvider: true,
DocumentSymbolProvider: true,
WorkspaceSymbolProvider: true,
Workspace: lsp.Workspace5Gn{
WorkspaceFolders: lsp.WorkspaceFolders4Gn{
Workspace: lsp.Workspace6Gn{
WorkspaceFolders: lsp.WorkspaceFolders5Gn{
Supported: true,
ChangeNotifications: "workspace/didChangeWorkspaceFolders",
},
Expand Down

0 comments on commit 332fc9f

Please sign in to comment.