Commit Graph

1535 Commits

Author SHA1 Message Date
Techatrix
0ff0a193cc simplify analysis by introducing a Analysis Struct 2023-03-14 15:16:30 +00:00
Techatrix
973d33d435 expand semantic token test coverage 2023-03-14 14:56:11 +00:00
Techatrix
865e5efe8b refactor semantic tokens 2023-03-14 14:56:11 +00:00
Techatrix
bbc082d102 update config gen to work with vscode-zig 2023-03-14 14:27:18 +00:00
Techatrix
dc7efa591c resolve relative include directories 2023-03-14 14:25:13 +00:00
Auguste Rame
ef4a0607fb
Add some more basic overflow checks (#1055) 2023-03-12 01:53:05 -05:00
Techatrix
a959f161e9
find references on test decl with identifier name (#1051) 2023-03-12 01:24:54 -05:00
Techatrix
ab23ff3616
Optimize document symbols (#1050)
* optimize document symbol generation

* match folding range index to position conversion and documentation to document symbol's

* skip function decls with no name

* skip document symbol field in opaque type
2023-03-12 01:24:42 -05:00
Techatrix
c203110555
more tracy calls (#1052) 2023-03-11 13:43:14 -05:00
Techatrix
ff467f9878
InternPool: add more helper functions and debug formatting (#1043) 2023-03-11 12:37:06 -05:00
Techatrix
333fcb5633
minor semantic token fixes (#1044)
* improve analysis and highlighting of error sets

* emit semantic token for unresolved identifiers

* minor semantic token fixes
2023-03-11 12:36:48 -05:00
Álan Crístoffer
f234b91a50
Fixes nix standard derivation. (#1042)
* Adds a formatter for nix. Use `nix fmt`.

* Fixes nix standard derivation.

The standard derivation has been broken for quite some time now, but I
didn't use it, so I didn't care to fix it. Today I cared. It now builds
and is updated for the new packaging system.
2023-03-10 20:27:50 -05:00
Techatrix
3c26892c7e
limit maximum detail length at 1024 bytes (#1048) 2023-03-10 20:06:17 -05:00
Techatrix
b8eb6aab7f
Merge pull request #1045 from Techatrix/memory-lifetime
fix leak in `openDocument`
2023-03-08 21:31:11 +00:00
Techatrix
ed91fd3823 fix leak in openDocument 2023-03-08 21:52:26 +01:00
Techatrix
42a8d1adb7 add more Ast tests 2023-03-07 09:38:18 -08:00
Techatrix
d5ac6b9734 rework nodesAtLoc 2023-03-07 09:38:18 -08:00
Techatrix
397b5bc78f add more tests to offsets.zig 2023-03-07 09:38:18 -08:00
Techatrix
7a7928f466 fix locIntersect 2023-03-07 09:38:18 -08:00
Techatrix
0ee947e8a6 add Ast to callback field in iterateChildren 2023-03-07 09:38:18 -08:00
Techatrix
0f3319315f implement textDocument/semanticTokens/range 2023-03-07 09:29:39 -08:00
Techatrix
ce9ae21cf4 fix lastToken on tagged union with invalid members 2023-03-07 09:21:46 -08:00
Auguste Rame
2ce59a3bc3
Branching type resolution (#1031)
* Branching type resolution

* Add condition information to completions (borked rn i give up)

* Fix completion conditional descriptor

* Multi gotodef

* Multi hover

* Reenable references

* Fix getAllTypesWithHandles
2023-03-07 12:17:45 -05:00
Techatrix
515a0e4727
Merge pull request #1039 from Techatrix/skip-failed-cimports
skip failed cimports on garbage collection
2023-03-07 14:01:38 +00:00
Techatrix
8e6609e0f5 skip failed cimports on garbage collection 2023-03-07 12:28:20 +01:00
Techatrix
421a05ae5f
send response on shutdown request (#1037) 2023-03-06 13:34:09 -05:00
Techatrix
1fb7bfc63f update failing semantic tokens test 2023-03-06 09:32:03 -08:00
Techatrix
bb1b1dd102 update version data 2023-03-06 09:32:03 -08:00
Álan Crístoffer
8edb8bcac3
Fixes nix build. (#1032)
* fix nix build

* fix nix build
2023-03-05 14:38:27 -05:00
dec05eba
76ee4b80fd
Fix crash if zls.json is empty (#1034)
Fixes #1033
2023-03-05 14:09:39 -05:00
Auguste Rame
121f68b970
Fix build runner (#1029)
* Fix build runner

* Add zls module, bump version

* Fix path from root issue in modules (thanks daremakemyday from Twitch :))

* Libraryify

* remove build_runner backward compatibility

* Remove some `= undefined`s in Server.zig

Makes library use less dangerous

* Consistent mem model + custom build runner possible

* Add build runner utils for third-party tooling

* Make logs removable in libraries with zls_ prefix

* Fix build runner CI

* Expose references

* Use new addModule
2023-03-05 14:08:31 -05:00
Meghan
a78950ce82
update zig submodules to new builtin dependency system (#1017)
* build.zig: collapse exe_options

* build.zig: convert zig submodules to new dependency system

* update minimum version so that package manager hashes work cross-platform
2023-03-03 01:26:15 -05:00
Techatrix
30869d7d87
InternPool: replace untyped values with typed values (#1023)
* InternPool: replace untyped values with typed values

* InternPool: remove `indexToTag`

* InternPool: rework representation of optional values

* add representation for unknown values and types

* ComptimeInterpreter: use InternPool typed-values

* ComptimeInterpreter: field access test

* ComptimeInterpreter: improve handling of if expressions

* InternPool: fix typeOf on a comptime float

* ComptimeInterpreter: implement TypeOf with multiple parameters
2023-02-27 17:53:46 -05:00
Techatrix
89ab9fdf70
make diff.edits memory safe (#1026) 2023-02-27 17:53:16 -05:00
Auguste Rame
ed908a2511
Rerun build.zig configuration extraction on zig_exe_path change (#1027) 2023-02-27 17:52:05 -05:00
Techarix
4b0da6f6ae fix folding range on multi line function declaration 2023-02-25 10:58:29 -08:00
Techarix
97f7fd77c6 fix folding range on structs with doc comment on first field 2023-02-25 10:58:29 -08:00
Lee Cannon
5ede46f003
support new module cli arguments (#1019)
* support new module cli arguments

* capture the runtime zig version and store it on `Server`

* update build_runner action

* Use correct version for selecting arguments
2023-02-23 15:18:52 -05:00
Lee Cannon
f1a8efbe5c
Make the CI trigger if the CI script itself is modified (#1022) 2023-02-22 22:41:49 -05:00
Techatrix
9cb569a196
update version data (#1021) 2023-02-23 00:03:10 +00:00
nullptrdevs
424a06b7ee
completeBuiltin fixes (#1015)
- Always return a copy to avoid memory corruption (most operations assume an arena allocated copy)
- label_details were only generated for the first (pre-fix) disposable copy
- Correct use_snippets logic (send only if configured and client supports them)
2023-02-22 16:30:21 +00:00
Walther Chen
f59fb1ec12
update flake.lock (#1018) 2023-02-22 10:58:24 +00:00
Techatrix
36738501cf
ignore an unknown CodeActionKind (#1001) 2023-02-21 22:27:47 +00:00
Techatrix
0f77fd5b0e
add multi object for loop support (#1011)
* run `zig fmt`

* add support for multi object for loops

* add completion tests on multi object for loops

* update minimum zig build version

* use multi object for loops in codebase

* Update tres to latest version

* fix panics when generating document scope on invalid for loops
2023-02-21 17:11:35 -05:00
Orhun Parmaksız
b635317e2a
build: add PIE (Position Independent Executable) option (#1013)
* build: add PIE (Position Independent Executable) option
2023-02-20 16:40:05 -05:00
Lee Cannon
8bd5358748
build_runner: provide valid global cache to the build runner (#1009) 2023-02-17 15:26:03 -05:00
Auguste Rame
c3f58538e8
Merge pull request #793 from Techatrix/intern-pool
ComptimeInterpreter: Intern Pool
2023-02-15 14:46:58 -05:00
Lee Cannon
abe07e601e
Fix build runner for latest changes (#1005)
* build_runner: update to use new caching system

* build_runner: switch ci to use 0.10.1 instead of 0.10.0

* build_runner: support older versions

* build_runner: ensure depreciated functions and types are handled when they are removed

* build_runner: prevent access denied on global cache
2023-02-15 13:36:06 -05:00
Techatrix
4f42c68a0a
improve error message when parsing zls.json (#1002) 2023-02-15 13:34:52 -05:00
nullptrdevs
dedb9deb08
Fix handling of invalid tokens in getPositionContext (#1006) 2023-02-15 13:33:58 -05:00