-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note: There's a function to compare the `open` location retrieved from code completion (`textDocument/completion`) with the `open` location from Quick Fix "open Namespace" (`textDocument/CodeAction`). That's currently disable because these two methods `open` in different locations: * Code Completion: Nearest position (closest module/namespace) * Code Quick: Top Level (most outer scope in file) This might be useful for testing if/when these different behaviors are unified (#789)
- Loading branch information
Showing
16 changed files
with
607 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
test/FsAutoComplete.Tests.Lsp/TestCases/CompletionAutoOpenTests/ImplicitTopLevelModule.fsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module RootModle = | ||
let foo () = | ||
Regex(*-1,|-2*) | ||
|
||
type T = { | ||
Value: Regex(*1,2*) | ||
} | ||
with | ||
member _.Foo () = | ||
Regex(*1,2*) | ||
|
||
module Nested1 = | ||
let foo = | ||
Regex(*-1,|-2*) | ||
|
||
type T = { | ||
Value: Regex(*-4,|-2*) | ||
} | ||
with | ||
member _.Foo () = | ||
Regex(*-8,|-4*) |
23 changes: 23 additions & 0 deletions
23
...omplete.Tests.Lsp/TestCases/CompletionAutoOpenTests/ImplicitTopLevelModuleWithNewLine.fsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module RootModle = | ||
|
||
let foo () = | ||
Regex(*-2,|-2*) | ||
|
||
type T = { | ||
Value: Regex(*1,2*) | ||
} | ||
with | ||
member _.Foo () = | ||
Regex(*1,2*) | ||
|
||
module Nested1 = | ||
|
||
let foo = | ||
Regex(*-2,|-2*) | ||
|
||
type T = { | ||
Value: Regex(*-5,|-2*) | ||
} | ||
with | ||
member _.Foo () = | ||
Regex(*-9,|-4*) |
25 changes: 25 additions & 0 deletions
25
...toComplete.Tests.Lsp/TestCases/CompletionAutoOpenTests/ImplicitTopLevelModuleWithOpen.fsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module RootModle = | ||
open System | ||
open System.Collections.Generic | ||
let foo () = | ||
Regex(*-1,|-2*) | ||
|
||
type T = { | ||
Value: Regex(*-4,2*) | ||
} | ||
with | ||
member _.Foo () = | ||
Regex(*-8,2*) | ||
|
||
module Nested1 = | ||
open System | ||
open System.Collections.Generic | ||
let foo = | ||
Regex(*-1,|-2*) | ||
|
||
type T = { | ||
Value: Regex(*-4,|-2*) | ||
} | ||
with | ||
member _.Foo () = | ||
Regex(*-8,|-4*) |
25 changes: 25 additions & 0 deletions
25
....Tests.Lsp/TestCases/CompletionAutoOpenTests/ImplicitTopLevelModuleWithOpenAndNewLine.fsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module RootModle = | ||
open System | ||
open System.Collections.Generic | ||
|
||
let foo () = | ||
Regex(*-2,|-2*) | ||
|
||
type T = { | ||
Value: Regex(*-5,2*) | ||
} | ||
with | ||
member _.Foo () = | ||
Regex(*-9,2*) | ||
|
||
module Nested1 = | ||
|
||
let foo = | ||
Regex(*-2,|-2*) | ||
|
||
type T = { | ||
Value: Regex(*-5,|-2*) | ||
} | ||
with | ||
member _.Foo () = | ||
Regex(*-9,|-4*) |
32 changes: 32 additions & 0 deletions
32
...Tests.Lsp/TestCases/CompletionAutoOpenTests/ImplicitTopLevelModuleWithOpenAndNewLines.fsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module RootModle = | ||
open System | ||
open System.Collections.Generic | ||
|
||
|
||
|
||
|
||
let foo () = | ||
Regex(*3,|-2*) | ||
|
||
type T = { | ||
Value: Regex(*3,2*) | ||
} | ||
with | ||
member _.Foo () = | ||
Regex(*3,2*) | ||
|
||
module Nested1 = | ||
open System | ||
open System.Collections.Generic | ||
|
||
|
||
|
||
let foo = | ||
Regex(*-4,|-2*) | ||
|
||
type T = { | ||
Value: Regex(*-7,|-2*) | ||
} | ||
with | ||
member _.Foo () = | ||
Regex(*-11,|-4*) |
21 changes: 21 additions & 0 deletions
21
test/FsAutoComplete.Tests.Lsp/TestCases/CompletionAutoOpenTests/Module.fsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module OpenNamespace.RootModule | ||
let foo: Regex(*-0,0*) = | ||
Regex(*-1,0*) | ||
|
||
type T = { | ||
Value: Regex(*1,0*) | ||
} | ||
with | ||
member _.Foo () = | ||
Regex(*1,0*) | ||
|
||
module Nested1 = | ||
let foo = | ||
Regex(*-1,|-2*) | ||
|
||
type T = { | ||
Value: Regex(*-4,|-2*) | ||
} | ||
with | ||
member _.Foo () = | ||
Regex(*-8,|-4*) |
Oops, something went wrong.