@@ -39,10 +39,10 @@ object AmmoniteFileCompletions:
39
39
rawFileName : String
40
40
)(using Context ): List [CompletionValue ] =
41
41
val fileName : Option [String ] = Option (rawFileName)
42
- .flatMap(_.split(" /" ).nn. lastOption.map(_.nn .stripSuffix(" .amm.sc.scala" )))
42
+ .flatMap(_.split(" /" ).lastOption.map(_.stripSuffix(" .amm.sc.scala" )))
43
43
44
44
val split : List [String ] = Option (rawPath)
45
- .fold(Nil )(_.split(" \\ $file" ).nn. toList.map(_.nn))
45
+ .fold(Nil )(_.split(" \\ $file" ).toList.map(_.nn))
46
46
47
47
val editRange = selector.headOption.map { sel =>
48
48
if sel.sourcePos.span.isZeroExtent then posRange
@@ -71,10 +71,10 @@ object AmmoniteFileCompletions:
71
71
// drop / or \
72
72
val current = workspace.resolve(script.drop(1 ))
73
73
val importPath = translateImportToPath(select).drop(1 )
74
- val currentPath = current.nn. getParent().nn. resolve(importPath).nn .toAbsolutePath()
74
+ val currentPath = current.getParent().resolve(importPath).toAbsolutePath()
75
75
val parentTextEdit =
76
- if query.exists(_.nn. isEmpty()) &&
77
- Files .exists(currentPath.nn. getParent()) && Files .isDirectory(
76
+ if query.exists(_.isEmpty()) &&
77
+ Files .exists(currentPath.getParent()) && Files .isDirectory(
78
78
currentPath
79
79
)
80
80
then List (parent)
@@ -84,7 +84,7 @@ object AmmoniteFileCompletions:
84
84
.iterator().nn
85
85
.asScala
86
86
.toList
87
- .filter(path => ! fileName.contains(path.nn. getFileName().toString.stripSuffix(" .sc" )))
87
+ .filter(path => ! fileName.contains(path.getFileName().toString.stripSuffix(" .sc" )))
88
88
.collect {
89
89
case file if matches(file) =>
90
90
CompletionValue .FileSystemMember (
0 commit comments