Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
bung87 committed Sep 17, 2023
1 parent c08ee60 commit 319287e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions nimlsp/nimlsp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,7 @@ proc main(ins: Stream, outs: Stream) =
textDocumentRequest(message, DocumentSymbolParams, req):
debugLog req.uriAndStash()
let projectFile = openFiles[req.fileuri].projectFile
let syms = getNimsuggest(req.fileuri).outline(
req.filePath,
req.filestash
)
let syms = getNimsuggest(req.fileuri).outline(req.filePath, req.filestash)
debugLog "Found outlines: " & $syms.len
debugSuggests(syms[0..<min(syms.len, 10)])
var resp: JsonNode
Expand Down Expand Up @@ -385,10 +382,7 @@ proc main(ins: Stream, outs: Stream) =
file = open(req.filestash, fmWrite)
projectFile = getProjectFile(uriToPath(req.fileuri))
debugLog req.uriAndStash()
openFiles[req.fileuri] = (
projectFile: projectFile,
fingerTable: @[]
)
openFiles[req.fileuri] = (projectFile: projectFile, fingerTable: @[])

if projectFile notin projectFiles:
debugLog "Initialising with project file: ", projectFile
Expand Down

0 comments on commit 319287e

Please sign in to comment.