Alexandros Naskos
d397f1119e
Merge branch 'master' of github.com:zigtools/zls
2021-04-05 11:59:05 +03:00
Alexandros Naskos
2770321a61
Use a null filterText instead of an empty string by default
2021-04-05 11:58:41 +03:00
Tau
fc51dac30e
Fix stack overflow in resolveUse and int overflow in lookupSymbolGlobal
2021-04-05 01:35:33 +03:00
Alexandros Naskos
4bee4e662b
Made lookupGlobalSymbol start the search from the innermost scope that contains the source index
2021-04-04 15:28:57 +03:00
Alexandros Naskos
04372999aa
Fixed underflow in edgecase in getDocCommentTokenIndex
2021-04-04 02:12:57 +03:00
Tau
406214fb43
Fix stack overflow on missing return value & improve getDocCommentTokenIndex correctness ( #290 )
...
* Improve getDocCommentTokenIndex correctness
* Fix stack overflow on missing return value
2021-04-04 02:03:25 +03:00
Alexandros Naskos
42aefd2e67
Merge pull request #284 from zigtools/signature_help
...
Added signature help request handling.
2021-04-03 09:09:50 -07:00
Alexandros Naskos
cc3c146749
Correctly handle skipping self parameters in signature help requests
...
as well as completion requests.
2021-04-03 18:54:26 +03:00
Tau
28f2431b2e
Fix crash on Windows ( #286 )
...
* Fix crash on Windows
2021-04-03 12:14:52 +03:00
Alexandros Naskos
8d95218575
Resolve aliases when looking for the function prototype to generate
...
signature information.
Fixed doc comments in function signature information.
2021-04-03 02:53:41 +03:00
Alexandros Naskos
7f432d8715
Implemented the signature help request.
...
Refreshes builtin data, added 0.7.1 builtins
2021-04-02 20:49:01 +03:00
Alexandros Naskos
9cc8085699
Started signature help implementation
2021-04-01 14:20:37 +03:00
Alexandros Naskos
f45a934f50
Fixed for latest zig master
2021-04-01 14:19:02 +03:00
Tau
df22d2490b
Update zinput, known-folders and enable global configuration ( #277 )
2021-03-31 17:54:27 +03:00
Alexandros Naskos
5e8e14fc08
Correctly pass zig_exe_path to document_store initialization
2021-03-31 16:26:55 +03:00
Alexandros Naskos
cfae9b4d13
If the local configuration directory cannot be opened, zls config will now
...
fallback to opening the executable directory instead.
Added better error handling in zls config.
2021-03-31 14:46:56 +03:00
Alexandros Naskos
8cf6029f1a
Before documentPositionContext returns .empty, check if an identifier
...
immediately follows the cursor and return .var_access if it does
instead.
This allows hover and go to definition to work when the cursor is
immediately before an identifier.
2021-03-31 02:25:49 +03:00
Jonathan Hähne
443d5c77a7
Remove config target from build
...
The configuration is per-installation and has nothing to do with the
build.
2021-03-30 23:52:25 +02:00
Jonathan Hähne
2fc9506fdc
Refactor config wizard
...
Deduplicated zig finder and added `zls config` subcommand
2021-03-30 23:52:25 +02:00
Alexandros Naskos
ba668094ad
Yet more import resolution fixes
2021-03-30 21:44:37 +03:00
Alexandros Naskos
6edd686668
Yet more import resolution fixes
2021-03-30 21:41:04 +03:00
Alexandros Naskos
40edfadc26
Fixed memory leak caused by DocumentStore.resolveImports
2021-03-30 21:18:46 +03:00
Alexandros Naskos
2415e7ca6d
Removed all zig.ast.Tree methods that call lastToken with our own versions
2021-03-30 20:59:58 +03:00
Alexandros Naskos
5a88f26980
Fixed dereference resolution of Type.data.pointer values
2021-03-30 16:45:49 +03:00
Alexandros Naskos
f382a1b22d
Better import handling
2021-03-30 15:41:59 +03:00
Jonathan Hähne
11a5d99c93
No stack frame capture for non-debug modes
2021-03-30 12:38:07 +02:00
Jonathan Hähne
b7cbb10610
Fix memory leaks
...
Closes #262 .
2021-03-30 12:33:31 +02:00
Jonathan Hähne
c7158f7625
Remove checks again
2021-03-30 11:23:09 +02:00
Jonathan Hähne
83f153e87e
Actually make it build (sem-token support has regressed previously!)
2021-03-30 11:07:29 +02:00
Jonathan Hähne
aab9ca18f2
Fix some crashes & find all @imports
...
If there are parse errors, an AST can contain uninitialized nodes.
Walking the tree in this case can lead to horribly nasty crashes.
2021-03-30 10:33:21 +02:00
Austin Clements
ec7ed30e65
Add check for semantic tokens client capability
2021-03-29 19:04:55 -05:00
Alexandros Naskos
b417e64e10
Do not show tests in container completions
2021-03-29 15:41:58 +03:00
Alexandros Naskos
bd3f0460ba
Merge pull request #267 from InterplanetaryEngineer/master
...
Accelerate symbolReferencesInternal further and improve refreshDocument algorithm
2021-03-29 05:38:46 -07:00
Alexandros Naskos
e770e2bead
Fixed regression from latest commit
2021-03-29 15:35:14 +03:00
Jonathan Hähne
ec1ee55dee
Accelerate symbolReferencesInternal by another factor of 2 and activate unit tests
2021-03-29 14:08:38 +02:00
Jonathan Hähne
9a2695ecdb
Improve refreshDocument algorithm
...
Do not use an arena, orderedRemove or bool array.
Also, rudimentary tests suggest the config parser does not account for
a substantial amount of the compile time.
2021-03-29 14:08:37 +02:00
Alexandros Naskos
962327425d
Fixed enum completion generation
2021-03-29 14:57:16 +03:00
Alexandros Naskos
4e753338af
Added error set and enum completion deduplication
2021-03-29 14:02:58 +03:00
Alexandros Naskos
360c437d6a
Some style fixes in analysis.zig
2021-03-29 13:01:24 +03:00
Alexandros Naskos
81500697db
Fixed crash in makeScopeInternal
2021-03-29 12:40:52 +03:00
Alexandros Naskos
2d168ed63e
Fixed error completion generation when making document scopes
2021-03-29 12:28:52 +03:00
Jonathan Hähne
826172edeb
Improve textDocument/references performance
...
Filtering out documents in symbolReferences that do not @import the file
defining the symbol led to an order of magnitude speedup in the projects
that I tested.
2021-03-28 17:05:22 +02:00
Alexandros Naskos
48b5ca5385
Always send an insertText field in completion items
2021-03-28 17:02:48 +03:00
Jonathan Hähne
b33e26612a
Add option to truncate long completions
...
The detail entries for big structs such as std.zig.CrossTarget were
bricking the preview window in Sublime Text.
2021-03-27 20:37:51 +01:00
Alexandros Naskos
3e300e4d74
Added our own ifFull implementation, fixes some crashes
2021-03-26 21:46:49 +02:00
Alexandros Naskos
9eece0985b
Fixed crash while typing error.
2021-03-26 21:14:47 +02:00
Alexandros Naskos
2fd8ab7626
Fixed error.<Foo> highlighting
2021-03-26 21:11:35 +02:00
Alexandros Naskos
06518778c1
Removed comment preprocessing code from the semantic tokens gap highlighter,
...
Fixed various comment semantic highlighting issues.
Refactored some minor parts of the analysis code.
2021-03-26 21:04:51 +02:00
Jonathan Hähne
a2620d7f69
Add option for builtin completion insert text
2021-03-26 10:20:20 +01:00
Alexandros Naskos
eb0a31d282
Reversed builtin completion insert text
2021-03-26 09:23:40 +02:00