From d9b1477b819d3cfade4e5453b8c1edbba196f801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20M=20G=C3=B3mez?= Date: Mon, 10 Jun 2024 16:14:08 +0100 Subject: [PATCH] [Backport 1.6] Nimsuggest handle unknown file (#23702) --- nimsuggest/nimsuggest.nim | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nimsuggest/nimsuggest.nim b/nimsuggest/nimsuggest.nim index e1baede4e4..f5c1e85d12 100644 --- a/nimsuggest/nimsuggest.nim +++ b/nimsuggest/nimsuggest.nim @@ -119,7 +119,8 @@ const "type 'terse' to toggle terse mode on/off" #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 + "con" #current NimSuggest supports the `con` commmand, + "unknownFile", #current NimSuggest can handle unknown files ] proc parseQuoted(cmd: string; outp: var string; start: int): int = @@ -942,10 +943,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,