summary refs log tree commit diff stats
path: root/lib/std/jsformdata.nim
diff options
context:
space:
mode:
authorNikolay Nikolov <nickysn@gmail.com>2023-11-04 09:51:09 +0200
committerGitHub <noreply@github.com>2023-11-04 08:51:09 +0100
commit3f2b9c8bcf9faf30b6844e5222ffe6ec501064e8 (patch)
tree2a2633cfe9de1e8262ee9f9b251a13e7110c8ed7 /lib/std/jsformdata.nim
parent95e5ad6927af309552857686bf2c74bfac36cbb7 (diff)
downloadNim-3f2b9c8bcf9faf30b6844e5222ffe6ec501064e8.tar.gz
Inlay hints support (#22896)
This adds inlay hints support to nimsuggest. It adds a new command to
nimsuggest, called 'inlayHints'.

Currently, it provides type information to 'var' and 'let' variables. In
the future, inlay hints can also be added for 'const' and for function
parameters. The protocol also reserves space for a tooltip field, which
is not used, yet, but support for it can be added in the future, without
further changing the protocol.

The change includes refactoring to allow the 'inlayHints' command to
return a completely different structure, compared to the other
nimsuggest commands. This will allow other future commands to have
custom return types as well. All the previous commands return the same
structure as before, so perfect backwards compatibility is maintained.

To use this feature, an update to the nim language server, as well as
the VS code extension is needed.

Related PRs:
nimlangserver: https://github.com/nim-lang/langserver/pull/53
VS code extension: https://github.com/saem/vscode-nim/pull/134

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'lib/std/jsformdata.nim')
0 files changed, 0 insertions, 0 deletions