Techatrix
46da74d32e
don't iterate handles while potential invalidation occurs ( #757 )
2022-11-16 17:35:19 -05:00
Techatrix
d75fd3a880
detect comment position context ( #756 )
2022-11-16 17:34:36 -05:00
Techatrix
662b560861
format with Ast.render
instead of zig fmt
( #755 )
2022-11-16 17:33:15 -05:00
Ingo Lohmar
e98aea61ea
do not panic on error response to workspace/configuration ( #747 )
2022-11-13 17:28:00 -05:00
Auguste Rame
c8dffc1f9b
Some comptime interpreter fixes
2022-11-10 20:51:02 -05:00
Auguste Rame
c803a5de3f
Quick cleanup
2022-11-09 23:46:23 -05:00
Auguste Rame
411e74d364
Add param type resolution & stop using stage2, still a bit broken :(
2022-11-09 23:17:21 -05:00
Nick Cernis
e58bddd769
Improve Zig version mismatch error ( #744 )
...
Improves the server message we send if the system Zig version is older
than the Zig version that ZLS was built with:
- Correct typo (“build with” → “built with”).
- Show versions so users know which one they need to update to.
- Suggest step needed to fix the error (“Update Zig…”).
2022-11-09 23:13:35 -05:00
Auguste Rame
b91a193d04
We can interpret std now because of proper tree shaking!
2022-11-08 14:42:40 -05:00
Auguste Rame
c6ab7e8a0f
Casts++, compileLog, pointers
2022-11-08 14:42:40 -05:00
Auguste Rame
e6b691e447
More builtins, use stage2 because we can
2022-11-08 14:42:33 -05:00
Auguste Rame
d2e166bb0b
Some builtins, rudimentary hacky diagnostics; need to nerf global evaluation
2022-11-08 14:37:14 -05:00
Auguste Rame
599c134593
Imports, cross-boundary resolution; can import std but dies on missing builtins / lang features
2022-11-08 14:37:13 -05:00
Auguste Rame
da00751726
Field access, function calls based on function value
2022-11-08 14:37:13 -05:00
Auguste Rame
779c3c0710
Hacky mess but it works (only if your function is the first root decl tho :P)
2022-11-08 14:37:13 -05:00
Auguste Rame
06e8756849
Add struct test
2022-11-08 14:37:13 -05:00
Auguste Rame
d2640a44ac
comptime interpreter moment
2022-11-08 14:37:01 -05:00
BratishkaErik
95f21d0d23
Add builtin data for 0.9.1 and 0.10.0 ( #735 )
...
* Add builtin data for 0.9.1
* Add builtin data for 0.10.0
* Update builtin data for master
2022-11-02 16:24:51 -04:00
Tom Cheng
af14067911
Fix crash when getting signature of optional
...
e.g. typing 'foo.?.bar(' crashes zls because it doesn't recognize ? as a
possible token as part of a function expression, and tries to call
getFieldAccessType with '.bar' instead.
The actual fix is the one line in src/signature_help.zig
getFieldAccessType was reworked to be more resilient to this type of
thing - the `undefined` value of `current_type.type.data` was being used
since it hit the `.period` branch first. This caused the crash.
2022-11-02 14:55:22 +00:00
musi-musi
2ae113ddcf
fixed jrpc config treating empty strings as non null ( #727 )
2022-10-30 00:30:03 -04:00
Techatrix
7a7576c06d
fix symbol references ( #712 )
...
* fix symbol references
* skip references for inline assembly
2022-10-29 04:37:52 -04:00
InKryption
51a7ae2274
Fix region folding off-by-one error ( #726 )
2022-10-28 16:59:33 -04:00
InKryption
7fe62147a3
Improve folding regions ( #720 )
2022-10-28 14:35:22 -04:00
Auguste Rame
ced6e97cc2
Fix build runner optional issue ( #725 )
2022-10-28 04:02:08 -04:00
Techatrix
862d30055a
fix cimport completion ( #722 )
2022-10-28 00:38:36 -04:00
Techatrix
bca02bfde5
fix invalid union access in build_runner.zig ( #723 )
2022-10-28 00:37:54 -04:00
Techatrix
88750d2529
fix allocator mismatch in tagStoreCompletionItems ( #717 )
2022-10-25 23:22:15 -04:00
Luca Sas
2a17590bf4
Added textDocument/foldingRange ( #718 )
...
* Added textDocument/foldingRange
* Added support for code regions
* Fixed warning message in foldingRangeHandler
Co-authored-by: LucaSas <sas.luca.alex@gmail.com>
2022-10-25 10:35:16 -04:00
Auguste Rame
5ddbf24d11
Fix diagnostics ( #716 )
2022-10-21 12:24:26 -04:00
Lee Cannon
6358c5b23e
Merge pull request #714 from Techatrix/fs-completion-fix
...
fix file system completion crash
2022-10-20 17:39:10 +01:00
Techatrix
a0723dbffd
add missing semicolon
2022-10-20 18:25:06 +02:00
IntegratedQuantum
886cfeacb5
Replace @minimum and @maximum with @min and @max. ( #713 )
2022-10-19 18:26:12 -04:00
Techatrix
7c54ded487
Merge pull request #702 from Techatrix/document-store-refactor
...
DocumentStore refactor
2022-10-18 11:40:14 +02:00
Techatrix
2755d8d8b7
simplify dependency collection in references.zig
2022-10-17 21:20:27 +02:00
Techatrix
8fb7379d71
return null if file can't be read in documentstore
2022-10-17 20:46:31 +02:00
Techatrix
2158a201ad
add separate function for loading handles with getOrLoadHandle
2022-10-17 20:43:11 +02:00
Techatrix
89be8e0211
return const Handle from getHandle
2022-10-17 20:33:37 +02:00
Techatrix
ba007b3558
fix tagStoreCompletionItems
2022-10-17 20:25:51 +02:00
Techatrix
4316524226
add more tracy calls in documentstore
2022-10-17 20:23:51 +02:00
Techatrix
9f688cf4ed
simplify tagStoreCompletionItems
2022-10-17 20:20:34 +02:00
Techatrix
0cfc792849
load handles on demand instead of ahead of time
2022-10-16 17:26:06 +02:00
Techatrix
25ce5dd8aa
undo DocumentStore constness changes
2022-10-16 17:17:40 +02:00
ryuukk
472e28ad5c
builtins also get their detailed label ( #706 )
2022-10-14 12:24:22 -04:00
ryuukk
cd887838f7
disable label details if client only support old lsp ( #707 )
2022-10-13 04:03:58 -04:00
IntegratedQuantum
62861193a6
Allow tabs for the indentation added by code actions. ( #684 )
...
* Allow tabs for the indentation added by the code actions feature (#673 ).
The previous implementation always assumed spaces for indentation.
But in stage2 code may contain tabs for indentation as well.
* Fix some edge cases, properly detect indentation(any amount of spaces) and move the indentation code inside `createDiscardText()`.
2022-10-12 22:41:27 -04:00
Techatrix
06ba47d460
improve document of DocumentStore.zig
2022-10-10 20:01:54 +02:00
Techatrix
aff2c3234f
fix relative_builtin_path option
2022-10-10 19:43:50 +02:00
Techatrix
420e7f2fef
correctly resolve import("builtin")
2022-10-10 19:22:54 +02:00
Techatrix
2bc83741fb
update cimport diagnostic collection
2022-10-10 19:16:23 +02:00
Techatrix
d6ef330984
Merge branch 'master' into document-store-refactor
2022-10-10 19:07:15 +02:00
nullptrdevs
19fd17ff76
ability to highlight global variables ( #655 )
...
anything declared with "var" at the root level
2022-10-10 01:13:15 -04:00
Techatrix
e024a9ec38
finish document store garbage collection
2022-10-09 01:50:03 +02:00
Techatrix
ce7afe03f2
correctly exclude builtin.zig from build.zig search
2022-10-09 01:48:51 +02:00
Techatrix
4f27f075d7
revert timer removal
2022-10-09 00:38:05 +02:00
Techatrix
f060d09f7e
correctly handle var decl without equal sign
2022-10-08 22:04:34 +02:00
Jonas Enlund
3833566790
Add missing .switch_case_inline, .switch_case_inline_one cases ( #699 )
...
* Add missing .switch_case_inline, .switch_case_inline_one cases
* Include inline semantic token
Co-authored-by: Auguste Rame <19855629+SuperAuguste@users.noreply.github.com>
2022-10-07 20:00:23 -04:00
Techatrix
5d748767e9
mark DocumentStore & Handle const
2022-10-05 13:40:11 +02:00
Techatrix
dab7eb81cc
reimplement document store
2022-10-05 13:23:38 +02:00
Techatrix
b9a291b944
remove requests.Configuration ( #696 )
2022-09-30 20:47:40 -04:00
Techatrix
a9a1fad13e
remove types.TextDocument ( #693 )
...
* remove types.TextDocument
* resolve compile errors because of previous merge
2022-09-30 20:45:45 -04:00
skylla
a8fa5c68a7
Adds a 'format to camelCase' codeaction for function names ( #679 )
...
* adds reformatting to camelCase for function names
* removes useless +1 byte when allocating a string
* added some forgotten functionality
* fixes an issue caused by auto-fmt & changes action kind
* fixes several issues related to camelCase action
* fixes a bug if a fn name is all underscores
* sets camelCase action to quickfix
* sets camelCase action to sourceFixAll
* fixes a mischanged line
2022-09-30 00:05:25 -04:00
Techatrix
51356517a9
Self hosted fixes ( #682 )
...
* fix compiler errors when using self-hosted
* move parameters into builder struct
* simplify code when using self hosted
* fix stage2 error `cast discards const qualifier`
* correctly return after finding method
* fix position context tests on self hosted
* remove unnecessary comptime in position context tests
2022-09-30 00:04:55 -04:00
Techatrix
d030dd0993
improve conformance to the lsp ( #687 )
2022-09-30 00:04:27 -04:00
Lee Cannon
3c4535a321
support 0.9.1 ( #691 )
2022-09-29 15:48:37 -04:00
Vesim
32ce19f9a8
inlay_hints: implement ability to remove redundant hints ( #690 )
2022-09-29 14:36:29 -04:00
Lee Cannon
9f2ea75777
handle OptionsStep
in build_runner ( #686 )
...
* handle `OptionsStep` in build_runner
* only reify `OptionsStep`s that have no dependencies
2022-09-29 14:33:30 -04:00
Techatrix
cf73771739
simplify Server.zig ( #681 )
...
* simplify Server.zig
* remove wrong default value in Server.zig
2022-09-29 14:01:38 -04:00
Matt Knight
6ec6d4ea36
Revamp bulid.zig discovery ( #688 )
...
* walk down tree instead of up for build.zig discovery
* account for windows URIs in tests
2022-09-28 23:12:34 -04:00
Techatrix
e3803d760f
show a warning when using an old zig version ( #677 )
...
* show a warning when using an old zig version
* use builtin zig version
2022-09-28 19:30:26 -04:00
Techatrix
8cf93fc96a
Code action improvements ( #678 )
...
* correctly remove parameter through code action
* add code action for pointless discard of undeclared identifier
2022-09-28 12:14:16 -04:00
Techatrix
8eeae02865
unmanage diff.zig ( #680 )
2022-09-28 12:13:55 -04:00
Auguste Rame
a70beba6d2
Merge pull request #683 from jcmoyer/build-options
...
Allow user defined options to be passed to build_runner
2022-09-28 12:11:49 -04:00
Techatrix
f3889cfe8d
explicit request didSave notification from client ( #676 )
2022-09-28 12:07:24 -04:00
J.C. Moyer
295669297a
Remove unnecessary indirection
2022-09-28 10:10:27 -04:00
J.C. Moyer
cbc6feeb76
Allocate build_runner args directly
2022-09-28 08:33:48 -04:00
J.C. Moyer
399fa7fd09
Move build options out of parse result instead of copying
2022-09-28 08:32:19 -04:00
J.C. Moyer
0b0e6a7cb9
Support for user-configurable build options
2022-09-28 04:14:49 -04:00
Lee Cannon
ecf4e112a5
Merge pull request #675 from leecannon/pkgconfig
...
support pkgconfig
2022-09-27 20:12:33 +01:00
Lee Cannon
58d8c1434d
cleanup processPkgConfig
2022-09-27 20:00:14 +01:00
Lee Cannon
137edcd527
use StringArrayHashMap
to remove duplicate include paths
2022-09-26 22:01:00 +01:00
Lee Cannon
a3af1c76a3
support pkgconfig
2022-09-26 21:38:10 +01:00
Techatrix
8edaa7f506
Merge branch 'master' into dev
2022-09-26 18:41:07 +02:00
Techatrix
0d848a71ec
Merge pull request #674 from Techatrix/snippets
...
Add keyword Snippets for autocomplete
2022-09-25 17:27:46 +00:00
Techatrix
5fa7656314
update snippets
2022-09-25 03:09:54 +02:00
Techatrix
00be49c595
add keyword snippets for autocomplete
2022-09-25 02:45:02 +02:00
Techatrix
8cf5c82261
implement autofix
2022-09-25 01:05:12 +02:00
Techatrix
1b64db8a4c
implement textDocument/codeAction
2022-09-25 01:04:29 +02:00
Techatrix
ca58cbb3f3
make types.Diagnostic correctly parseable
2022-09-25 01:01:31 +02:00
Techatrix
548ced259f
refactor ast-check into separate function with small changes
2022-09-24 21:54:31 +02:00
Techatrix
cfb7c16de0
add enable_autofix
option
2022-09-24 21:30:36 +02:00
Techatrix
40c28d7a64
add code action types
2022-09-24 21:29:24 +02:00
Techatrix
a8dcb89a81
refactor getting the first & last parameter token into a function
2022-09-24 21:26:55 +02:00
Techatrix
6ff19e8b5f
analysis: store function node in parameter declaration
2022-09-24 21:25:32 +02:00
Techatrix
869d27c75d
simplify completionHandler, gotoHandler, hoverHandler and their callees
2022-09-22 20:09:16 +02:00
Techatrix
87bfa683bd
use an ArrayList in uri.pathRelative
2022-09-22 20:06:31 +02:00
Techatrix
8a77007872
don't use inline for iterating builtin data
2022-09-22 05:39:04 +02:00
Techatrix
e9e9571fe5
avoid config copy for document store ( #669 )
2022-09-21 21:31:48 -04:00
Lee Cannon
f90142d0cc
create entire cache folder path
2022-09-20 19:52:24 +01:00
Techatrix
cf52fd8190
report cImport failure using textDocument/publishDiagnostics
2022-09-19 19:53:41 +02:00
Techatrix
7f4f002380
Testing improvements ( #662 )
2022-09-18 22:47:06 +00:00
Lee Cannon
b3078c36dd
Merge pull request #656 from jcmoyer/env-fixup
...
Add target to Env struct
2022-09-18 19:05:51 +01:00
J.C. Moyer
0feecee18c
Add target to Env struct
...
See: https://github.com/ziglang/zig/pull/11741
2022-09-18 02:45:30 -04:00
Caleb Cornett
96f00f05f6
Pass -lc to translate-c ( #660 )
2022-09-17 15:16:36 -04:00
Lee Cannon
6d9e891d98
fix for zig master ( #658 )
2022-09-17 15:05:55 -04:00
Techatrix
b76710ea5f
References improvements ( #653 )
2022-09-16 01:11:39 +00:00
Techatrix
e28549fa7d
Completely overhaul offsets.zig ( #643 )
...
* completely overhaul offsets.zig
2022-09-16 00:33:49 +00:00
max
5aff17afb0
sync with zig master version llvm15 ( #652 )
2022-09-14 14:56:17 -04:00
Lee Cannon
bd6f60e451
update for zig master ( #651 )
2022-09-13 16:54:28 -04:00
Techatrix
e6238e3354
improve width of log prefix ( #649 )
2022-09-13 16:12:32 -04:00
Techatrix
6363e7a064
Merge pull request #646 from Techatrix/cache-build-runner
...
Place build_runner.zig in zls subfolder
2022-09-12 11:46:36 +00:00
Techatrix
1a93ec2234
Merge pull request #647 from Techatrix/logging-improvements
...
Only globally log to stderr
2022-09-12 11:42:46 +00:00
Techatrix
85135d36ae
refactor builtin_completions
2022-09-12 00:50:35 +02:00
Techatrix
ff779049f1
only globally log to stderr
2022-09-11 23:48:15 +02:00
Techatrix
834127f23e
create global cache path directory if it doesn't exist yet
2022-09-11 22:36:38 +02:00
Techatrix
75677f424c
place build_runner.zig in zls subfolder
2022-09-11 21:50:37 +02:00
Techatrix
a44cfdc451
correctly handle anytype in inlay hint tooltips
2022-09-11 01:50:45 +02:00
Techatrix
03565f42bf
Merge pull request #641 from Techatrix/testing-improvements
...
Move updated units_test.zig into tests directory
2022-09-10 23:03:31 +00:00
Techatrix
6933e1598a
move updated units_test.zig into tests directory
2022-09-11 00:07:01 +02:00
nullptrdevs
440fd215ec
NativeTargetInfo.detect() no longer takes an Allocator param ( #637 )
...
see 3ee01c14ee
2022-09-09 21:06:01 -04:00
Techatrix
0428b970b1
place build_runner.zig in cache directory ( #635 )
2022-09-07 13:34:48 -04:00
nullptrdevs
6269eef776
fix: "f..o.o;" crashes the server ( #629 )
...
this is a fix for #381 and a hack for #409
(related, get triggered by "f..o.o;")
2022-09-07 13:14:11 -04:00
Techatrix
7730c7715b
respect document encoding
2022-09-05 22:49:50 +02:00
Techatrix
925cc3fee9
reconstruct diagnostic range end of ast-gen
2022-09-05 20:41:40 +02:00
Techatrix
a0c3de5bfe
update data/master.zig
2022-09-04 22:12:37 +02:00
Techatrix
38210d3e91
embedFile build_runner.zig in executable
2022-09-04 21:44:07 +02:00
Auguste Rame
b842e68697
Merge pull request #621 from Techatrix/dev
...
Enable ast-check by default
2022-09-03 13:29:58 -04:00
Auguste Rame
7a1c66da34
Merge pull request #606 from nullptrdevs/dev
...
fix: fix server crash related to parsing incomplete function as a fun…
2022-09-03 12:56:34 -04:00
Techatrix
d8b574a0cc
enable ast-check by default
2022-09-03 15:12:34 +02:00
Auguste Rame
34ce200b2e
Merge pull request #618 from Techatrix/report-version
...
Report zls version using git describe
2022-09-02 01:47:54 -04:00
Techatrix
66b35d62b2
report zls version using git describe
2022-09-01 15:42:15 +02:00
Auguste Rame
246fee8a1b
ast-check fixes
2022-09-01 09:26:58 -04:00
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