opt.lspOptions = opt_import.lspOptions
   util.WarnMsg = util_import.WarnMsg
   util.GetLineByteFromPos = util_import.GetLineByteFromPos
+  util.LspUriToFile = util_import.LspUriToFile
 else
   import lspOptions from './lspoptions.vim'
   import {WarnMsg,
 
 # New LSP diagnostic messages received from the server for a file.
 # Update the signs placed in the buffer for this file
-export def UpdateDiags(lspserver: dict<any>, bnr: number)
+def ProcessNewDiags(lspserver: dict<any>, bnr: number)
   if !opt.lspOptions.autoHighlightDiags
     return
   endif
   signs->sign_placelist()
 enddef
 
+# FIXME: Remove this function once the Vim bug (calling one exported function
+# from another exported function in an autoload script is not working) is
+# fixed. Replace the calls to this function directly with calls to
+# ProcessNewDiags().
+export def UpdateDiags(lspserver: dict<any>, bnr: number)
+  ProcessNewDiags(lspserver, bnr)
+enddef
+
 # process a diagnostic notification message from the LSP server
 # Notification: textDocument/publishDiagnostics
 # Param: PublishDiagnosticsParams
   endfor
 
   lspserver.diagsMap->extend({['' .. bnr]: diag_by_lnum})
-  UpdateDiags(lspserver, bnr)
+  ProcessNewDiags(lspserver, bnr)
 enddef
 
 # get the count of error in the current buffer
 
 enddef
 
 # Convert a Vim filename to an LSP URI (file://<absolute_path>)
-export def LspFileToUri(fname: string): string
+def ConvertFilenameToUri(fname: string): string
   var uri: string = fnamemodify(fname, ':p')
 
   var on_windows: bool = false
   return uri
 enddef
 
+# FIXME: Remove this function once the Vim bug (calling one exported function
+# from another exported function in an autoload script is not working) is
+# fixed. Replace the calls to this function directly with calls to
+# ConvertFilenameToUri().
+export def LspFileToUri(fname: string): string
+  return ConvertFilenameToUri(fname)
+enddef
+
 # Convert a Vim buffer number to an LSP URI (file://<absolute_path>)
 export def LspBufnrToUri(bnr: number): string
-  return LspFileToUri(bnr->bufname())
+  return ConvertFilenameToUri(bnr->bufname())
 enddef
 
 # Returns the byte number of the specified LSP position in buffer 'bnr'.