Auguste Rame
57a35a7bc8
ast-check for zls!
2022-08-31 20:52:55 -04:00
Lee Cannon
da03c81992
Merge pull request #614 from Techatrix/show-config-path
...
add --show-config-path for querying the config path
2022-08-30 18:22:50 +01:00
Techatrix
d30cdabfe5
remove unnecessary check in setup wizard
2022-08-30 19:01:12 +02:00
Techatrix
7be7496ec8
only conditionally ask for global configuration in setup wizard
2022-08-30 01:07:46 +02:00
Techatrix
ffb3f9440e
add --show-config-path for querying the config path
2022-08-30 00:46:13 +02:00
Techatrix
b502134769
Merge pull request #613 from Techatrix/json-schema
...
add JSON Schema
2022-08-29 21:15:52 +00:00
Techatrix
9b7c73d9b1
add JSON Schema
2022-08-29 22:55:25 +02:00
Techatrix
605c4e2988
fix textDocument/rename
2022-08-29 21:28:05 +02:00
Techatrix
2ac8ab6ce9
Merge pull request #609 from Techatrix/test-coverage
...
Improve Test coverage
2022-08-26 19:12:01 +00:00
Techatrix
f6082e837d
prepare testing framework
...
- allow source files from tests as a package
- use `tests/tests.zig` as the entry point
- add `Context.requestAlloc`
2022-08-26 16:45:22 +02:00
nullptrdevs
b7a5ab5f52
fix: fix warning emitted incorrectly when using ..
2022-08-25 16:13:58 -07:00
nullptrdevs
481903e72a
fix: fix an attempt to use null value in DocumentStore.resolveImport
...
caused by missing files or weird file path starting
e.g.
```
pub const abc = @import(".////abc.zig");
```
2022-08-25 15:52:07 -07:00
nullptrdevs
54be6d92c6
fix: fix server crash related to parsing incomplete function as a function's parameter
...
fixes zigtools#567
2022-08-25 13:17:38 -07:00
Lee Cannon
8cf96fe27c
Merge pull request #605 from Techatrix/translate-c-patch-undef
...
emit correct c preprocessor macro in convertCInclude
2022-08-25 17:33:38 +01:00
Techatrix
127781962d
emit correct c preprocessor macro in convertCInclude
2022-08-25 16:25:47 +02:00
Techatrix
fce29fec41
patch allocator mismatch in translate_c
2022-08-25 15:16:27 +02:00
Lee Cannon
a18ec394f1
Merge pull request #602 from Techatrix/unmanage-code
...
unmanage all the code
2022-08-23 21:21:08 +01:00
Lee Cannon
163409f48f
Merge pull request #579 from jefftime/master
...
Text format to return edited ranges instead of entire document
2022-08-23 21:20:49 +01:00
Lee Cannon
7c245f7dd4
Merge pull request #595 from nullptrdevs/master
...
fix: fix memory leaks related to updating config variables
2022-08-23 15:04:30 +01:00
Techatrix
dc3199cffa
unmanage all the code
2022-08-23 12:44:26 +02:00
jefftime
5804454334
Merge branch 'zigtools:master' into master
2022-08-22 20:18:02 -04:00
Lee Cannon
eb60f75413
workaround zig tarball bug ( #599 )
2022-08-23 00:01:44 +02:00
nullptrdevs
015332b69e
Update analysis.zig
2022-08-22 10:54:29 -07:00
nullptrdevs
4d0ab8b1aa
Update Server.zig
2022-08-22 10:49:15 -07:00
Techatrix
333b1bad8c
fix Path <-> Uri mismatch
2022-08-22 16:54:56 +02:00
nullptrdevs
2c5ae262f7
fix: fix memory leaks related to updating config variables
...
adds an edge case in analysis.makeScopeInternal to prevent
leaking memory when adding duplicate container fields w/ name "other"
2022-08-21 17:11:50 -07:00
Techatrix
c6892eaafc
Merge branch 'zigtools:master' into cimport-support
2022-08-21 08:53:06 +00:00
Auguste Rame
fa48980acb
Merge pull request #591 from Techatrix/master
...
Update dependencies
2022-08-21 03:07:35 +02:00
Techatrix
2e61178a08
Update dependencies
2022-08-20 19:27:31 +02:00
Techatrix
8457487b2e
better handling for enum field signatures
2022-08-20 18:28:41 +02:00
Techatrix
f543659e31
correctly handle path to uri conversion
2022-08-20 15:34:36 +02:00
InKryption
63d84855a5
Improve unused variable report accuracy
2022-08-19 15:28:38 +02:00
InKryption
249685e4c5
2 minor tidy-ups + fix for over-eager unused parameter error in function types
2022-08-19 00:31:41 +02:00
Techatrix
d57f8e3a64
add basic cImport support
2022-08-19 00:00:46 +02:00
Techatrix
0436b05b80
rename build_runner_cache_path
to global_cache_path
2022-08-18 23:14:32 +02:00
Techatrix
1859afd4c5
emit JSON formatted packages & include dirs in build_runner.zig
2022-08-18 22:56:03 +02:00
Auguste Rame
41a467b0f3
Merge pull request #583 from InKryption/master
...
Improve CLI, fix leak, & other.
2022-08-18 20:23:47 +02:00
InKryption
cb5eeb0b45
Improve CLI, fix leak, & other.
2022-08-18 19:46:22 +02:00
Techatrix
29690f4e0b
Refactor Ast helper functions
2022-08-18 00:52:21 +02:00
Lee Cannon
673b4b3505
trigger completion after ]
2022-08-14 22:45:05 +01:00
Jeffery Stager
1fbf1c5427
Minor cleanup in formatting function
2022-08-13 17:23:39 -04:00
Jeffery Stager
254353a9f4
Add fallback to old behavior on diff failure
2022-08-13 17:16:53 -04:00
Jeffery Stager
4e33e1d61f
Working diff for formatting
2022-08-10 22:47:33 -04:00
Gregory Anders
c4f3cd0efa
Only return highlights for symbols in current document
...
This seems to only occur when highlighting "field access" symbols, e.g.
"bar" in a statement such as `foo.bar`. This is because the
`symbolReferencesInternal` function finds the reference to the field in
the container even when the container is not in the current document.
2022-08-10 16:03:00 -06:00
Techatrix
1ab262c625
Fix memory leaks
2022-08-06 01:30:43 +02:00
Auguste Rame
ea24928002
Merge pull request #574 from Techatrix/tokenize-undefined
...
Semantic token for keyword 'undefined'
2022-08-05 21:48:19 +02:00
Auguste Rame
a73c77db6d
Merge pull request #572 from Techatrix/patch-stduri
...
fix 'Cannot resolve std library import'
2022-08-05 21:48:00 +02:00
Techatrix
a30d310d7f
better semantic token for keyword undefined
2022-08-05 14:20:16 +02:00
Techatrix
cee46461e0
handle ptr_type_sentinel
2022-08-05 11:22:55 +00:00
Techatrix
c9d41650da
fix 'Cannot resolve std library import'
2022-08-05 13:01:39 +02:00
Techatrix
5d4c68e9c5
Add missing tests
2022-08-03 23:29:03 +02:00
Techatrix
ae5da361bf
Merge branch 'zigtools:master' into session-tests
2022-08-03 21:11:43 +00:00
Lee Cannon
d83e37d99a
provide build_runner command on failure ( #569 )
2022-08-03 13:43:34 -04:00
Techatrix
f2315e0c7a
Format zls.json
in setup wizard ( #568 )
2022-08-02 14:28:27 -04:00
Techatrix
fca78a98b0
move ArenaAllocator into Server
2022-08-01 00:44:07 +02:00
Techatrix
805148125c
revive session tests
2022-07-31 23:39:33 +02:00
Techatrix
75570aef3c
add writer interface to Server & move main to main.zig
2022-07-31 23:38:27 +02:00
Lee Cannon
cf8baa3586
fix format string ( #565 )
2022-07-27 15:46:03 -04:00
haze
528fd26a13
update format specifiers for optional strings ( #564 )
2022-07-27 09:41:45 -04:00
Auguste Rame
913d6aee9d
Fix tests for real? ( #562 )
...
* Actually a horrible patch
2022-07-25 16:09:54 -04:00
Lee Cannon
98e5451d98
support 0.9 and master ( #561 )
2022-07-24 17:08:14 -04:00
Techatrix
224332d3a8
update README.md and setup
...
- update notes for VS Code according to new changes in zls-vscode
- add instructions for setting up Helix editor
2022-07-24 17:01:05 +02:00
alvv-z
e8bbb20783
Update setup wizard for ST4 ( #461 )
...
* Set include_at_in_builtins to false if Sublime Text version > 4000
2022-07-24 07:58:26 -04:00
Techatrix
0ecdeeecb1
Implement textDocument/inlayHint ( #559 )
...
* Implement textDocument/inlayHint
* Add corresponding Config options
2022-07-24 07:38:13 -04:00
Auguste Rame
39e4a561b2
Merge pull request #484 from gpanders/documentHighlight
...
Implement textDocument/documentHighlight
2022-07-23 05:30:57 -04:00
Gregory Anders
b71a83b64a
Limit references to current document for documentHighlight
2022-07-22 19:38:26 -06:00
Gregory Anders
94770b86c6
Implement textDocument/documentHighlight
2022-07-22 19:37:06 -06:00
Techatrix
d734245141
Highlight orelse as a keyword
2022-07-23 00:34:53 +00:00
Auguste Rame
5f9b9c564c
Fix tokenRelativeLocation
...
Closes #354
Closes #543
2022-07-17 16:29:03 +02:00
Veikka Tuominen
427f7b12ef
update to IterableDir changes in Zig std
2022-07-17 13:03:30 +02:00
Veikka Tuominen
410a2dd6dd
add f80
2022-07-17 13:03:26 +02:00
Auguste Rame
8e2e597ec3
Refactor builds!
2022-07-17 12:17:55 +02:00
Auguste Rame
1d910ed973
Start refactoring main -> Server's globals
2022-07-17 12:00:29 +02:00
Auguste Rame
6f19772c17
Fix config source of truth problems, refactor some more
2022-07-15 18:06:18 +02:00
Auguste Rame
4507f4a275
Add Discord link, DocumentStore now uses the config source of truth!
2022-07-15 14:51:36 +02:00
Auguste Rame
c640903c98
Fix container function param completion
...
Closes #521
2022-07-14 14:44:22 +02:00
Auguste Rame
2e379336b9
(Hopefully) fix configuration uri/memory bugs
...
Closes #533
2022-07-14 12:43:10 +02:00
Ali Chraghi
5162e9a803
setup: Update vscode configuration snippet
2022-07-12 22:31:29 +04:30
Techatrix
6b66820677
Remove unnecessary pointer indirection
2022-07-11 23:57:41 +00:00
Auguste Rame
37f79c86fa
Fix CI?
...
I really need to fix Zig's error handling on message send failure, it's so bad 😭
2022-07-11 20:28:50 +02:00
Auguste Rame
acd57ddb16
workspace configuration server request model implemented!
2022-07-11 15:45:31 +02:00
Auguste Rame
3b33750f59
Add config option, fix config wizard, fix random crash and extern unused highlighting
2022-07-09 05:23:53 -04:00
Auguste Rame
43c61b3da6
@import and @embedFile completions!
2022-07-09 05:23:53 -04:00
Auguste Rame
bb89c3518b
Nice to have style hint and bug fix
2022-07-09 05:23:53 -04:00
Auguste Rame
5838a34101
Fix small bugs
...
Thanks for the heads up Travis :)
2022-07-08 22:57:34 +02:00
Auguste Rame
0c0cb261b7
Basic variable type resolution on hover
2022-07-08 15:15:50 -04:00
Auguste Rame
0f3eb1df36
Fix function snippets not working with details
2022-07-08 04:57:58 -04:00
Auguste Rame
a96532aa65
Add config option for unused vars
2022-07-08 04:26:31 -04:00
Auguste Rame
e5e76c8063
Add super basic unused variable support
2022-07-08 04:26:31 -04:00
Auguste Rame
acb339ab95
Merge branch 'master' into label_details_support
2022-07-07 03:15:05 -04:00
ryuukk
9101cc7c3f
Put constants/imports at the top
2022-07-07 03:09:44 -04:00
ryuukk
2fdb05f783
Append the actual label so it can then be sorted a-z
2022-07-07 03:09:44 -04:00
ryuukk
03f27ef145
Make Kind public
2022-07-07 03:09:44 -04:00
ryuukk
1abf328947
Cleanup
2022-07-07 03:09:44 -04:00
ryuukk
64fe8a6b03
Add sortText to CompletionItem struct
2022-07-07 03:09:44 -04:00
ryuukk
b625eb763e
Sort completion items
2022-07-07 03:09:44 -04:00
Lee Cannon
e9e4a15224
fix memory leak
2022-06-27 10:14:18 -04:00
Yuri Pieters
178e823d77
Ease debugging package loading from build_runner
2022-06-24 16:15:01 -04:00
ryuukk
c964c4545a
Add link to the note
2022-06-24 13:37:24 +02:00
ryuukk
64f525f95f
Implement label details support
2022-06-23 16:44:22 +02:00
ryuukk
803f89941b
Update request to enable label details support
2022-06-23 16:44:01 +02:00
ryuukk
2a181af823
Update types for label details support
2022-06-23 16:43:23 +02:00
Loris Cro
fc5b1c6457
fix off by one error in documentRange
2022-06-09 18:12:15 -04:00
Gerred Dillon
083dd5fbdf
Remove duplicated deinit defer for GPA
2022-06-09 17:05:03 -04:00
Tw
769fecf9c8
only send format editings when necessary
...
If the original document is same as the formatted one, there's no need to send the unchanged
document's content back which will make the client confused.
Signed-off-by: Tw <tw19881113@gmail.com>
2022-06-08 22:54:17 -04:00
Riccardo Binetti
259f056bd2
Add support for Spacemacs
...
Add Spacemacs setup instructions to README and configuration wizard
2022-06-06 14:03:04 -04:00
Auguste Rame
29d2dd6802
Add tracy
2022-06-06 00:28:52 -04:00
Auguste Rame
2fc5047cbd
Add tracy submodule
2022-06-06 00:28:52 -04:00
Gregory Anders
289d137d13
Ignore unimplemented notifications
...
Responding to an unimplemented notification can cause errors for some
LSP clients that do not expect to receive a response after sending a
notification. Differentiate between unimplemented requests and
notifications and only send a generic null response for the former while
silently ignoring the latter.
2022-06-05 17:26:56 -04:00
Auguste Rame
ebc6de9673
Remove zinput dependency
2022-06-05 13:36:43 -04:00
Auguste Rame
e320dbd651
Add builtin path to configuration struct
2022-06-05 13:36:28 -04:00
Vesim
f5fb4afd7c
implement workspace/configuration
2022-06-05 13:36:28 -04:00
Auguste Rame
04611ba1a1
Fix build runner for latest Zig
2022-05-30 02:04:34 -04:00
Lee Cannon
4f04f7dac0
std.ChildProcess.init
cannot error
2022-05-29 18:18:57 +01:00
Lee Cannon
106e3cd963
std.math.cast
returns optional
2022-05-29 18:17:43 +01:00
Jarred Sumner
a3723c73b8
Fix missing doc comments in inline fn
2022-04-22 00:49:36 -07:00
v1nh1shungry
042b03a06a
fix ast.lastToken() does not handle empty error_value
2022-04-20 14:49:52 +08:00
Meghan Denny
ca409941e0
update to zig master 0.10.0-dev.1679+d227f76af
2022-03-31 16:01:43 -07:00
Auguste Rame
14698c35c9
Merge pull request #455 from davidgm94/fix-zls-config-crash
...
Fix ZLS config not found crash #410
2022-03-24 13:12:33 -04:00
Auguste Rame
4e6564d7da
Merge pull request #467 from ikrima/fix-addrspace-section
...
fix: ast.lasttoken() does not handle addrspace section
2022-03-01 21:18:54 -05:00
ikrima
90195a6695
fix: ast.lasttoken() does not handle addrspace section
2022-02-28 16:08:56 -06:00
Josh Crisp
e38278d2a5
Skip char and string literals when highlighting comments
2022-02-15 16:52:08 -08:00
David Gonzalez Martin
a1f72d46e3
Fix ZLS config not found crash #410
2022-02-07 22:14:31 -06:00
Stephen Gutekanst
515cdd95a0
update for anytype field yeeting
...
Updates ZLS to account for the yeeting of anytype fields: https://github.com/ziglang/zig/pull/10766
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-02-02 22:00:31 -07:00
Auguste Rame
18a23c1aa2
Merge pull request #449 from novakne/patch-1
...
builtin_uri: Fix typo in log message
2022-02-01 19:16:35 -05:00
Sebastian Keller
472104c0e1
Fix build on zig master (0.10.0-dev.500+66cf011aa)
...
std.process.args() has a slightly different api now, breaking the build
on zig master.
2022-02-01 21:52:15 +01:00
Hugo Machet
fa946526c2
builtin_uri: Fix typo in log message
2022-01-28 12:04:20 +01:00
ikrima
ca8ca06da9
yolo: add type function symbols to outline
...
Questions:
- `getDocumentSymbolsInternal`: from looking at the code + cross referencing VSCode Api, looks like its just used to enumerate document symbols
(call tree: `documentSymbol()->getDocumentSymbols()->getDocumentSymbolsInternal()`)
- sanity check: are there any other places this modification needs to be propogated?
- sanity check: specifically so that symbol resolve/rename/goto def/etc aren't broken?
- error handling: unsure what the pre/post conditions are of the parse tree when `getDocumentSymbolsInternal` is invoked
so there might be superflous guards/checks
- any tests to add?
2022-01-12 03:25:26 -06:00
Auguste Rame
08f2638d6a
Merge pull request #445 from nektro/autocomplete-builtin
...
add a default option for `@import(builtin)`
2022-01-01 16:57:39 -05:00
Meghan Denny
09d51af161
handle AccessDenied when making 'builtin.zig' fill-in
2021-12-29 22:53:30 -08:00
Meghan Denny
54d8f3273c
builtin_path might not be set if zig_exe_path isnt found
2021-12-29 21:17:44 -08:00
Meghan Denny
9006584835
uriFromImportStr expects a uri not a path
2021-12-29 21:08:13 -08:00
Meghan Denny
3fdab6c2fa
add a default option for import(builtin)
2021-12-29 19:35:16 -08:00
Meghan Denny
7cacfe9a6a
update builtin data for zig master
2021-12-29 22:25:03 -05:00
Meghan Denny
49cbbd1ebb
add builtin data for 0.9.0
2021-12-29 22:24:34 -05:00
Auguste Rame
18569926a3
Fix compilation on latest Zig
2021-12-23 14:00:07 -05:00
Matthew Murray
cb4e742134
Update submodule to latest commit ( #439 )
2021-12-22 23:08:05 -05:00
Sirius902
dc94a5e317
c_void -> anyopaque ( #437 )
2021-12-20 19:05:54 -05:00
Marten Ringwelski
abe82f6069
build_runner: Require some paths to be given ( #369 )
...
We now require the following to ge given in the cli args:
- zig_exe
- build_root
- cache_root
- global_cache_root
This fixes the path for packages that use one or more from the above to place
their files.
2021-12-11 12:42:18 -05:00
Matthew Knight
14528db0b7
update known-folders for allocgate ( #432 )
...
* update known-folders for allocgate
* run workflow on all pushes and PRs
2021-12-06 18:04:18 -08:00
maxxnino
5fd35f7efe
Fix zigtools/zls#389
2021-12-03 11:49:41 -05:00
Matt Knight
f9133ffdec
allocgate defeated
2021-12-03 08:00:22 -05:00
MineBill
227dcb4650
Remove newline
2021-11-30 16:24:37 -05:00
MineBill
e469d8171f
Fixes errors that are caused by using deprecated functions
2021-11-30 16:24:37 -05:00
Omar Alhammadi
12cda9b031
Change notification method in log
...
Currently in the log function in main, the notification method used to send logs to the client is "window/showMessage". This creates an a notification on the UI on VSCode that can cause slow downs. I propose a change to use the "window/logMessage" method instead, which is intended to be used for logging.
2021-11-04 19:35:49 -04:00
Omar Alhammadi
d4b6b97c01
temporary fix to issue #413 with #412 not building on release-safe.
2021-11-03 07:03:17 -04:00
Ryan Liptak
4d6d842fa5
Update Sublime LSP settings for Sublime Text 4
...
"selector" is now the preferred method of configuration, everything else was deprecated in SublimeLSP 4070-1.1.0: https://github.com/sublimelsp/LSP/releases/tag/4070-1.1.0
Also syncs setup.zig with the readme for the Sublime Text 3 settings (the Zig Language package name was wrong in setup.zig)
2021-11-02 22:14:58 -04:00
Omar Alhammadi
3531237afe
Added build option log_level to allow the user to set the default log level for release builds.
2021-11-02 22:13:53 -04:00
antlilja
80f09831bc
Remove use of notice log level
...
Removes the use of the notice log level.
Cleans up resulting code, the if else statement with nested switches was
converted into a single switch statement with the same behaviour, but
without relying on the enumToInt builtin.
2021-10-26 17:01:06 -04:00
Benjamin Feng
0f65093812
Fix off-by-one deinit on DocumentStore
2021-10-24 01:02:52 -04:00
Meghan Denny
04edc7a2d5
remove all use of usingnamespace
2021-10-19 19:26:57 -07:00
Meghan Denny
caaec2bcfd
lsp- alias []const u8
-> string
so its closer to docs
2021-10-19 19:26:57 -07:00
Meghan Denny
9ceaf90657
add reference for which lsp version we're targetting
2021-10-19 19:26:57 -07:00
Meghan Denny
e18003ff86
rename another top level fields file
2021-10-19 19:26:57 -07:00
Meghan Denny
737a9dc008
remove some dead code
2021-10-19 19:26:57 -07:00
Meghan Denny
3f92120fbe
fix missing double reference
2021-10-19 19:26:57 -07:00
Meghan Denny
aae82d29bd
fix capitalization of top level fields structs
2021-10-19 19:26:57 -07:00
Meghan Denny
91c8ffb38c
fully qualify std.debug.assert references
2021-10-19 19:26:57 -07:00
Meghan Denny
8d46ceff07
use an enum for zig version
2021-10-19 19:26:57 -07:00
Lee Cannon
b88a95a617
Update submodule
2021-10-11 09:21:24 +01:00
Lee Cannon
90f8109639
Update to use @import("builtin") where required
2021-10-07 12:53:31 +01:00
Meghan Denny
b63339e350
remove Tree when it was the same as Ast
2021-09-30 18:57:45 -07:00
Meghan Denny
3c1152a536
use empty string for empty []const u8
2021-09-30 18:47:48 -07:00
Meghan Denny
164e078dbb
collapse some std imports
2021-09-30 18:47:19 -07:00
Meghan Denny
86e370add0
include anytype
in list of primitive types
2021-09-30 18:46:53 -07:00
Meghan Denny
0406f7cc93
ensure uN and iN types are clamped to 0-65535
2021-09-30 18:46:35 -07:00
Meghan Denny
50022e5d24
analysis- clean up isTypeIdent
2021-09-30 18:46:14 -07:00
Meghan Denny
4bc8b92e19
collapse more fn signatures
2021-09-30 18:45:45 -07:00
Meghan Denny
43796f6326
uri- add link to rfc
2021-09-30 18:44:23 -07:00
Meghan Denny
9e0f201283
finish rename of usage of std.zig.Ast
2021-09-30 18:44:06 -07:00
Meghan Denny
dc8affe122
add builtin data for 0.8.0 and 0.8.1
2021-09-30 17:53:14 -07:00
Meghan Denny
a75276defc
update master data
2021-09-30 17:52:56 -07:00
Meghan Denny
7c209a8404
condese small expanded things
2021-09-30 17:52:36 -07:00
Meghan Denny
8390aaa70b
use zinput as a package
2021-09-30 17:52:15 -07:00
Meghan Denny
ad8d75b613
use single line method signatures
2021-09-30 17:51:51 -07:00
Meghan Denny
f482950f5f
fix imports to use ./
for relative usage
2021-09-30 17:48:40 -07:00
Travis Staloch
50aa71c10f
support new ast token changes
...
- some ast token tags were renamed: ie .bit_shift_left => .shl
- add initial support for saturating operators: +|, -|, *|, <<|, +|=, -|=, *|=, <<|=
2021-09-28 21:15:37 -07:00
pyxel
03f70be32a
refactor: update ast with addrspace changes
2021-09-21 17:32:32 -04:00
Sashiri
6c39966967
Update zinput
2021-09-04 22:08:04 +02:00
Sashiri
fed1c4c2c6
usingnamespace semantics update
...
+ Ast changes adjustments
2021-09-04 21:25:35 +02:00
Lee Cannon
2ffd93280e
remove deleted keywords
2021-08-30 13:54:27 +01:00
Sage Hane
5ddb92b865
Update "known-folders" submodule
2021-08-17 19:22:16 +09:00
Bodie Solomon
d25abb1055
Fix #372 : catch up to zig master 05fd20dc
2021-08-09 12:14:20 -04:00
Auguste Rame
3172717af8
Update master data file
2021-07-27 11:15:02 -04:00
Alexandros Naskos
70cfba0eb9
Fixed unit tests
2021-07-10 20:05:16 +03:00
Alexandros Naskos
bba069526c
Fix build for zig master by inserting null terminators when tokenizing and resetting them when needed
2021-07-10 19:58:37 +03:00
Sizhe Zhao
86d49acdb0
Introducing new method of generating data files
...
A new file src/data/generate-data.py has been added.
It is written in Python 3 and has some new features like:
- It doesn't need Chrome to work, the script fetches the page automatically;
- It does the translation of HTML tags for better user experiences in editors.
In addition, a new section has been added to README.md to reflect this change.
2021-07-10 21:21:54 +08:00
Sizhe Zhao
14a70a38af
Update master data
2021-07-09 23:45:48 +08:00
Sizhe Zhao
c3c4eb9c9d
Update src/data/generate-data.js to translate code tags
2021-07-09 23:45:00 +08:00
Lee Cannon
62d287e518
Handle tag moved backwards without logging
2021-06-26 20:56:22 +01:00
Lee Cannon
7fb05da5a1
Update known-folders submodule
2021-06-24 12:31:35 +01:00
Lee Cannon
ac4b198869
Update to zig master
...
Redundant comptime, unused locals, unused function params, unused captures
As issue with @"type" resolving to the keyword type
2021-06-24 11:38:01 +01:00
Alexandros Naskos
bcfd7c6392
Merge pull request #344 from leecannon/per_build_config
...
Attempt at per build.zig config
2021-06-18 16:40:42 +03:00
Lee Cannon
154a2a8704
Add a per build.zig configuration file.
2021-06-18 13:22:37 +01:00
Lee Cannon
c2cbc05135
Fix index of of range
2021-06-18 12:58:15 +01:00
Alexandros Naskos
a02c1e7996
Build runner: Only output generated package path if it is available
2021-06-16 14:47:54 +03:00
Lee Cannon
1178ebd2e2
More changes to std.build :)
2021-06-15 21:15:55 +01:00
Lee Cannon
a077cf901d
Update build_runner.zig
...
I'm not 100% sure if the `GeneratedFile`'s path will have been resolved when this code runs or if this will hit the panic inside `getPath()` as I havent had a chance to actually mess about with the new functionality.
2021-06-12 23:06:48 +01:00
Alexandros Naskos
b756ed4da5
Fixed HashMap usage for latest master stdlib
2021-06-04 14:06:11 +03:00
Frank Denis
df9560db51
Update for -master
...
fn_proto.extern_export_token -> fn_proto.extern_export_inline_token
And update the data by the way.
2021-05-23 18:01:03 +02:00
Lee Cannon
584faec5de
Call in build_runner
2021-05-13 21:29:05 +01:00
Alexandros Naskos
7fb7cdc36c
Fix std.testing.expectEqualStrings invocation for latest zig master build.
2021-05-13 17:53:53 +03:00
Alexandros Naskos
759a7b7fd9
No longer show completions for declarations in aggregate types when
...
field accessing instances of those types.
2021-05-08 19:30:22 +03:00
Alexandros Naskos
5631b8d202
Fix semantic token generation for container fields with a byte alignment
2021-05-08 19:11:26 +03:00
Alexandros Naskos
14dc9d1b51
Don't use the build runner path as the build runner cache path if present >.>
2021-05-08 18:48:36 +03:00
四光年
d4551030c4
[bug-fix]hover struct field not show docs.
2021-05-07 17:10:13 +08:00
Alexandros Naskos
937471d27b
Added --config-path option
2021-05-03 16:07:53 +03:00
Alexandros Naskos
91643c04c9
Fixed integer overflow in semantic_tokens.Builder.handleComments
2021-05-03 15:36:29 +03:00
Alexandros Naskos
ab8c65eeda
Fixed highlighting of comments before the first token and after the last token of the last valid AST node
2021-05-03 15:14:11 +03:00
Jonathan Hähne
e1c8e5d407
Undo stupidity & run zig fmt
2021-05-02 20:23:26 +02:00
Jonathan Hähne
807bd6a571
Simplify semantic_tokens, fix off-by-one error in identifierFromPosition
2021-05-02 19:59:17 +02:00
Ryan Roden-Corrent
ec34db0618
Fix small typo in comment.
2021-04-23 06:50:13 -04:00
Alexandros Naskos
23454e111c
Make semantic_tokens use @asyncCall instead of a stack again.
2021-04-19 17:17:46 +03:00
Jonathan Hähne
f61c9d8d4f
Run zig fmt
2021-04-15 18:17:06 +02:00
Jonathan Hähne
b90c9b49ac
Fix inclusion of toplevel doc comments, remove @async recursion in
...
writeNodeTokens, add a few regression tests
2021-04-15 11:07:43 +02:00
Jonathan Hähne
bb493c037a
Add proper range check
...
Whoops
2021-04-07 17:26:50 +02:00
Jonathan Hähne
0b2d633e1e
Support "catch" scopes
2021-04-07 15:42:33 +02:00
Jonathan Hähne
0e4f4c1e04
Improve testing infrastructure
...
It should now be a bit easier to set up a test and see how it failed.
2021-04-07 15:10:18 +02:00
Jonathan Hähne
b59db79a05
Refactor makeScopeInternal
2021-04-07 09:21:01 +02:00
Jonathan Hähne
45c7f9671c
Merge some cases of resolveTypeOfNodeInternal
2021-04-06 18:38:17 +02:00
Alexandros Naskos
ea1ad532a2
More lastToken improvements
2021-04-06 17:16:50 +03:00
Alexandros Naskos
f6bc380b95
Fixed lastToken for fn_proto_multi nodes
2021-04-05 20:01:03 +03:00
Alexandros Naskos
6d13591d02
Merge branch 'master' of github.com:zigtools/zls
2021-04-05 19:45:12 +03:00
Alexandros Naskos
4b0d86f0bc
Fixed lastToken when called on function prototypes with no return type
2021-04-05 19:44:45 +03:00
Benjamin Tan
36ea1975bd
Standardize insertText
to be above insertTextFormat
2021-04-05 22:27:56 +08:00
Benjamin Tan
33f03d36a5
completion: Add insertText
field for enum completions
...
Another bug with the older version of lsp-mode on Emacs prevents the
label from being inserted when there is an empty `insertText`. This
commit adds an `insertText` property to enum completions for consistency
with the rest of the completion items.
2021-04-05 22:27:56 +08:00
Alexandros Naskos
902c91e98f
Pass the correct handle to hasSelfParam in bound type parameter evaluation code
2021-04-05 14:52:41 +03:00
Tau
b03fb5ffe3
Fix stack overflow and clean up a bit of resolveTypeOfNode ( #297 )
2021-04-05 14:46:05 +03:00
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
Jonathan Hähne
8d34232c7a
Fix completion of builtins and a piece of slightly overcomplicated logic
2021-03-24 22:40:15 +01:00
Alexandros Naskos
55ad1028fc
Fixed crash in analysis of variable declaration aliases
2021-03-21 02:31:32 +02:00
rhysd
6057d290b4
Fix falsy value for filterText and insertText
...
'filterText' and 'insertText' fields of 'CompletionItem' can only have
"" or undefined as falsy value.
https://github.com/microsoft/language-server-protocol/issues/1222
2021-03-15 20:20:38 +09:00
Luuk de Gram
472033a845
Improve token location stability
2021-03-13 12:22:19 +01:00
Auguste Rame
d5c46aef26
Merge pull request #245 from rhysd/error-msg-newlines
...
Add missing \n in error message output to stderr
2021-03-12 14:21:25 -05:00
Auguste Rame
2b488347ff
Merge pull request #238 from Luukdegram/std-fixes
...
Update to Zig std's new AST format
2021-03-12 12:57:03 -05:00
Luuk de Gram
0d85668ce4
Do not offer completion for function labels
2021-03-12 11:56:51 +01:00
Luuk de Gram
7a2cd418a8
Scope fixes + semantic token colors:
...
- Creates a scope for errdefer and adds the payload as a declaration
(Previously lhs was a token index meaning we had an out of bounds error due too high of an integer)
- Semantic highlighting corrected for error payloads in loops/ifs and errdefers
2021-03-11 20:45:05 +01:00
Luuk de Gram
ef1b3c95f1
Completion fixes:
...
- Fixes namespace completions. Uses pointers instead of indices to ensure they are unique
- Adds .ptr completion to slices and `*` to many pointer
2021-03-11 13:59:09 +01:00
Luuk de Gram
094b31be48
Fix namespaces in containers
2021-03-10 17:04:14 +01:00
rhysd
addecb3a37
Add missing \n in error message output to stderr
2021-03-10 20:24:43 +09:00
Luuk de Gram
85937d48ca
Semantic token + scope fixes:
...
- Highlights pipes of loops/elses payloads correctly
- New ast structure counts last token as the variable itself and not the '}' so change scope checking to '<=' instead of '<'
2021-03-10 10:02:07 +01:00
Luuk de Gram
3ac6c82b9a
Completion for index label in for loops and fix for function snippets
2021-03-09 19:53:59 +01:00
Luuk de Gram
858f3cb282
Completion of unions in switches and its tags
2021-03-09 12:35:56 +01:00
Luuk de Gram
20cb0b7307
Fix off by one scope end index
2021-03-08 20:31:02 +01:00
Luuk de Gram
43ebfc7300
Work on completion for unwrapped slices/optionals in loops/ifs
2021-03-08 19:46:23 +01:00
Luuk de Gram
fd6b94bcc9
Fixes multiple small bugs:
...
- Correct completion based on scope
- Semantic tokens for while/if/else/for keywords
- Fix crash on import path
2021-03-07 21:54:54 +01:00
Luuk de Gram
a078a62a37
Semantic tokens: Allow for multiple line comments
2021-03-07 18:52:22 +01:00
Luuk de Gram
53c37765c0
Fix inferred error set return types
2021-03-07 18:45:37 +01:00
Luuk de Gram
e2f4bbf2f3
Implement semantic tokens for regular comments
2021-03-07 14:51:47 +01:00
Luuk de Gram
ac8a00342e
All functionalities implemented. Also implemented ability to skip searching for references through std
2021-03-06 20:55:59 +01:00
Luuk de Gram
3d8a9732fc
Calculate correct token locations and ensure all semantic highlighting matches
2021-03-05 22:38:42 +01:00
Luuk de Gram
acc45b4efe
Use the correct tree to display semantic tokens
2021-03-04 22:53:54 +01:00
Luuk de Gram
9224bbd4dc
Implement all of the semantic tokens
2021-03-04 22:30:25 +01:00
Luuk de Gram
08075a1261
Start fixing semantic tokens
2021-03-04 16:14:30 +01:00
Luuk de Gram
a80e9b262e
Implement usingnamespace and fix function snippets
2021-03-04 13:26:11 +01:00
Luuk de Gram
7495aab28b
Start implementing usingnamespace
2021-03-03 21:02:31 +01:00
Luuk de Gram
d7ccf6a3c2
References working for current file
2021-03-03 20:38:52 +01:00
Luuk de Gram
a699dab2f7
Referencing fixes and more
2021-03-03 16:34:24 +01:00
Frank Denis
3431b7afaa
Regen data for master - @TagType is gone
2021-03-03 13:46:23 +01:00
Luuk de Gram
92adeb8826
Completion fixes
2021-03-02 22:01:13 +01:00
Luuk de Gram
1dd39914ec
Hovering fixes
2021-03-02 15:32:38 +01:00
Luuk de Gram
c8a2467fac
Compiles without errors. Still needs improvement
2021-03-01 22:18:38 +01:00
Luuk de Gram
ada0d13ba9
Fix symbolReferencesInternal
2021-03-01 19:34:28 +01:00
Luuk de Gram
e82ea30e6f
Last fixes in src/analysis.zig
2021-03-01 16:30:43 +01:00
Luuk de Gram
4645638434
Fixes and completions
2021-03-01 16:02:24 +01:00
Luuk de Gram
1c9da7053c
More type resolving
2021-03-01 14:32:19 +01:00
Luuk de Gram
b651a79380
Type resolving fixes
2021-02-28 21:57:15 +01:00
Luuk de Gram
96fcac89a4
Complete resolveTypeOfNodeInternal
2021-02-28 20:37:21 +01:00
Luuk de Gram
b175a01fce
Progress in resolveTypeOfNodeInternal
2021-02-28 17:42:34 +01:00
Luuk de Gram
709c1a70fd
Implement makeScopeInternal logic
2021-02-28 13:09:10 +01:00
Luuk de Gram
5f5d6ce4ea
Progress in makeScopeInternal
2021-02-27 21:55:39 +01:00
Luuk de Gram
72605c7549
A lot of fixes
2021-02-27 16:38:06 +01:00
Luuk de Gram
0133f0d863
First set of changes to work with new std's ast
2021-02-26 21:26:52 +01:00
Alexandros Naskos
a886ecddd9
Fixed for zig master
2021-02-15 12:04:22 +02:00
Alexandros Naskos
fa496936f5
Always find the closest existing candidate build file before looking in the directory structure
2021-01-31 12:35:08 +02:00
Alexandros Naskos
ca6598572e
Reworked the build file searching method
...
Instead of looking for any existing build file in the store that fits
in the directory structure of a new document, we now always look
for the closest build.zig file in the directory structure.
2021-01-31 12:24:55 +02:00
Alexandros Naskos
c98c44460c
Fixed session tests
2021-01-28 11:20:13 +02:00
S0urc3C0de
acab137c99
Update to latest zig.
...
Fix change for changing zig.ast name attribute to be optional.
2021-01-27 21:53:02 +01:00
GrayJack
30e3572cee
Rename tagField to enumMember
2021-01-16 03:46:35 -03:00
GrayJack
4f5af38031
Use declaration modifier instead of definition
2021-01-16 03:33:35 -03:00
Alexandros Naskos
87b7954669
Fixed semantic token hihglighting issue when a regular comment was following a doc comment
2021-01-12 14:05:08 +02:00
Alexandros Naskos
e7f8a8dcd9
zls will now run the package extraction build runner without copying it
...
in the destination folder. Instead, it will use a specific cache folder
and run from the default cwd it was run from.
Added build_runner_cache_path to the configuration file.
2021-01-12 13:10:51 +02:00
Nameless
966a6068cc
fix inStream deprecation
2021-01-10 19:49:21 -06:00
Kate Tsuyu
44c93d5454
update zinput version
2021-01-10 12:02:00 -05:00
Vesim
b2e456404c
fix inStream/outStream removal
2021-01-10 08:12:11 +01:00
Alexandros Naskos
eefee4759c
Fixed compilation for latest zig master
2021-01-07 10:35:36 +02:00
Lee Cannon
2a9edf243d
Fixed string printing with {s} format specifier
2021-01-04 17:51:26 +00:00
g-w1
dffc88a354
update setevalbranchquota: usize -> u32 for master
2021-01-03 15:00:01 -05:00
g-w1
5b50d98353
make sure exe exists
2020-12-19 21:01:16 -05:00
antlilja
da7ce66910
Pass global cache argument to Builder.create.
2020-12-11 00:38:05 +01:00
Alexandros Naskos
bf4f653bf9
Better zig build config
2020-11-16 00:07:35 +02:00
Alexandros Naskos
78e74743e1
Use zig env
to find zig lib path instead of assuming the executable comes from a distribution tarball
2020-11-15 21:32:27 +02:00
Alexandros Naskos
892847d939
Removed workspace specific zls.json support
2020-11-15 20:51:56 +02:00
Alexandros Naskos
0bf9602d7b
Fixed infinite loop when analyzing variable declarations like const A = A;
for semantic token highlighting
2020-11-15 20:37:00 +02:00
Frank Denis
ccfb18ec54
Update data for zig 0.7.0 and the current master branch
2020-11-15 12:01:33 +01:00
Alexandros Naskos
0d15ea754e
Added --debug-log flag for release mode binaries
2020-11-08 13:40:16 +02:00
Alexandros Naskos
bf7f6cd5e9
Corrected semantic token server provider struct
2020-11-06 15:55:00 +02:00
Alexandros Naskos
8e0dc3da19
Fixed incremental document updates
2020-11-06 12:32:21 +02:00
Alexandros Naskos
d877019abe
Removed struct, enum, opaque, union token types, added them to token modifiers
2020-11-06 11:03:21 +02:00
Alexandros Naskos
abcccb5d85
Fixed session tests
2020-11-06 10:24:37 +02:00
Alexandros Naskos
f7eff6632e
Cleaned up LSP types, add InitializeResult, no longer use a hardcoded string
2020-11-06 10:08:20 +02:00