Skip to content

Commit 538303e

Browse files
authored
Merge pull request #855 from posit-dev/bugfix/section-symbols
Fix ranges of comment sections
2 parents 67201a5 + 0dccf8e commit 538303e

File tree

4 files changed

+294
-141
lines changed

4 files changed

+294
-141
lines changed

.github/copilot-instructions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ Use fully qualified result types (`anyhow::Result`) instead of importing them.
1111
When writing tests, prefer simple assertion macros without custom error messages:
1212
- Use `assert_eq!(actual, expected);` instead of `assert_eq!(actual, expected, "custom message");`
1313
- Use `assert!(condition);` instead of `assert!(condition, "custom message");`
14+
15+
Tests are run with `just test`, not `cargo test`.
16+
17+
When you extract code in a function (or move things around) that function goes
18+
_below_ the calling function. A general goal is to be able to read linearly from
19+
top to bottom with the relevant context and main logic first. The code should be
20+
organised like a call stack. Of course that's not always possible, use best
21+
judgement to produce the clearest code organization.

crates/ark/src/lsp/snapshots/ark__lsp__symbols__tests__symbol_assignment_function_nested_section.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ expression: "test_symbol(\"\n## title0 ----\nfoo <- function() {\n # title1 ---
1515
character: 0,
1616
},
1717
end: Position {
18-
line: 1,
19-
character: 14,
18+
line: 7,
19+
character: 1,
2020
},
2121
},
2222
selection_range: Range {
@@ -25,8 +25,8 @@ expression: "test_symbol(\"\n## title0 ----\nfoo <- function() {\n # title1 ---
2525
character: 0,
2626
},
2727
end: Position {
28-
line: 1,
29-
character: 14,
28+
line: 7,
29+
character: 1,
3030
},
3131
},
3232
children: Some(
@@ -73,8 +73,8 @@ expression: "test_symbol(\"\n## title0 ----\nfoo <- function() {\n # title1 ---
7373
character: 2,
7474
},
7575
end: Position {
76-
line: 3,
77-
character: 15,
76+
line: 5,
77+
character: 16,
7878
},
7979
},
8080
selection_range: Range {
@@ -83,8 +83,8 @@ expression: "test_symbol(\"\n## title0 ----\nfoo <- function() {\n # title1 ---
8383
character: 2,
8484
},
8585
end: Position {
86-
line: 3,
87-
character: 15,
86+
line: 5,
87+
character: 16,
8888
},
8989
},
9090
children: Some(

0 commit comments

Comments
 (0)