nimsuggest v3+ handles unknownFile (#23696)

This commit is contained in:
Juan M Gómez
2024-06-08 12:02:48 +01:00
committed by GitHub
parent 09b5ed251e
commit c7ee16182e

View File

@@ -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 =
@@ -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,