| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
nimsuggest outline should account for includes, now it does:
- the module prefix will be of the module doing the including
- the filename will be of the module that was included
- adds a test case for it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A number of nimsuggest tests were disabled for various reasons, sometimes due
to brittleness. These tests have been fixed where needed and most have are now
enabled -- details below. The updates are meant to provide better regression
coverage for future nimsuggest improvements. To avoid brittleness some tests
were refactored.
Impact:
* test coverage has now increased
* faster execution of the test suite
* tests are less likely to break due to stdlib changes
Re-enabled Test & Test Description:
* `tchk1.nim`: check (chk) via nimsuggest works at end of file
* `tdot4.nim`: prioritize already used completion
* `tinclude.nim`: definition lookup (def) with includes
* `tstrutils.nim` -> `tdef2.nim`: test template definition lookup (def)
* `tsug_regression.nim`: regression test for [nimsuggest #52](https://github.com/nim-lang/nimsuggest/issues/52)
* `ttemplate_highlight.nim`: per the file name
* `twithin_macro_prefix.nim`: suggest within a macro with a prefix
Tests Not Re-Enabled:
* `twithin_macro.nim` still disabled as it doesn't provide a good test signal
* EPC highlight tests remain disabled -- requires out of scope tester changes
Additional Notes:
* todos added in comments for follow-up work
|
| |
|
| |
|
|
|
|
| |
reality (#16057)
|
|
|
|
|
| |
* suggest: try to find the implementation of a symbol when def is used
* suggest: return all declarations of the symbol on `def`
|
| |
|
|
|
| |
* fix a bug that prevented nim doc compiler/nim on windows
|
|
|
|
|
|
|
| |
* Change severity of template instatiation msg
* Add a test
* Trailing newline argh
|
|
|
|
| |
* Handle nimsuggest in tryExpr
* Added test
|
|
|
|
|
|
|
| |
This pragma did nothing.
Ref:
- https://github.com/nim-lang/Nim/issues/2172#issuecomment-383276469
- https://github.com/nim-lang/Nim/issues/12975
|
|
|
|
|
|
| |
The operator fetching proc is greedy, so operators such as `%*` in
expression `%*{}` can't be highlighted.
This commit fixes that.
|
| |
|
| |
|
|
|
|
|
| |
* fix .deprecated. object typedef crash
* fixup a test that i don't understand
* disable the test rather than debug ci
|
|
|
|
|
|
|
|
| |
This reverts commit a974684b149faa19645f1e18b7b11aa67f169997.
The CRLF was to separate between each response, and removing them causes
the responses to not be splitted correctly.
I didn't notice that it was in a loop when I made the #13545.
|
|
|
| |
This is already sent by replTcp after the message is sent.
|
|
|
|
| |
a few magic numbers with consts (#13170)
|
| |
|
| |
|
|
|
| |
This allows for the type of a variable to be retrieved.
|
|
|
|
|
|
|
| |
The line info should now points to the `a`, not the `*`, like this:
a*: string
^
Additionally this fixes nimsuggest's highlighting of exported object
fields.
|
| |
|
|
|
|
|
|
|
| |
This can be used to let nimsuggest users know which project is
nimsuggest being in charge of, so they can know when should a new
nimsuggest instance be spawned.
An additional feature is to debug the project file finding feature.
|
| |
|
|
|
|
|
|
|
|
| |
Same as e9fa4c9b9c8e2926449399a69a02676936bb842c, but for the epc
backend which is used by emacs and vscode plugin.
Since the EPC backend only deal with one connection per nimsuggest
instance, only one socket is leaked, thus not as servere as with the tcp
backend.
|
|
|
|
|
|
| |
A new socket is created for each iteration and leak immediately thanks
to the accept() call replacing the created socket with the client socket.
This commit fixes that.
|
| |
|
|
|
|
| |
* fixes #12125
|
| |
|
|
|
|
|
|
| |
The default starting parameters for `line` and `col` were switched.
See line 141: "line starts at 1, column at 0, dirtyfile is optional".
Also, in `TLineInfo` object, `line` is uint16, `col` is int16.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#11385)
* make fullpaths the default in error messages and stack traces for more convenient development
* split up -d:release into -d:release and -d:danger flags
* workaround a Nim config parser bug
* fixes an old nim config parser bug
* make megatest green again
* make nimpretty tests work again
* make nimsuggest green
|
| |
|
|
|
|
|
| |
* allow void macro result
* add test for void macro result type
|
|
|
|
|
| |
* move assertions and iterators out of system.nim
* limit nimsuggest tests to the first 3 suggestions
|
|
|
|
| |
allows for more convenient debugging
|
| |
|
|
|
|
|
| |
* better docs: osproc
* fix a typo in the docs, deprecate "demon"
|
| |
|
|
|
|
| |
This makes signatures generated for nimsuggest correctly distinguish
template/macro/converter from proc.
|
|
|
| |
fixes #6199
|
|
|
|
|
|
|
|
|
|
| |
Previously the compiler would generate suggestions based on the symbol
identifier length, but that might not reflect the actual representation
of it within the actual source code.
This commit implements a simple source scanner for the suggest module to
address the problem outlined above.
Fixes nim-lang/nimsuggest#24
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The compiler believes these are where a macro call starts (marked with
`^`):
m "string"
^ ^
This commit addresses that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* compiler/sem*: better lineinfo for templates
Lineinfo for templates is inconsistant across the compiler, for example:
doAssert true
^ ^
a[int](10)
^^ ^
The `^` marks where the compiler thinks the template starts.
For qualified call, we got the same situation with `proc`s before #10427:
system.once
^
Generics lineinfo within template declaration is also incorrect, for
example, this is where the compiler believes the `T` in `[T]` is:
template a[T](b: T)
^
This PR addresses all of these problems.
* nimsuggest: add tests for template highlighting
|
|
|
|
| |
The EPC backend of nimsuggest currently doesn't support nimsuggest
highlighter, see nim-lang/nim-mode#140
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the compiler will believe these are where `newSeq` symbol
starts:
newSeq[int]()
^
system.newSeq[int]()
^
This commit moves them back to:
newSeq[int]()
^
system.newSeq[int]()
^
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* compiler/parser: preserve lineinfo for accent quoted symbols
Previously the lineinfo for symbol $$$ in this example is:
proc `$$$`
^
After this commit:
proc `$$$`
^
* compiler/semstmts: correct lineinfo for accent quoted idents
Previously nimsuggest would highlight this as:
proc `$$$`
^~~
After this commit:
proc `$$$`
^~~
* nimsuggest/tests: add a test for accent quoted proc
Disabled by default
|