Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion integrationtests/fixtures/snapshots/go/codelens/get.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/TEST_OUTPUT/workspace/go.mod:
===

[1] Location: Lines 1-1
Title: Reset go.mod diagnostics
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
===
---

Symbol: TestConstant
/TEST_OUTPUT/workspace/clean.go
Kind: Constant
Container Name: github.com/isaacphi/mcp-language-server/integrationtests/test-output/go/workspace
Start Position: Line 25, Column 1
End Position: Line 25, Column 38
===
Range: L25:C1 - L25:C38

25|const TestConstant = "constant value"

11 changes: 6 additions & 5 deletions integrationtests/fixtures/snapshots/go/definition/foobar.snap
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
===
---

Symbol: FooBar
/TEST_OUTPUT/workspace/main.go
Kind: Function
Container Name: github.com/isaacphi/mcp-language-server/integrationtests/test-output/go/workspace
Start Position: Line 6, Column 1
End Position: Line 9, Column 2
===
Range: L6:C1 - L10:C2

6|func FooBar() string {
7| return "Hello, World!"
8| fmt.Println("Unreachable code") // This is unreachable code
9|}
9| return 3
10|}

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
===
---

Symbol: TestFunction
/TEST_OUTPUT/workspace/clean.go
Kind: Function
Container Name: github.com/isaacphi/mcp-language-server/integrationtests/test-output/go/workspace
Start Position: Line 31, Column 1
End Position: Line 33, Column 2
===
Range: L31:C1 - L33:C2

31|func TestFunction() {
32| fmt.Println("This is a test function")
33|}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
===
---

Symbol: TestInterface
/TEST_OUTPUT/workspace/clean.go
Kind: Interface
Container Name: github.com/isaacphi/mcp-language-server/integrationtests/test-output/go/workspace
Start Position: Line 17, Column 1
End Position: Line 19, Column 2
===
Range: L17:C1 - L19:C2

17|type TestInterface interface {
18| DoSomething() error
19|}
Expand Down
8 changes: 4 additions & 4 deletions integrationtests/fixtures/snapshots/go/definition/method.snap
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
===
---

Symbol: TestStruct.Method
/TEST_OUTPUT/workspace/clean.go
Kind: Method
Container Name: github.com/isaacphi/mcp-language-server/integrationtests/test-output/go/workspace
Start Position: Line 12, Column 1
End Position: Line 14, Column 2
===
Range: L12:C1 - L14:C2

12|func (t *TestStruct) Method() string {
13| return t.Name
14|}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NotFound not found
8 changes: 4 additions & 4 deletions integrationtests/fixtures/snapshots/go/definition/struct.snap
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
===
---

Symbol: TestStruct
/TEST_OUTPUT/workspace/clean.go
Kind: Struct
Container Name: github.com/isaacphi/mcp-language-server/integrationtests/test-output/go/workspace
Start Position: Line 6, Column 1
End Position: Line 9, Column 2
===
Range: L6:C1 - L9:C2

6|type TestStruct struct {
7| Name string
8| Age int
Expand Down
8 changes: 4 additions & 4 deletions integrationtests/fixtures/snapshots/go/definition/type.snap
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
===
---

Symbol: TestType
/TEST_OUTPUT/workspace/clean.go
Kind: Class
Container Name: github.com/isaacphi/mcp-language-server/integrationtests/test-output/go/workspace
Start Position: Line 22, Column 1
End Position: Line 22, Column 21
===
Range: L22:C1 - L22:C21

22|type TestType string

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
===
---

Symbol: TestVariable
/TEST_OUTPUT/workspace/clean.go
Kind: Variable
Container Name: github.com/isaacphi/mcp-language-server/integrationtests/test-output/go/workspace
Start Position: Line 28, Column 1
End Position: Line 28, Column 22
===
Range: L28:C1 - L28:C22

28|var TestVariable = 42

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---

/TEST_OUTPUT/workspace/consumer.go
Diagnostics in File: 1
ERROR at L7:C28: not enough arguments in call to HelperFunction
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---

/TEST_OUTPUT/workspace/main.go
Diagnostics in File: 2
WARNING at L8:C2: unreachable code (Source: unreachable, Code: default)
ERROR at L9:C1: missing return (Source: compiler, Code: MissingReturn)
ERROR at L9:C9: cannot use 3 (untyped int constant) as string value in return statement (Source: compiler, Code: IncompatibleAssign)

6|func FooBar() string {
7| return "Hello, World!"
8| fmt.Println("Unreachable code") // This is unreachable code
9|}
9| return 3
10|}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/TEST_OUTPUT/workspace/main.go
References in File: 1
At: L12:C14
At: L13:C14

