diff --git a/nimble.lock b/nimble.lock index 409f625..76eb097 100644 --- a/nimble.lock +++ b/nimble.lock @@ -4,35 +4,35 @@ "unittest2": { "version": "0.0.7", "vcsRevision": "b178f47527074964f76c395ad0dfc81cf118f379", - "url": "https://github.com/status-im/nim-unittest2.git", + "url": "https://github.com/status-im/nim-unittest2", "downloadMethod": "git", "dependencies": [], "checksums": { "sha1": "b6d4a5cbe28b43c166d6442ba6804aafd4abe368" } }, - "testutils": { - "version": "0.5.0", - "vcsRevision": "dfc4c1b39f9ded9baf6365014de2b4bfb4dafc34", - "url": "https://github.com/status-im/nim-testutils", + "stew": { + "version": "0.1.0", + "vcsRevision": "d9400ddea08341a65102cffdb693d3a7131efef4", + "url": "https://github.com/status-im/nim-stew", "downloadMethod": "git", "dependencies": [ "unittest2" ], "checksums": { - "sha1": "756d0757c4dd06a068f9d38c7f238576ba5ee897" + "sha1": "5130c5392bb6a1f27fdeb1608885097f621ee66c" } }, - "stew": { + "zlib": { "version": "0.1.0", - "vcsRevision": "9958aac68a7613a3312fa96dd2f3b29caf17772e", - "url": "https://github.com/status-im/nim-stew", + "vcsRevision": "f34ca261efd90f118dc1647beefd2f7a69b05d93", + "url": "https://github.com/status-im/nim-zlib", "downloadMethod": "git", "dependencies": [ - "unittest2" + "stew" ], "checksums": { - "sha1": "4eb2b0c4b0fe9817ee19202e8723d46c284f2875" + "sha1": "bffa9edcea9c879d827ec64a44d342dafd04ce7a" } }, "nimcrypto": { @@ -59,19 +59,19 @@ }, "bearssl": { "version": "0.2.0", - "vcsRevision": "99fcb3405c55b27cfffbf60f5368c55da7346f23", + "vcsRevision": "9372f27a25d0718d3527afad6cc936f6a853f86e", "url": "https://github.com/status-im/nim-bearssl", "downloadMethod": "git", "dependencies": [ "unittest2" ], "checksums": { - "sha1": "919dc7c8b6f5e774932b211574eb9c5886f29cc2" + "sha1": "9e9b4c34bae17aa7218e7ce449128064ae5e1118" } }, "httputils": { "version": "0.3.0", - "vcsRevision": "3b491a40c60aad9e8d3407443f46f62511e63b18", + "vcsRevision": "5065d2cf18dcb9812e25cc0e2c50eb357bde04cf", "url": "https://github.com/status-im/nim-http-utils", "downloadMethod": "git", "dependencies": [ @@ -79,7 +79,7 @@ "unittest2" ], "checksums": { - "sha1": "1331f33585eda05d1e50385fa7871c3bf2a449d7" + "sha1": "5783702ff2b33be09a6ee25ff1aacf82c94c381b" } }, "chronos": { @@ -97,6 +97,18 @@ "sha1": "5783067584ac6812eb64b8454ea6f9c97ff1262a" } }, + "testutils": { + "version": "0.5.0", + "vcsRevision": "dfc4c1b39f9ded9baf6365014de2b4bfb4dafc34", + "url": "https://github.com/status-im/nim-testutils", + "downloadMethod": "git", + "dependencies": [ + "unittest2" + ], + "checksums": { + "sha1": "756d0757c4dd06a068f9d38c7f238576ba5ee897" + } + }, "faststreams": { "version": "0.3.0", "vcsRevision": "422971502bd641703bf78a27cb20429e77fcfb8b", @@ -111,8 +123,8 @@ } }, "serialization": { - "version": "0.2.0", - "vcsRevision": "384eb2561ee755446cff512a8e057325848b86a7", + "version": "0.2.2", + "vcsRevision": "4d541ec43454809904fc4c3c0a7436410ad597d2", "url": "https://github.com/status-im/nim-serialization", "downloadMethod": "git", "dependencies": [ @@ -121,20 +133,20 @@ "stew" ], "checksums": { - "sha1": "feef734e39589686712b052286ed5c947cbaa380" + "sha1": "1dcdb29f17d0aff295e7e57edf530b1e16fb6c59" } }, "json_serialization": { - "version": "0.1.5", - "vcsRevision": "e32e8ad916ea12b8d356b2d691c4e2d8b8fea45d", - "url": "https://github.com/status-im/nim-json-serialization", + "version": "0.2.4", + "vcsRevision": "d9394dc7286064902d825bbc1203d03d7218633a", + "url": "https://github.com/status-im/nim-json-serialization/", "downloadMethod": "git", "dependencies": [ "serialization", "stew" ], "checksums": { - "sha1": "bc456c06a9376c56000674c0c425d5d6585dda43" + "sha1": "74e9d9c8af0431acab7f29a4eb8ddb3d5a7ec74a" } }, "chronicles": { @@ -160,18 +172,6 @@ "sha1": "5bf102761f7d33fd3a421db23d476794398afb07" } }, - "zlib": { - "version": "0.1.0", - "vcsRevision": "f34ca261efd90f118dc1647beefd2f7a69b05d93", - "url": "https://github.com/status-im/nim-zlib", - "downloadMethod": "git", - "dependencies": [ - "stew" - ], - "checksums": { - "sha1": "bffa9edcea9c879d827ec64a44d342dafd04ce7a" - } - }, "websock": { "version": "0.1.0", "vcsRevision": "2c3ae3137f3c9cb48134285bd4a47186fa51f0e8", @@ -231,16 +231,6 @@ "checksums": { "sha1": "223051771677a01f8cb38c15552c4f4fc9893ea4" } - }, - "nim": { - "version": "2.1.1", - "vcsRevision": "940b1607b8459b4b7b7e20d316bec95c8de85809", - "url": "https://github.com/nim-lang/Nim.git", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "ee369ca2ef4fd48e55732c09c5f8b67a4a22daa4" - } } }, "tasks": {} diff --git a/nimlangserver.nim b/nimlangserver.nim index 8cefa35..ce060f2 100644 --- a/nimlangserver.nim +++ b/nimlangserver.nim @@ -3,7 +3,7 @@ import macros, strformat, faststreams/async_backend, json_rpc/streamconnection, os, sugar, sequtils, hashes, osproc, suggestapi, protocol/enums, protocol/types, with, tables, strutils, sets, ./utils, ./pipes, chronicles, std/re, uri, "$nim/compiler/pathutils", - procmonitor, std/strscans, parsecfg + procmonitor, std/strscans, parsecfg, json_serialization, serialization/formats const @@ -72,6 +72,9 @@ type Cfg, Nimble +createJsonFlavor(LSPFlavour, omitOptionalFields = true) +Option.useDefaultSerializationIn LSPFlavour + macro `%*`*(t: untyped, inputStream: untyped): untyped = result = newCall(bindSym("to", brOpen), newCall(bindSym("%*", brOpen), inputStream), t) diff --git a/nimlangserver.nimble b/nimlangserver.nimble index 4473735..10b01e3 100644 --- a/nimlangserver.nimble +++ b/nimlangserver.nimble @@ -12,7 +12,10 @@ requires "nim >= 1.0.0", "https://github.com/nickysn/asynctools#fixes_for_nimlangserver", "https://github.com/yyoncho/nim-json-rpc#notif-changes", "with", - "chronicles" + "chronicles", + "serialization", + "json_serialization" + --path:"."