Skip to content

Commit

Permalink
Fixed warnings, recompiled builtin plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimaoth committed Oct 12, 2024
1 parent 32e0ba2 commit 738635e
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 20 deletions.
Binary file modified config/wasm/harpoon.wasm
Binary file not shown.
Binary file modified config/wasm/keybindings_plugin.wasm
Binary file not shown.
Binary file modified config/wasm/vscode_config_plugin.wasm
Binary file not shown.
13 changes: 2 additions & 11 deletions src/app.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import std/[sequtils, strformat, strutils, tables, unicode, options, os, json, macros, macrocache, sugar, streams, deques, algorithm]
import asynctools/asyncipc
import std/[sequtils, strformat, strutils, tables, unicode, options, os, json, macros, macrocache, sugar, streams, deques]
import misc/[id, util, timer, event, myjsonutils, traits, rect_utils, custom_logger, custom_async,
array_set, delayed_task, regex, disposable_ref, rope_utils]
import ui/node
Expand Down Expand Up @@ -1342,10 +1341,6 @@ proc finishInitialization*(self: App, state: EditorState) {.async.} =
log lvlInfo, "No workspace open yet, opening current working directory as local workspace"
discard await self.setWorkspaceFolder newWorkspaceFolderLocal(".")

when enableAst:
if self.workspace.isNotNil:
setProjectWorkspace(self.workspace)

# Restore open editors
if self.appOptions.fileToOpen.getSome(filePath):
discard self.openFile(filePath)
Expand Down Expand Up @@ -1602,11 +1597,7 @@ proc saveAppState*(self: App) {.expose("editor").} =
var state = EditorState()
state.theme = self.theme.path

when enableAst:
if gProjectWorkspace.isNotNil:
state.astProjectWorkspaceId = $gProjectWorkspace.id
if gProject.isNotNil:
state.astProjectPath = gProject.path.some
# todo: save ast project state

if self.backend == api.Backend.Terminal:
state.fontSize = self.loadedFontSize
Expand Down
4 changes: 2 additions & 2 deletions src/desktop_main.nim
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else:
static:
echo "Compiling for unknown"

import std/[parseopt, options, macros, strutils, os, terminal, strformat]
import std/[parseopt, options, macros, strutils, os, strformat]
import misc/[custom_logger, util]
import compilation_config, scripting_api, app_options
import text/custom_treesitter
Expand Down Expand Up @@ -184,7 +184,7 @@ import ui/widget_builders
import text/language/language_server
import app

import asynctools/asyncipc
# import asynctools/asyncipc

# proc tryAttach(opts: AppOptions, processId: int) =
# if processId == 0:
Expand Down
2 changes: 1 addition & 1 deletion src/service.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import std/[json, strutils, sequtils, tables, options, macros, genasts, macrocache, typetraits, sugar]
import std/[json, tables, options, macros, genasts, macrocache, typetraits]
import misc/[util, custom_logger, custom_async]

const builtinServices = CacheSeq"builtinServices"
Expand Down
7 changes: 2 additions & 5 deletions src/text/language/dap_client.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import std/[json, strutils, strformat, macros, options, tables, sets, uri, sequtils, os, hashes]
import std/[json, strutils, strformat, macros, options, tables, sets, hashes]
import misc/[custom_logger, util, event, myjsonutils, custom_async, response, connection]
import misc/async_process
import platform/filesystem

{.push gcsafe.}
Expand All @@ -9,7 +8,7 @@ import platform/filesystem
logCategory "dap"

var logVerbose = false
var logServerDebug = true
# var logServerDebug = true

proc fromJsonHook*[T](a: var Response[T], b: JsonNode, opt = Joptions()) =
if not b["success"].getBool:
Expand Down Expand Up @@ -354,8 +353,6 @@ proc run*(client: DAPClient)
proc waitInitialized*(client: DAPCLient): Future[bool] = client.initializedFuture
proc waitInitializedEventReceived*(client: DAPCLient): Future[void] = client.initializedEventFuture

proc encodePathUri(path: string): string = path.normalizePathUnix.split("/").mapIt(it.encodeUrl(false)).join("/")

proc `==`*(a, b: VariablesReference): bool {.borrow.}
proc hash*(vr: VariablesReference): Hash {.borrow.}
proc `$`*(vr: VariablesReference): string {.borrow.}
Expand Down
2 changes: 1 addition & 1 deletion src/text/language/debugger.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import std/[strutils, options, json, tables, sugar, strtabs, streams, sets, sequtils, osproc]
import std/[strutils, options, json, tables, sugar, strtabs, streams, sets, sequtils]
import misc/[id, custom_async, custom_logger, util, connection, myjsonutils, event, response]
import scripting/expose
import dap_client, dispatch_tables, app_interface, config_provider, selector_popup_builder, events, view
Expand Down

0 comments on commit 738635e

Please sign in to comment.