Skip to content

Commit

Permalink
nimsuggest v3+ handles unknownFile (#23696)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgomez committed Jun 8, 2024
1 parent 09b5ed2 commit c7ee161
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions nimsuggest/nimsuggest.nim
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ const
#List of currently supported capabilities. So lang servers/ides can iterate over and check for what's enabled
Capabilities = [
"con", #current NimSuggest supports the `con` commmand
"exceptionInlayHints"
"exceptionInlayHints",
"unknownFile", #current NimSuggest can handle unknown files
]

proc parseQuoted(cmd: string; outp: var string; start: int): int =
Expand Down Expand Up @@ -1065,10 +1066,6 @@ proc executeNoHooksV3(cmd: IdeCmd, file: AbsoluteFile, dirtyfile: AbsoluteFile,
var fileIndex: FileIndex

if not (cmd in {ideRecompile, ideGlobalSymbols}):
if not fileInfoKnown(conf, file):
myLog fmt "{file} is unknown, returning no results"
return

fileIndex = fileInfoIdx(conf, file)
msgs.setDirtyFile(
conf,
Expand Down

0 comments on commit c7ee161

Please sign in to comment.