| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds nimsuggest support for displaying inlay hints for exceptions.
An inlay hint is displayed around function calls, that can raise an
exception, which isn't handled in the current subroutine (in other
words, exceptions that can propagate back to the caller). On mouse hover
on top of the hint, a list of exceptions that could propagate is shown.
The changes, required to support this are already commited to
nimlangserver and the VS code extension. The extension and the server
allow configuration for whether these new exception hints are enabled
(they can be enabled or disabled independently from the type hints), as
well as the inlay strings that are inserted before and after the name of
the function, around the function call. Potentially, one of these
strings can be empty, for example, the user can choose to add an inlay
hint only before the name of the function, or only after the name of the
function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implemented level based macro expand functionality
- it can handle single macro call or expand whole function/proc/etc and it
- In addition, I have altered the parser to provide the endInfo for the node.
The usefulness of the `endInfo` is not limited to the `expandMacro`
functionality but also it is useful for `ideOutline` functionality and I have
altered the ideOutline functionality to use `endInfo`. Note `endInfo` most of
the time is lost during the AST transformation thus in `nimsuggest.nim` I am
using freshly parsed tree to get the location information.
* Make sure we stop expanding correctly
* Test CI
* Fix tv3_outline.nim
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement type command
- this will be mapped to textDocument/typeDefinition in LSP protocol. It will be
very useful for `nim` in particular because typically most of the time the type
is inferred.
* Update nimsuggest/nimsuggest.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Initial implementation of nimsuggest v3
Rework `nimsuggest` to use caching to make usage of ide commands more efficient.
Previously, all commands no matter what the state of the process is were causing
clean build. In the context of Language Server Protocol(LSP) and lsp clients
this was causing perf issues and overall instability. Overall, the goal of v3 is
to fit to LSP Server needs
- added two new commands:
- `recompile` to do clean compilation
- `changed` which can be used by the IDEs to notify that a particular file has been changed.
The later can be utilized when using LSP file watches.
- `globalSymbols` - searching global references
- added `segfaults` dependency to allow fallback to clean build when incremental
fails. I wish the error to be propagated to the client so we can work on fixing
the incremental build failures (typically hitting pointer)
- more efficient rebuild flow. ATM incremental rebuild is triggered when the
command needs that(i. e. it is global) while the commands that work on the
current source rebuild only it
Things missing in this PR:
- Documentation
- Extensive unit testing.
Although functional I still see this more as a POC that this approach can work.
Next steps:
- Implement `sug` request.
- Rework/extend the protocol to allow better client/server communication.
Ideally we will need push events, diagnostics should be restructored to allow
per file notifications, etc.
- implement v3 test suite.
- better logging
* Add tests for v3 and implement ideSug
* Remove typeInstCache/procInstCache cleanup
* Add ideChkFile command
* Avoid contains call when adding symbol info
* Remove log
* Remove segfaults
|
|
|
|
| |
(#18581)
|
| |
|
|
|
|
|
| |
* improve nimsuggest/tester
* koch improvements
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* compilesettings: add libpath
* add test
* changelog
* fixup
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
| |
|
| |
|
|
|
|
|
| |
* better docs: osproc
* fix a typo in the docs, deprecate "demon"
|
|
|
|
| |
The EPC backend of nimsuggest currently doesn't support nimsuggest
highlighter, see nim-lang/nim-mode#140
|
| |
|
| |
|
| |
|
| |
|
|
|