11|func main() {
12| fmt.Println(FooBar())
13|}
12|func main() {
13| fmt.Println(FooBar())
14|}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No references found for symbol: NotFound
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
Successfully renamed symbol to 'UpdatedConstant'.
Updated 4 occurrences across 3 files.
Updated 4 occurrences across 3 files:
/TEST_OUTPUT/workspace/another_consumer.go: L15:C23
/TEST_OUTPUT/workspace/consumer.go: L15:C23
/TEST_OUTPUT/workspace/types.go: L24:C4, L25:C7
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Successfully applied text edits. 1 lines removed, 6 lines added.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Successfully applied text edits.
WARNING: line numbers may have changed. Re-read code before applying additional edits.
Successfully applied text edits. 1 lines removed, 0 lines added.
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Successfully applied text edits.
WARNING: line numbers may have changed. Re-read code before applying additional edits.
Successfully applied text edits. 2 lines removed, 3 lines added.
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Successfully applied text edits.
WARNING: line numbers may have changed. Re-read code before applying additional edits.
Successfully applied text edits. 1 lines removed, 3 lines added.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Successfully applied text edits. 1 lines removed, 2 lines added.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Successfully applied text edits. 2 lines removed, 2 lines added.
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Successfully applied text edits.
WARNING: line numbers may have changed. Re-read code before applying additional edits.
Successfully applied text edits. 4 lines removed, 4 lines added.
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Successfully applied text edits.
WARNING: line numbers may have changed. Re-read code before applying additional edits.
Successfully applied text edits. 1 lines removed, 1 lines added.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
===
---

Symbol: TestClass
/TEST_OUTPUT/workspace/main.py
Kind: Class
Start Position: Line 18, Column 1
End Position: Line 59, Column 22
===
Range: L18:C1 - L59:C22

18|class TestClass:
19| """A test class with methods and attributes."""
20|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
===
---

Symbol: TEST_CONSTANT
/TEST_OUTPUT/workspace/main.py
Kind: Constant
Start Position: Line 79, Column 1
End Position: Line 79, Column 14
===
Range: L79:C1 - L79:C14

79|TEST_CONSTANT: str = "test constant"

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
===
---

Symbol: DerivedClass
/TEST_OUTPUT/workspace/main.py
Kind: Class
Start Position: Line 70, Column 1
End Position: Line 75, Column 13
===
Range: L70:C1 - L75:C13

70|class DerivedClass(BaseClass):
71| """A class that inherits from BaseClass."""
72|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
===
---

Symbol: test_function
/TEST_OUTPUT/workspace/main.py
Kind: Function
Start Position: Line 6, Column 1
End Position: Line 15, Column 29
===
Range: L6:C1 - L15:C29

6|def test_function(name: str) -> str:
7| """A simple test function that returns a greeting message.
8|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
===
---

Symbol: test_method
/TEST_OUTPUT/workspace/main.py
Kind: Method
Container Name: TestClass
Start Position: Line 18, Column 1
End Position: Line 59, Column 22
===
Range: L18:C1 - L59:C22

18|class TestClass:
19| """A test class with methods and attributes."""
20|
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---

Symbol: SameName
/TEST_OUTPUT/workspace/clean.py
Kind: Function
Range: L6:C1 - L7:C9

6|def SameName():
7| pass

---

Symbol: SameName
/TEST_OUTPUT/workspace/helper.py
Kind: Class
Range: L24:C1 - L25:C9

24|class SameName:
25| pass

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
===
---

Symbol: static_method
/TEST_OUTPUT/workspace/main.py
Kind: Method
Container Name: TestClass
Start Position: Line 18, Column 1
End Position: Line 59, Column 22
===
Range: L18:C1 - L59:C22

18|class TestClass:
19| """A test class with methods and attributes."""
20|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
===
---

Symbol: test_variable
/TEST_OUTPUT/workspace/main.py
Kind: Variable
Start Position: Line 83, Column 1
End Position: Line 83, Column 14
===
Range: L83:C1 - L83:C14

83|test_variable: list[int] = [1, 2, 3, 4, 5]

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---

/TEST_OUTPUT/workspace/consumer_clean.py
Diagnostics in File: 1
ERROR at L9:C15: Argument missing for parameter "age" (Source: Pyright, Code: reportCallIssue)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---

/TEST_OUTPUT/workspace/error_file.py
Diagnostics in File: 3
ERROR at L31:C12: Type "Literal[42]" is not assignable to return type "str"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
Successfully renamed symbol to 'UPDATED_CONSTANT'.
Updated 6 occurrences across 3 files.
Updated 6 occurrences across 3 files:
/TEST_OUTPUT/workspace/another_consumer.py: L4:C5, L16:C51, L34:C30
/TEST_OUTPUT/workspace/consumer.py: L8:C5, L46:C43
/TEST_OUTPUT/workspace/helper.py: L8:C1
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
===
---

Symbol: TEST_CONSTANT
/TEST_OUTPUT/workspace/src/types.rs
Kind: Constant
Start Position: Line 3, Column 1
End Position: Line 4, Column 55
===
Range: L3:C1 - L4:C55

3|// A simple constant
4|pub const TEST_CONSTANT: &str = "test constant value";

Loading
Loading