Skip to content

Commit debb717

Browse files
gselzerclaude
andcommitted
code-lsp: note where imports should go after a header
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 160ea7e commit debb717

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎scijava-code-lsp/src/main/java/org/scijava/code/lsp/ScriptSession.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,9 @@ private static CompletionList back(final ScriptDocument doc,
628628
// at the start of the script, as it would without a header (e.g.
629629
// an import, where the script has none, as Jython's server puts
630630
// it). Only there: nowhere else in the header maps to the script.
631+
// TODO: In SciJava scripts, imports conventionally come after a
632+
// SciJava script parameter block. Ideally, we'd instead map
633+
// imports to that conventional position.
631634
if (r == null && atStart(e.getRange())) r = new Range(new Position(
632635
0, 0), new Position(0, 0));
633636
if (r != null) edits.add(new TextEdit(r, e.getNewText()));

0 commit comments

Comments
 (0)