Commit Graph

205 Commits

Author SHA1 Message Date
Alexandros Naskos
d4871914ea Removed debug traces 2020-05-23 00:05:16 +03:00
Alexandros Naskos
077a17e2f5 Do not add every node when adding decls, just the supported nodes 2020-05-23 00:02:26 +03:00
Vexu
2841c864bc
uriFromImportStr ignore packages for now 2020-05-22 18:56:57 +03:00
Vexu
af746be770
provide goto definition for import strings 2020-05-22 18:52:21 +03:00
Alexandros Naskos
ccc923e2f0 One more fix 2020-05-21 21:02:12 +03:00
Alexandros Naskos
2eab5e036d Check that the goto definition cursor is within bounds 2020-05-21 20:51:03 +03:00
Auguste Rame
44f33c631b
Merge pull request #71 from alexnask/test_block_completions
Test block local completions
2020-05-21 09:14:34 -04:00
Alexandros Naskos
26cc339235 Add test block local completion support 2020-05-21 15:16:45 +03:00
Alexandros Naskos
03f774fda9 Try expression support 2020-05-21 15:06:16 +03:00
Alexandros Naskos
4acb77f09e enable_snippets is false by default, fix it in README. Small fixes to goto def/decl 2020-05-21 14:36:14 +03:00
SuperAuguste
75f1aa5780 fix workspace folder bug 2020-05-19 16:24:24 -04:00
Alexandros Naskos
61b8fd5259 Moved a calculation out of a loop 2020-05-19 22:33:15 +03:00
Alexandros Naskos
7dcbc39d59 Added workspace folder support, read configs from there, use known-folders 2020-05-19 22:09:00 +03:00
Alexandros Naskos
6fe52d95b3 Added @This() support 2020-05-19 18:53:01 +03:00
Alexandros Naskos
8d59de716f Better fn name 2020-05-19 16:47:30 +03:00
Alexandros Naskos
07f2138dce Simple generic function support 2020-05-19 16:42:36 +03:00
Sergeeeek
c55363e2c2 Code style fixes 2020-05-19 12:02:48 +03:00
Sergeeeek
06ba823368 Removed logs and unused utility function 2020-05-19 07:47:23 +03:00
Sergeeeek
4b3cb641c0 Fixed wrong node being used when resolving return type of a function 2020-05-19 07:39:34 +03:00
Sergeeeek
5043a10dd4 Fixed error after merge 2020-05-19 07:18:39 +03:00
Sergeeeek
c4aa35872c Merge remote-tracking branch 'upstream/master' 2020-05-19 07:17:28 +03:00
Sergeeeek
1f50f4e4f6 Moved deep import resolution to nodeToCompletion 2020-05-19 07:12:05 +03:00
Alexandros Naskos
53da418d11 Merge branch 'master' of https://github.com/SuperAuguste/zls into goto_definition 2020-05-18 23:20:18 +03:00
Alexandros Naskos
b1ce06a80d Implemented go to definition 2020-05-18 23:19:23 +03:00
Timon Kruiper
27034abbaf Also return from getFieldAccessTypeNode when a comma is found.
This allows to get completion support when a function with multiple
arguments is completed.
2020-05-18 20:59:44 +02:00
SuperAuguste
acd85c0f39 fix 2020-05-18 12:37:56 -04:00
Alexandros Naskos
8693c4a69f Removed last remaining log. RIP 2020-05-18 19:33:58 +03:00
SuperAuguste
b9bd0e2476 remove log 2020-05-18 11:36:47 -04:00
SuperAuguste
66908bd1a9 Revert buffered in stream - it breaks inputs for some strange reason 2020-05-18 09:31:17 -04:00
Auguste Rame
847414d9ca
Merge pull request #54 from alexnask/goto_definition
Fixed field completions with partial identifiers after the period
2020-05-18 09:25:00 -04:00
Alexandros Naskos
a017de1679 Added a comment 2020-05-18 16:22:10 +03:00
Alexandros Naskos
bbe2800139 Fixed field completions with partial identifiers after the period 2020-05-18 16:21:16 +03:00
Auguste Rame
5a6ff63d8c
Merge branch 'master' into master 2020-05-18 08:58:32 -04:00
Auguste Rame
0a0f902671
Merge pull request #50 from FireFox317/bufferedstreams
Wrap stdout in BufferedOutStream
2020-05-18 08:54:04 -04:00
Alexandros Naskos
a6a4afd4fd More cleanup: 2020-05-18 15:46:17 +03:00
Alexandros Naskos
749a4fcbe4 Renamed checkSanity to removeOldImports, use an arena for temporary data. 2020-05-18 15:14:16 +03:00
Alexandros Naskos
96672435a7 Removed unnecessary copies 2020-05-18 14:55:39 +03:00
Alexandros Naskos
e65d3388e4 A couple of more changes 2020-05-18 14:53:40 +03:00
Alexandros Naskos
4ad33c16f9 Fixed crash when field access completing on a local variable from a type coming from an import 2020-05-18 14:26:52 +03:00
Sergeeeek
07a44bc0ed Fixed errors after upstream merge 2020-05-18 11:37:15 +03:00
Sergeeeek
2c5cc2b48f Merge remote-tracking branch 'upstream/master' 2020-05-18 10:34:26 +03:00
Sergeeeek
d79f3bc809 Change handles HashMap value type to pointers instead of values themselves 2020-05-18 10:28:36 +03:00
Sergeeeek
6cd98697c0 Fixed handle changing while analysis is in progres
New bug though, only function declarations are completed now
2020-05-18 10:06:29 +03:00
Timon Kruiper
6a4dc3334a Wrap stdout in BufferedOutStream for more speed
gotta go fast right :D

