Commit Graph

167 Commits

Author SHA1 Message Date
Techatrix
498517ba71 replace semantic token type .field with .property 2023-05-21 21:48:46 +02:00
Techatrix
ae5fa110b5 test and simplify semantic tokens on function call 2023-05-21 21:48:46 +02:00
Techatrix
3fefcfb398 simplify semantic token comment handling 2023-05-21 21:48:46 +02:00
Techatrix
3500aa7a76
update to new std.json api (#1191)
* update lsp.zig

* update to new `std.json` api

* update min zig version

* fix json api
2023-05-18 20:46:22 -04:00
Techatrix
029f5094ff
various intern pool & comptime interpreter changes (#1179)
* intern_pool: add getUnsignedInt

* add an empty struct literal

* resolve array length as usize in comptime interpreter

* use only one global intern pool

* store analysis errors in `DocumentStore.Handle`

* add typed undefined value

* add typed null value
2023-05-09 00:25:26 -04:00
Rekai Musuka
ec50d33241 fix: update test case involving @memcpy 2023-05-04 00:51:13 -05:00
Lee Cannon
825cbd2e07
Merge pull request #1142 from Techatrix/iterate-asm
implement `iterateChildren` on asm
2023-04-17 23:03:15 +01:00
Lee Cannon
2e282d991b
Merge pull request #1143 from Techatrix/test-struct-init-completion
add completion tests on struct init fields
2023-04-17 22:59:55 +01:00
Techarix
c0498fffa1 add completion tests on struct init fields 2023-04-17 23:25:20 +02:00
Techatrix
92eaa22c30 implement iterateChildren on asm 2023-04-17 23:03:54 +02:00
Casey Banner
3ae56929fc
Implement $/setTrace and add --enable-message-tracing (#1135) 2023-04-16 12:04:42 -04:00
Techatrix
b970dd20a3
remove zls.json (#1108) 2023-04-03 11:22:51 -04:00
Techatrix
1e733a8782 fix block label completion test 2023-03-23 15:13:33 +00:00
Techatrix
1df17e8aa5 enable successful references test 2023-03-23 15:13:14 +00:00
Techatrix
6530fe01c4 implement testing for cross-file references 2023-03-23 15:13:14 +00:00
Techatrix
5944db49b3 add multi-file support to ErrorBuilder
colorize ErrorBuilder output
2023-03-23 15:13:14 +00:00
Techatrix
37e3cb463d generate distinct uris in Context.addDocument 2023-03-23 15:13:14 +00:00
Veikka Tuominen
61b42ca63a make semantic token configuration an enum 2023-03-23 15:02:12 +00:00
Techatrix
3c165eabcd remove boxed null boilerplate 2023-03-21 16:58:05 +00:00
Techatrix
0c333aaa8a do not print error messages in comptime interpreter tests 2023-03-21 16:58:05 +00:00
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
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
42a8d1adb7 add more Ast tests 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
1fb7bfc63f update failing semantic tokens test 2023-03-06 09:32:03 -08: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
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
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
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
Techarix
2dffa9ef25 Merge branch 'master' into intern-pool 2023-02-14 23:48:57 +01:00
Techatrix
37ca1333ed
implement cInclude completions & goto definition (#970)
* implement cInclude completions & goto definition

* fix cImport features on windows

* fix relative path with `..`
2023-02-11 20:25:55 +00:00
Auguste Rame
bf19ed3ea9
Switch to Diff Match Patch (diffz) (#982)
* Add tests, note about correctness issue

* Use diffz (DiffMatchPatch)
2023-02-11 14:21:10 -05:00
Alex Kladov
73d6264cab
Fix missing nodes in outline (#990)
* Remove some boilerplate from test

* Fix missing nodes in outline
2023-02-11 14:20:01 -05:00
Alex Kladov
0d3b0e9965
Remove some boilerplate from test (#988) 2023-02-11 14:19:37 -05:00
Alex Kladov
0e5e1fdb8a
add testing infra for textDocument/documentSymbol (#987)
* add testing infra for textDocument/documentSymbol

* add failing test for 986
2023-02-11 01:31:06 -05:00
Techatrix
5cb0c98db1 fix function call resolution 2023-02-11 00:04:08 +01:00
Techatrix
d98060b3d6 more closely match Zir.Inst.Ref to InternPool.Index 2023-02-10 19:10:58 +01:00
Techarix
57fc10eec0 add predefined values to Index 2023-02-08 21:01:15 +01:00
Techarix
6278880f42 Merge branch 'master' into intern-pool 2023-02-08 20:10:17 +01:00
Techatrix
1b3274aa9c
simplify symbol references handler (#978) 2023-02-06 04:25:29 -05:00
nullptrdevs
bd539ae989
[std.zig.] parse(alloc, src) -> Ast.parse(alloc, src, Ast.Mode) (#966)
* Work in Zig's breaking changes (build sys apis)

* [`std.zig.`] `parse(alloc, src)` -> `Ast.parse(alloc, src, Ast.Mode)`
2023-02-04 18:19:24 +00:00
Techarix
ef0cfadf8a Merge branch 'master' into intern-pool 2023-02-03 23:19:40 +01:00
Techatrix
1b3c3defb7
rewrite folding range (#954) 2023-02-01 18:29:36 -05:00
Techatrix
7b3cc1d6d4
Optimize inlay hints (#948)
* optimize inlay hints

* update iterateChildren

* add tests for nodesAtLoc
2023-01-31 22:41:39 -05:00
Techatrix
3872915701 more comptime interpreter tests 2023-01-28 19:22:51 +01:00