summary refs log tree commit diff stats
path: root/nimsuggest/tester.nim
Commit message (Collapse)AuthorAgeFilesLines
* + added nimsuggest support for exception inlay hints (#23202)Nikolay Nikolov2024-03-151-1/+7
| | | | | | | | | | | | | | | | | 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 basic macro expand functionality (#20579)Ivan Yonchovski2023-01-271-5/+10
| | | | | | | | | | | | | | | | | | * 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 (#19944)Ivan Yonchovski2022-07-151-1/+1
| | | | | | | | | | | * 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 (#19826)Ivan Yonchovski2022-06-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* fix #18385 followup, by building nimsuggest with -d:release during testing ↵Timothee Cour2021-07-291-4/+11
| | | | (#18581)
* disable tmacro_highlight on i386, refs #17945 (#17949)Timothee Cour2021-05-061-0/+4
|
* improve nimsuggest/tester, minor improvements to koch.nim (#17879)Timothee Cour2021-04-291-10/+12
| | | | | * improve nimsuggest/tester * koch improvements
* add `--processing:dots|filenames|off` to customize `hintProcessing` (#17817)Timothee Cour2021-04-231-3/+6
|
* compilesettings: add libpath (#16997)Timothee Cour2021-02-121-2/+4
| | | | | | | | | | | * compilesettings: add libpath * add test * changelog * fixup Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix nimsuggest warning (#13699)Jasper Jenkins2020-03-201-3/+3
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* better docs: osproc (#10708)Miran2019-02-191-2/+2
| | | | | * better docs: osproc * fix a typo in the docs, deprecate "demon"
* nimsuggest/tester: disable highlight tests for epc (#10426)alaviss2019-01-231-0/+4
| | | | The EPC backend of nimsuggest currently doesn't support nimsuggest highlighter, see nim-lang/nim-mode#140
* add nim c -r nimsuggest/tester to travis (#8805)Timothee Cour2018-08-291-2/+18
|
* cleanup nimsuggest tests a bitAndreas Rumpf2018-08-101-6/+6
|
* nimsuggest: maxresults limit; fixed local symbol usages priorizationsAndreas Rumpf2017-03-101-2/+1
|
* nimsuggest now uses 0 based columsn consistentlyAndreas Rumpf2017-03-101-2/+2
|
* nimsuggest: more precise cursor trackingAraq2017-03-091-0/+323