Commit Graph

1371 Commits

Author SHA1 Message Date
nullptrdevs
75f0617279
Skip incomplete fn_protos when generating folding ranges (#958) 2023-02-02 23:38:09 -05:00
Auguste Rame
5ec4770ac2
Fix CI checkout origin (#959) 2023-02-02 23:07:49 -05:00
Techatrix
1b3c3defb7
rewrite folding range (#954) 2023-02-01 18:29:36 -05:00
Techatrix
767cf7a52d
fix iterateChildren on if (#951) 2023-02-01 12:11:45 +00: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
eac61ba8be update data files 2023-01-28 22:42:13 +00:00
Techatrix
3080a5d315 fix config_gen 2023-01-28 22:42:13 +00:00
Techatrix
805e8389cb Update README.md 2023-01-28 22:40:37 +00:00
Techatrix
2857237f74
add colon to inlay hint label (#944) 2023-01-27 15:59:11 +01:00
Techatrix
e055f9d15c
remove unused capacity from Ast and DocumentStore (#941) 2023-01-26 16:57:07 -05:00
Techatrix
6019eff13e
Fuzzer fixes (#940)
* better handling of container_decl_arg_trailing

* ignore semantic token when moving backwards

* use custom ast functions instead of from std
2023-01-26 16:04:49 -05: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
d2586f79a1
replace ArrayList with MultiArrayList in DocumentScope (#938) 2023-01-24 15:43:48 -05:00
Auguste Rame
ed9cf06d5f
Properly refer to external repositories instead of lumping everything into zls (#936) 2023-01-23 00:23:21 -05:00
Álan Crístoffer
0e53ac1328
Partially fixes #907 (#908) 2023-01-22 17:52:04 -05: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
Auguste Rame
8e98bd439b
pull_request -> pull_request_target all over (#935) 2023-01-22 15:27:17 -05:00
Auguste Rame
3a86687ae7
Fix secrets access in foreign PRs (#934) 2023-01-22 14:54:38 -05:00
Auguste Rame
e2307d7dbf
Fix fuzzing ref (#933) 2023-01-22 05:46:35 -05:00
Auguste Rame
12e996ad96
Fix env transfer (#932) 2023-01-22 05:40:03 -05:00
Auguste Rame
7b35c6e5eb
Last fuzzing PR for a while hopefully (#929) 2023-01-22 03:30:10 -05:00
Auguste Rame
211a852efc
Fix fuzzing paths (#928) 2023-01-21 21:49:05 -05:00
Auguste Rame
d670a4bbf2
Add fuzzing workflow (#927) 2023-01-21 18:27:16 -05:00
Techatrix
5afaf2ae3a
optimize folding range (#926) 2023-01-21 13:32:12 -05:00
Aleksey Kladov
ea05916e69 Goto definition works when the cursor is at the start of the identifier.
Before, the code lexed only a prefix of the line up to cursor position.
Now, we lex the entire line, and do look at the token just after the
cursor.

This subtly changes sematncih of `getPostionContext`: now it is becomes
oblivious of the _exact_ position of the cursor and returns the whole
token at cursor's position.

I believe this is semantically right approach -- _most_ of the callsite
should not worry at all about such details. Something like completion
_might_ want to know more, but it's better to make that call site's
problem.

It might be the case that some existing code relies on the past
behavior. It's hard to tell though -- we don't have a lot of tests for
_features_, and changes to unit-tests don't explain if the changes are
meaningful for user-observable behavior or not.

In general, for LSP-shaped thing, I feel that the bulk of testing should
be focused on end-to-end behaviors....
2023-01-21 18:31:26 +00:00
Techatrix
1ed8d49b30
fix builtin completions if label_details_support is false (#924) 2023-01-20 19:33:27 -05:00
Techatrix
fa5828496e
Generate data files in config_gen.zig (#903)
* generate data files in config_gen.zig

* remove trailing comma from config.json

* update README.md

* run zig build gen

* handle some unclosed tags

* update data file header

* generate new data files

* remove old data file generators
2023-01-19 01:46:42 -05:00
Alex Kladov
6949989ece
Allow setting test filter in zig build test (#909)
Example usage:

  $ zig build test -Dtest-filter=definition
2023-01-17 12:40:26 -05:00
Auguste Rame
93abb8cdd5
Fix bypass not having value on PR&commit (#920) 2023-01-16 20:49:28 -05:00
Auguste Rame
52df02c0f1
Add fuzzing on deploy (#918) 2023-01-16 20:15:12 -05: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
8d53a5382d
resolve type of @typeInfo (#915) 2023-01-16 13:46:33 -05:00
Alex Kladov
61fa98065f
fix use after free (#911) 2023-01-11 20:18:37 +00:00
Lee Cannon
20d29fd491
move log overrides into std_options (#902) 2023-01-10 16:52:03 -05:00
Techatrix
bbbd54498d
check submodules in build.zig (#904) 2023-01-10 13:36:28 +01:00
Alex Kladov
a6b7a35367
add tests for textDocument/Definition (#900) 2023-01-10 09:40:40 +00: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
Auguste Rame
21b103c158
Fix build runner cwd causing relative @src (#898)
Co-authored-by: Nameless <truemedian@gmail.com>

Co-authored-by: Nameless <truemedian@gmail.com>
2023-01-08 23:13:20 -05:00
Techatrix
68790c73a7
return from main instead of calling exit (#894) 2023-01-08 23:13:02 -05:00
Auguste Rame
48288e02a9
Revert "Fix Nix build, add Nix to CI (#840)" (#893)
This reverts commit 20ba87c173.
2023-01-07 18:14:45 -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
erikarvstedt
20ba87c173
Fix Nix build, add Nix to CI (#840)
* Nix: Reuse input `flake-utils` in `zig-overlay`

* CI/main: convert line endings from `CRLF` to `LF`

* CI: Add Nix build
2023-01-07 15:20:54 -05:00
Techatrix
2717b0fba1
Verify minimum zig version at comptime (#885)
* verify minimum zig version at comptime

* run zig fmt
2023-01-06 13:59:58 -05:00
Techatrix
3f2700eaa5
improve completion on error and enums (#887) 2023-01-06 13:59:20 -05:00
mlugg
b163be51d3
Fix crash when using nvim-lspconfig (#884)
Apparently, nvim reports its code action kinds using both the actual
strings (e.g. "refactor.extract") and the enumeration names (e.g.
"RefactorExtract"). I don't know why this is done - possibly an attempt
at compatibility with non-compliant server implementations? Regardless,
this was causing a crash on init (when tres tried to parse an
initializaiton message), which is easily fixed by just supporting those
enumeration values.

Resolves: #867
2023-01-05 13:50:02 -05: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