Files
Nim/compiler
Nikolay Nikolov 3f2b9c8bcf 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>
2023-11-04 08:51:09 +01:00
..
2023-10-31 21:32:09 +01:00
2023-11-04 08:51:09 +01:00
2023-10-29 14:47:22 +01:00
2022-09-27 10:57:47 +02:00
2017-01-07 22:35:09 +01:00
2023-05-06 21:27:28 +02:00
2021-01-12 09:36:51 +01:00
2023-10-31 21:32:09 +01:00
2023-11-04 08:51:09 +01:00
2023-08-06 14:26:21 +02:00
2022-03-23 20:34:53 +01:00
2023-11-04 08:51:09 +01:00
2023-10-31 21:32:09 +01:00
2023-07-02 22:36:05 +02:00
2023-11-04 08:51:09 +01:00
2023-08-06 14:26:21 +02:00
2023-11-04 08:51:09 +01:00
2023-10-12 23:33:38 +02:00
2023-10-12 23:33:38 +02:00
2023-10-12 23:33:38 +02:00

Nim Compiler

  • This directory contains the Nim compiler written in Nim.
  • Note that this code has been translated from a bootstrapping version written in Pascal.
  • So the code is not a poster child of good Nim code.

See Internals of the Nim Compiler for more information.