Techatrix
421a05ae5f
send response on shutdown request ( #1037 )
2023-03-06 13:34:09 -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
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
Auguste Rame
ed908a2511
Rerun build.zig configuration extraction on zig_exe_path change ( #1027 )
2023-02-27 17:52:05 -05: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
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
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
nullptrdevs
b28d3aadd7
Configuration handling fixes ( #995 )
...
* Fortify `server.handleConfiguration`.
* Move call to `server.registerCapability` within `server.initializedHandler`(was being sent prematurely).
2023-02-13 17:59:06 -05: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
Techatrix
5754f362c6
Merge branch 'master' into intern-pool
2023-02-11 00:41:29 +01:00
Techatrix
6d387bca11
improve comptime interpreter dot completions
2023-02-11 00:34:30 +01:00
Techarix
6278880f42
Merge branch 'master' into intern-pool
2023-02-08 20:10:17 +01:00
Techatrix
8ec82321d4
remove arena allocator from analysis ( #981 )
...
* remove arena allocator from analysis
* fuzzer fix
* deinit `BoundTypeParams`
2023-02-07 17:44:04 -05:00
Techarix
66b7d7ad58
implement goto definition for cImport
2023-02-04 16:41:26 -08:00
Techarix
5f0d3bb886
show c source when hovering over cImport
2023-02-04 16:41:26 -08: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
ca644d67c1
Merge branch 'master' into intern-pool
2023-01-26 16:16:40 +01:00
Techatrix
fe54fb7cfa
Use new ast helper functions ( #939 )
...
* use new ast helper functions
* use new ast helper functions
* update min build version
* fix merge conflicts
2023-01-24 18:55:38 -05:00
Techatrix
b09c317ae7
bug hunting
2023-01-24 22:07:19 +01:00
Techatrix
05ad3294f1
use ArrayList for dotCompletions
2023-01-24 17:00:14 +01:00
Techatrix
829f4aa9c4
use analyser/completions.zig
for completing comptime interpreter
2023-01-23 22:23:01 +01:00
Álan Crístoffer
0e53ac1328
Partially fixes #907 ( #908 )
2023-01-22 17:52:04 -05:00
Techatrix
0817d6008b
redesign InternPool encoding
2023-01-22 21:59:30 +01:00
Álan Crístoffer
903f85ab94
Fix lsp weird behaviour on block cursors ( #891 ) ( #905 )
...
* Fix lsp weird behaviour on block cursors (#891 )
Adds lookahead option to getPositionContext.
2023-01-22 15:47:53 -05:00
Techatrix
5afaf2ae3a
optimize folding range ( #926 )
2023-01-21 13:32:12 -05:00
Techatrix
1ed8d49b30
fix builtin completions if label_details_support
is false ( #924 )
2023-01-20 19:33:27 -05:00
Techatrix
ba42fd2bb9
Merge branch 'master' into intern-pool
2023-01-20 22:23:44 +01:00
Techatrix
407f921ef8
refactor type printing
2023-01-17 20:23:27 +01:00
Techatrix
9e74afada6
show better zig/zls version mismatch messages ( #917 )
...
* show better zig/zls version mismatch messages
* always show message if versions don't match
* ignore patch
2023-01-16 13:49:00 -05:00
Techatrix
af85a9550d
simplify formatting handler ( #916 )
2023-01-16 13:47:55 -05:00
Techatrix
4e4761b34c
fix use after free for builtin completions ( #914 )
2023-01-16 13:47:06 -05:00
Techatrix
4423a5face
improve memory allocations ( #889 )
...
* improve memory allocations
* Update src/main.zig
Co-authored-by: erikarvstedt <36110478+erikarvstedt@users.noreply.github.com>
* add missing 0x21
Co-authored-by: erikarvstedt <36110478+erikarvstedt@users.noreply.github.com>
2023-01-09 11:09:36 -05:00
Techatrix
68790c73a7
return from main instead of calling exit ( #894 )
2023-01-08 23:13:02 -05:00
Techatrix
e9b364772d
fix returning freed memory in formattingHandler ( #890 )
2023-01-07 16:33:10 -05:00
Techatrix
54e7d1da8b
fix compile errors when targeting wasm ( #886 )
...
* fix compile errors when targeting wasm
* update known-folders
2023-01-07 15:21:20 -05:00
Techatrix
3f2700eaa5
improve completion on error and enums ( #887 )
2023-01-06 13:59:20 -05:00
Techatrix
f0c888188a
refactor and basic struct/union value implementation
2023-01-06 14:12:29 +01:00
Techatrix
d56a274c16
Merge branch 'master' into intern-pool
2023-01-04 04:42:06 +01:00
Auguste Rame
20baa592eb
Add error return trace ( #882 )
2023-01-03 15:37:59 +00:00
Techatrix
a574ac68ba
use more explicit error sets ( #880 )
2023-01-03 10:21:58 -05:00
Techatrix
c718e12d16
Autofix improvements ( #879 )
...
* improve autofix stability and client support
* run zig fmt
2023-01-02 14:59:01 -05:00
Techatrix
3449269fd3
Add a replay feature to zls ( #857 )
...
* add config options for `zls --replay`
* implement `zls --replay`
* remove carriage return from zls replay files
* add missing arguments for Server.init in tests
2022-12-31 01:45:45 -05:00
Techatrix
d86d05d969
fix ast-check with single error ( #865 )
2022-12-30 18:43:40 -05:00
Techatrix
f473088b64
fix crashes found through fuzzing ( #866 )
2022-12-30 18:42:28 -05:00
Techatrix
978e41b8a5
always use scoped logs instead of default ( #864 )
2022-12-29 18:20:12 -05:00
Álan Crístoffer
c6d74dbca5
fix: tres not available in a nix environment. ( #855 )
2022-12-29 13:36:38 -05:00