Also remove some unused code
2020-05-17 19:36:58 +02:00
daurnimator
410ac0e5b4
Use buffered input stream 2020-05-18 01:37:02 +10:00
Alexandros Naskos
14749ce02b Added missing errdefer 2020-05-17 18:21:02 +03:00
Auguste Rame
add13df816
Merge pull request #47 from daurnimator/master
Cleanups and rewrite of reading
2020-05-17 11:15:28 -04:00
daurnimator
0e67ffd8c4
Rewrite request reading 2020-05-18 01:07:08 +10:00
daurnimator
c1599c755d
Misc cleanups 2020-05-18 00:50:55 +10:00
Vexu
6e8165804f
add completion for arrays and slices 2020-05-17 17:27:05 +03:00
SuperAuguste
a2402b9885 Merge branch 'master' of https://github.com/SuperAuguste/zls 2020-05-17 09:40:34 -04:00
SuperAuguste
38213e1322 fixed struct init 2020-05-17 09:40:20 -04:00
Auguste Rame
7b7b718edb
Merge pull request #44 from alexnask/more_allocation_info
Better debug allocator
2020-05-17 08:31:07 -04:00
SuperAuguste
7e766e3d8a Merge branch 'master' of https://github.com/SuperAuguste/zls 2020-05-17 08:28:09 -04:00
Alexandros Naskos
843db49790 Better debug allocator 2020-05-17 14:40:32 +03:00
Sergeeeek
0b433815b3 Got some aliases working
Can't figure out a bug with document changing in the original context,
which causes further analysis to break.
2020-05-17 09:47:48 +03:00
Alexandros Naskos
15a277918f Correctly resolve type of field access 2020-05-17 01:30:59 +03:00
SuperAuguste
220d668929 local var completion 2020-05-16 14:06:48 -04:00
Sergeeeek
8637099d72 WIP alias type resolution 2020-05-16 18:30:16 +03:00
Alexandros Naskos
a7b9755201 Add a space 2020-05-16 17:24:41 +03:00
Alexandros Naskos
1f5c8c0b77 Merge branch 'master' of https://github.com/SuperAuguste/zls 2020-05-16 17:23:12 +03:00
Alexandros Naskos
5a2043ded5 Fixed the build for the latest std.zig parser fixes 2020-05-16 17:21:42 +03:00
Noam Preil
3d5e775bf7
Make style guideline warnings opt-in 2020-05-15 15:14:37 -04:00
Auguste Rame
fc9d91517b
Merge pull request #22 from Vexu/ast
Parsing now always results in an AST
2020-05-15 10:21:33 -04:00
Vexu
3111627923
parsing now always results in a AST 2020-05-15 14:21:29 +03:00
Alexandros Naskos
18a0ffc7e2 Check that the zg std library path provided is absolute, default to null otherwise 2020-05-15 13:21:34 +03:00
Alexandros Naskos
9fc7d1f66e Maintain case when making a URI from a file, make drive letter lowercase on windows 2020-05-15 13:15:10 +03:00
Alexandros Naskos
b540a48fa7 Removed comment 2020-05-15 00:21:04 +03:00
Alexandros Naskos
6954016c91 Trigger global and field completions correctly in more contexts. 2020-05-15 00:16:40 +03:00
SuperAuguste
73c3e87a37 fix errors 2020-05-14 15:57:31 -04:00
Auguste Rame
8468207da3
Merge pull request #23 from Vexu/err
Implement completion for error sets
2020-05-14 13:46:15 -04:00
Vexu
a739bf6499
implement completion for error sets 2020-05-14 20:45:26 +03:00
SuperAuguste
86a1edf9c7 Remove more redundant code, rename function 2020-05-14 12:23:26 -04:00
SuperAuguste
58015dcd64 Remove dead code 2020-05-14 12:16:06 -04:00
SuperAuguste
40235cbdbb fix field access type 2020-05-14 12:14:35 -04:00
Vexu
db6407ea3b
implement getDocComments for rest of named nodes with docs 2020-05-14 19:08:00 +03:00
SuperAuguste
353c9b3261 undo 2020-05-14 10:11:59 -04:00
SuperAuguste
9609aee6a9 test ci 2020-05-14 10:11:32 -04:00
Auguste Rame
bdf7bad51d
Merge pull request #19 from alexnask/imports
Basic import support
2020-05-14 08:53:52 -04:00
Alexandros Naskos
197ba84a82 Finished DocumentStore.deinit() 2020-05-14 15:26:10 +03:00
Alexandros Naskos
ca0bc205e4 Fixed crash with enum fields 2020-05-14 15:15:27 +03:00
Alexandros Naskos
942b617865 Updated README, config.zig doc comment 2020-05-14 15:09:27 +03:00
Alexandros Naskos
f5e4586c76 Detect import removal and decrement document referece count 2020-05-14 14:51:07 +03:00
Alexandros Naskos
112d38e7fa Fixed crash in snippet generation of varargs functions 2020-05-14 13:57:55 +03:00
Alexandros Naskos
6db3c74550 Renamed import context to analysis context, added arena for temporary allocations while analyzing 2020-05-14 12:23:20 +03:00
Alexandros Naskos
7a8a4e1ec5 Fixed crash when completing import with dot access 2020-05-14 12:12:04 +03:00
Alexandros Naskos
76e9a079a3 Avoid unnecessary copy of document text when opening new imports 2020-05-14 11:51:49 +03:00
Alexandros Naskos
60ffc5f551 Fixed crash while closing document (uri double free) 2020-05-14 11:40:17 +03:00
Alexandros Naskos
95b6e6cd6a Fixed relative URI code, get latest tree in analysis 2020-05-14 05:14:37 +03:00
Alexandros Naskos
86d264f488 1 level deep imports now work but we crash when adding levels 2020-05-14 05:00:00 +03:00
Alexandros Naskos
31f1d2fa3e First draft of imports 2020-05-14 04:54:05 +03:00
SuperAuguste
18c026372b fix empty comments 2020-05-13 19:43:09 -04:00
SuperAuguste
bc597025e7 revert fix 2020-05-13 19:41:08 -04:00
SuperAuguste
1a2f83d84b Fix empty comments 2020-05-13 19:40:34 -04:00
SuperAuguste
b182eec37f quick removal of debug 2020-05-13 19:36:51 -04:00
Alexandros Naskos
307dceb703 Preparation for imports, abstracted document hashmap into a document storage type 2020-05-14 02:10:41 +03:00
Alexandros Naskos
be95849a15 Added pointer type resolution 2020-05-13 22:35:14 +03:00
Alexandros Naskos
0e0789b2d5 Unified completions into a function, small snippet improvement 2020-05-13 20:30:57 +03:00
SuperAuguste
20afe9ef3c Doc comments, function completion in structs 2020-05-13 12:19:10 -04:00
SuperAuguste
e9b5bf433e Add function completion, fix function snippet generation 2020-05-13 11:59:44 -04:00