Alexandros Naskos
e7a1f5c34f
Fixed slice access type resolution
2020-07-23 21:33:43 +03:00
Alexandros Naskos
8ddd80b788
Fixed self detection for snippet completions
2020-07-23 21:13:38 +03:00
Alexandros Naskos
7063abec92
Fixed struct field goto and hover
2020-07-23 21:10:40 +03:00
Alexandros Naskos
213366f029
Fix various bugs
2020-07-23 20:30:03 +03:00
Alexandros Naskos
b71585da1d
Fixed for latest zig master build
2020-07-23 19:06:39 +03:00
SuperAuguste
a1c0f86066
kinda fix struct completion - still needs an actual fix
2020-07-17 23:21:17 -04:00
SuperAuguste
76dcc8cbe2
null fix
2020-07-17 10:01:21 -04:00
SuperAuguste
db75737037
semantic fixes
2020-07-16 15:36:44 -04:00
SuperAuguste
489378b939
fix comment in references.zig, format
2020-07-16 15:19:08 -04:00
SuperAuguste
f00d09c746
fix almost everything - commented some things out, please don't file any issues yet!
2020-07-16 15:02:30 -04:00
SuperAuguste
1d7fed7f87
even moar!!! infix/prefix changes are the only ones remaining
2020-07-16 12:07:21 -04:00
SuperAuguste
20f440b3a0
more fixes
2020-07-16 12:04:23 -04:00
SuperAuguste
ce841d1dc4
ids -> tags (part 2)
2020-07-16 11:05:56 -04:00
SuperAuguste
da4d2c2be1
ids -> tags (part 1)
2020-07-16 10:56:22 -04:00
Alexandros Naskos
6eee43af2f
Fixed build on latest zig nightly
2020-07-12 22:12:09 +03:00
Alexandros Naskos
e1bce76c63
Fixed enum completion bug
2020-07-08 04:11:52 +03:00
Alexandros Naskos
62774d065b
Reworked tag stores, fixed memory leak
2020-07-08 04:05:44 +03:00
Alexandros Naskos
62ab67f751
Add allocation info in the test workflow
2020-07-08 00:22:03 +03:00
Alexandros Naskos
6dc05df0ac
Small fix
2020-07-07 23:50:32 +03:00
Alexandros Naskos
5454883d2d
Added *, ? completions, improved readme
2020-07-07 23:26:12 +03:00
Alexandros Naskos
f55d5a25aa
Better log levels
2020-07-07 22:16:29 +03:00
Alexandros Naskos
b61785eb3e
Optimize document symbols
2020-07-07 11:57:02 +03:00
Alexandros Naskos
3659a5c1a9
Added find references handler
2020-07-06 01:32:14 +03:00
Alexandros Naskos
c067bce9fa
Fixed to use latest HashMap API
2020-07-06 00:56:41 +03:00
Alexandros Naskos
0f7a384b39
Added references.zig, use it from rename.zig
2020-07-06 00:35:52 +03:00
Alexandros Naskos
cbfb316763
Use LSP offsets in rename.zig
2020-07-05 01:40:18 +03:00
Alexandros Naskos
6bf2c9a1c7
Added encoding offset aware documentRange
2020-07-03 12:39:58 +03:00
Alexandros Naskos
28b3cafc3f
zig fmt pass, correctly return after sending formatting result
2020-07-03 12:24:24 +03:00
Alexandros Naskos
f6df9d4c0a
Added offsetEncoding clangd extension support
2020-07-03 12:00:00 +03:00
Alexandros Naskos
9bed369797
Correctly handle utf16 offsets for semantic tokens
2020-07-03 11:34:42 +03:00
Alexandros Naskos
78a7d79c39
Removed unused function
2020-07-03 02:34:46 +03:00
Alexandros Naskos
a0ae982202
Add offsets file
2020-07-03 02:33:10 +03:00
Alexandros Naskos
d8aba7da0b
Correctly support utf16 offsets
2020-07-03 02:31:28 +03:00
Alexandros Naskos
8c154c2a60
Added stack trace leak reporting to the debug allocator, fixed remaining two memory leaks
2020-07-02 19:13:10 +03:00
Alexandros Naskos
21e18a1d01
Fixed some deallocation code
2020-07-02 14:44:12 +03:00
Alexandros Naskos
e54a6d2522
Fixed documentPositionIndex, added tests
2020-07-02 14:03:24 +03:00
Alexandros Naskos
b3006745a0
More fixes
2020-06-30 18:00:33 +03:00
Alexandros Naskos
671318730a
Started adding session tests, finished (buggy) main loop rewrite
2020-06-30 15:46:43 +03:00
Alexandros Naskos
ddcf6c677b
Start working on a better proccess JSON RPC
2020-06-30 01:34:21 +03:00
Alexandros Naskos
6953ff95eb
Use apge allocator again after it was fixed
2020-06-29 02:03:51 +03:00
Alexandros Naskos
0102963433
Fixed formatting on master
2020-06-28 16:16:41 +03:00
Alexandros Naskos
3be74cbdc5
Dont use variable decl init node blindly
2020-06-28 16:08:15 +03:00
Alexandros Naskos
965724dd7e
Fixed build and crashes with zig master branch:
2020-06-28 13:58:51 +03:00
Alexandros Naskos
108a2dbd64
Semantic highlighting improvements
2020-06-27 20:45:58 +03:00
Alexandros Naskos
9343ec311b
Removed todo comments
2020-06-27 15:30:32 +03:00
Alexandros Naskos
8bc6087646
Completed renaming
2020-06-27 15:29:45 +03:00
Alexandros Naskos
07e1013680
Add rename file
2020-06-27 09:18:05 +03:00
Alexandros Naskos
beb900f1d9
Added label renaming
2020-06-27 03:16:14 +03:00
Alexandros Naskos
4952c34481
Use std.log
2020-06-26 14:29:59 +03:00
Alexandros Naskos
b3f6143e08
Use print instead of warn
2020-06-26 03:26:09 +03:00
Alexandros Naskos
385e01f613
Anonymous mark anonymous struct literal fields as 'field'
2020-06-26 01:50:36 +03:00
axzn
c94efa8ac0
fix ZLS flagging std "cos_" as not camel case (see issue #120 )
2020-06-24 11:28:02 +02:00
Alexandros Naskos
41da6b88ef
Resolve through comptime expressions
2020-06-23 19:57:28 +03:00
Alexandros Naskos
6d75551f7a
Removed todo comment
2020-06-23 13:37:07 +03:00
Alexandros Naskos
9997535a3e
Basic support for switch payloads
2020-06-23 13:32:37 +03:00
Alexandros Naskos
a0f1795f2d
Fixed infinite loop with usingnamespace cycles
2020-06-23 12:43:56 +03:00
Alexandros Naskos
bdbfea0737
removed accidental leftover code
2020-06-23 12:16:37 +03:00
Alexandros Naskos
c8af53ef7a
Fix crash when using param identifier in the same param's type expression
2020-06-23 12:15:18 +03:00
prime31
b1b355c4ac
fixes steps with packages in sub-steps
2020-06-18 17:51:39 -07:00
Alexandros Naskos
65ad078b8c
Payload semantic highlighting
2020-06-18 22:53:33 +03:00
Alexandros Naskos
e2a3b38f5a
Align info
2020-06-18 21:31:52 +03:00
Alexandros Naskos
4aa74f7980
We can call decrementCount from decrementBuildFileRefs when the count is already zero, account for that.
2020-06-18 20:52:54 +03:00
Alexandros Naskos
eab1f4783b
Removed unused code
2020-06-18 20:31:39 +03:00
Alexandros Naskos
e59e1f08e5
Align expr fix
2020-06-18 20:30:58 +03:00
Alexandros Naskos
d4e6ddd780
Root ContainerField highlighting support
2020-06-18 15:51:20 +03:00
Alexandros Naskos
fc769e7e83
Fixed enum access
2020-06-18 15:43:03 +03:00
Alexandros Naskos
2dc7b609d1
Added a TODO comment
2020-06-18 15:14:55 +03:00
Alexandros Naskos
16b44a334b
Finished semantic token analysis
2020-06-18 15:12:09 +03:00
Alexandros Naskos
6c718a59c4
Fixed infinite loop
2020-06-18 03:23:56 +03:00
Alexandros Naskos
5e7fc18404
Array type fix
2020-06-18 02:52:03 +03:00
Alexandros Naskos
c33e01544a
Slice fix
2020-06-18 02:49:34 +03:00
Alexandros Naskos
b8abdc44df
Use @asyncCall to call with a new stack, avoids stack overflows
2020-06-18 02:45:25 +03:00
Alexandros Naskos
57b0e938e3
Fixed slice and array types
2020-06-18 00:13:56 +03:00
Alexandros Naskos
42f1325488
Prototype semantic tokens implementation with actual semantic analysis
2020-06-17 23:36:40 +03:00
Alexandros Naskos
d873b877e7
Various fixes
2020-06-17 15:07:21 +03:00
Alexandros Naskos
8d69fdb95a
Started working on our own Type, differentiate between values of a type and the type itself.
2020-06-17 05:12:12 +03:00
Alexandros Naskos
20ec7470bb
Respond to shutdown request
2020-06-17 00:26:45 +03:00
Alexandros Naskos
8beedb0384
Removed old comment
2020-06-16 22:03:55 +03:00
Alexandros Naskos
abe76ec2bf
Added formatter
2020-06-16 22:02:31 +03:00
Alexandros Naskos
a45939f8ab
Improvements
2020-06-16 18:49:31 +03:00
Alexandros Naskos
fd424277ab
Run zig fmt
2020-06-16 15:49:57 +03:00
Alexandros Naskos
cad6b78a49
Cleaned up ComptimeStringMaps
2020-06-16 15:45:16 +03:00
Alexandros Naskos
fc921f10a4
Fix server capabilities, add semantic tokens config option, fix semantic tokens basic implementation
2020-06-16 14:27:00 +03:00
Alexandros Naskos
bed05b6601
Wrap demantic tokens response result in 'data'
2020-06-16 02:14:39 +03:00
Alexandros Naskos
2da58c5068
Go to declaration will not resolve aliases (go to definition still does)
2020-06-15 12:37:42 +03:00
Alexandros Naskos
f6e3109ff3
Yet better aliases, better label position context detection
2020-06-15 04:39:50 +03:00
Alexandros Naskos
02de547ce9
Better alias support, fix another build file refcount issue
2020-06-15 03:59:49 +03:00
Alexandros Naskos
819b367360
Extract packages from all top level steps
2020-06-15 02:26:54 +03:00
Alexandros Naskos
bfdeecbd04
Better alias support
2020-06-15 01:19:21 +03:00
Alexandros Naskos
e68bec8673
Simplified some code
2020-06-14 23:43:29 +03:00
Alexandros Naskos
48019dd7e2
Added label support
2020-06-14 22:24:18 +03:00
Alexandros Naskos
b46c02228b
Fix build file reference counting
2020-06-14 21:19:27 +03:00
Alexandros Naskos
e27c58e953
Build file reference counting fix
2020-06-14 21:11:49 +03:00
Alexandros Naskos
7f12928fe9
Dont show fields in global completions and from usingnamespaced scopes
2020-06-14 13:03:14 +03:00
Alexandros Naskos
0592513da4
Basic semantic tokens implementation
2020-06-14 01:07:57 +03:00
Alexandros Naskos
112f6d735a
Correctly handle inferred error sets, add self argument support when evaluating bound type params, semanticToken scaffolding
2020-06-13 21:20:04 +03:00
Alexandros Naskos
5c78e88b19
Use Bi formatting in debug allocator instead of our own bad solution now that PR has been merged in zig
2020-06-12 21:33:40 +03:00
Alexandros Naskos
04638a6d4d
Fixed occasional crash on Sublime text, only get params when we use then
2020-06-12 20:31:33 +03:00
Alexandros Naskos
98ebac6d64
Take more client capabilities into account
2020-06-12 17:42:41 +03:00
Alexandros Naskos
612e93be6a
Fix
2020-06-12 15:53:45 +03:00
Alexandros Naskos
481f2c2965
Better comment in debug allocator pointing to a ziglang PR
2020-06-12 15:52:14 +03:00
Alexandros Naskos
1086d3a29f
Added bound function type params
2020-06-12 14:56:46 +03:00
Alexandros Naskos
be9f2de43a
Fixed error union decls
2020-06-11 11:21:08 +03:00
Alexandros Naskos
693e810d75
Resovle parens, only skip empty container fields where we have to
2020-06-11 11:12:31 +03:00
Alexandros Naskos
28e9d08f03
Stop adding malformed container decls into scopes
2020-06-11 03:20:44 +03:00
Alexandros Naskos
80dd19dd8b
Usingnamespace support
2020-06-11 02:40:11 +03:00
Alexandros Naskos
323b05856e
Fixed array payload type resolution
2020-06-11 01:09:28 +03:00
Alexandros Naskos
7650decfa0
Improvements
2020-06-11 01:00:13 +03:00
Alexandros Naskos
b8b6c534e8
Fixed field access
2020-06-11 00:24:57 +03:00
Alexandros Naskos
86e417e8dc
Add hover, goto, completions for alternate declaration types
2020-06-10 22:52:33 +03:00
Alexandros Naskos
545989339d
Remove unused code, fixed snippet self param skipping
2020-06-10 22:05:11 +03:00
Alexandros Naskos
05d75781de
Now builds!
2020-06-10 21:24:17 +03:00
Alexandros Naskos
3bdb2ee444
More progress
2020-06-10 20:48:40 +03:00
Alexandros Naskos
d6609d918b
More progress
2020-06-10 19:54:01 +03:00
Alexandros Naskos
9b08d9e88a
Started removing scope_nodes, using symbol table instead
2020-06-10 19:01:44 +03:00
Alexandros Naskos
0a9cf87585
Added symbol tables
2020-06-10 16:12:00 +03:00
Alexandros Naskos
c2f8537d7b
Added maximum bytes allocated in debug allocator, as well as peak memory usage
2020-06-09 16:39:00 +03:00
Alexandros Naskos
aa0e3e3736
Merge pull request #108 from Vexu/cast
...
Support completion for builtin casts with explicity type parameter
2020-06-09 10:57:50 +03:00
SuperAuguste
3c2c1e97ed
preamble to usingnamespace
2020-06-08 23:21:55 -04:00
SuperAuguste
20434839f1
add new instructions to config, start increasing debugability
2020-06-08 18:18:12 -04:00
Vexu
3fc7ee75c2
support completion for builtin casts with explicity type parameter
2020-06-08 19:07:34 +03:00
SuperAuguste
6ae23ba2d0
fix field details in completions
2020-06-07 09:49:21 -04:00
Alexandros Naskos
71500428b6
Fixed occasional crash
2020-06-07 12:21:01 +03:00
SuperAuguste
d35a71806b
fix
2020-06-06 18:02:53 -04:00
Auguste Rame
dd58d0d501
Merge pull request #103 from Vexu/patch-1
...
Correctly skip first comma in bound function snippets
2020-06-06 14:11:38 -04:00
Alexandros Naskos
a2c4f7c5c7
Removed debug trace
2020-06-06 16:57:39 +03:00
Alexandros Naskos
af42c95222
Handle string request ids
2020-06-06 15:40:33 +03:00
Veikka Tuominen
da170c44b9
correctly skip first comma in bound function snippets
2020-06-06 10:35:59 +03:00
Alexandros Naskos
73b58abe51
Detect self arguments and skip it when generating snippets
2020-06-06 02:44:43 +03:00
Alexandros Naskos
563c4f0294
Fixed newlines in markdown line comments
2020-06-05 00:19:00 +03:00
Alexandros Naskos
b0bb8888d3
Removed unreachable, switch cases can trigger this
2020-06-03 19:59:26 +03:00
Alexandros Naskos
34fbef97fe
Added If, While, For payload type resolution
2020-06-03 19:56:00 +03:00
Alexandros Naskos
9392c4032c
Only refresh packages when saving a build.zig file, not on any change
2020-06-03 11:32:05 +03:00
Alexandros Naskos
ef95c76e45
Added doc comments on hover
2020-06-03 11:23:14 +03:00
Alexandros Naskos
d429aa6105
Removed comment
2020-06-02 16:49:31 +03:00
Alexandros Naskos
e7157ba381
Preparing for semantic tokens support. Fix a crash on some function calls
2020-06-02 16:48:23 +03:00
Alexandros Naskos
5ae7b0a855
Resolve type parameters in some circumstances
2020-06-01 20:48:14 +03:00
Alexandros Naskos
52fe21b8bd
Parse client capabilities for snippet support
2020-06-01 13:29:06 +03:00
Alexandros Naskos
269c308ec7
Respond with null where we can, even if we already marked a capability as false.
2020-06-01 12:28:33 +03:00
Alexandros Naskos
50c8cebe26
Removed reachable unreachable
2020-05-31 18:02:33 +03:00
Alexandros Naskos
543cb5816c
Added zig_exe_path option, use it to detect lib path if none is provided
2020-05-30 23:36:18 +03:00
SuperAuguste
c9af33011a
fix function defs in containers
2020-05-29 16:07:00 -04:00
SuperAuguste
b08ff62595
Merge branch 'master' of https://github.com/SuperAuguste/zls
2020-05-29 16:01:45 -04:00
SuperAuguste
e945c4cca0
fix
2020-05-29 16:01:35 -04:00
Alexandros Naskos
4e87390196
DeclsFromIndex no longer needs to return the innermost container, we find it while processing expressions
2020-05-29 12:46:50 +03:00
Alexandros Naskos
bc8ecd28f4
Merge pull request #40 from Vexu/err
...
Implement global error set and enum literal completion
2020-05-28 19:04:06 +03:00
Vexu
c1ba26e0a2
implement completion for enum literals
2020-05-28 18:21:51 +03:00
Vexu
22a863134b
implement global error set completion
2020-05-28 15:45:11 +03:00
SuperAuguste
985a1d6398
give tests names in outline
2020-05-28 08:41:40 -04:00
SuperAuguste
0720452217
fix more no_names and build config
2020-05-27 21:14:27 -04:00
SuperAuguste
2b153e046c
outlines, made JSON stdout memory dynamic
2020-05-27 20:39:36 -04:00
Alexandros Naskos
6f8fbe1ccb
Added tests.
2020-05-27 21:58:35 +03:00
Alexandros Naskos
406e400f0c
Pointer to array slicing yields a pointer to array type, not a slice type.
2020-05-27 19:01:23 +03:00
Alexandros Naskos
7602f34bb4
Added .?, .*, [] support
2020-05-27 18:49:11 +03:00
Alexandros Naskos
54f3590b6d
Merge branch 'master' of https://github.com/SuperAuguste/zls into new_pos_context
2020-05-27 13:47:12 +03:00
Alexandros Naskos
a5958caccd
Free handles before deleting them from the hashmap
2020-05-27 13:41:50 +03:00
Alexandros Naskos
f3974d2ff2
Removed unneeeded function
2020-05-27 13:09:50 +03:00
Alexandros Naskos
d2325df729
Removed comments
2020-05-27 02:00:22 +03:00
Alexandros Naskos
f6df35e069
Reworked position context to use tokenizer, works in more contexts
2020-05-27 01:45:18 +03:00
Alexandros Naskos
3c0ee21337
Removed comment
2020-05-26 21:39:39 +03:00
Alexandros Naskos
a330932b7c
Copy scope nodes when cloning an analysis context
2020-05-26 17:19:16 +03:00
Alexandros Naskos
6f23d8a053
Small fixes and code cleanup
2020-05-26 13:30:28 +03:00
Alexandros Naskos
9bf0842697
Merge branch 'master' of https://github.com/SuperAuguste/zls
2020-05-26 01:52:25 +03:00
Alexandros Naskos
da6f43c46d
Go to definition now resolved fn aliases, added hover
2020-05-26 01:51:50 +03:00
Alexandros Naskos
48ad1eccbf
Fixed goto import, preparing for hover impl
2020-05-26 00:37:18 +03:00
SuperAuguste
f5b30cfd6c
zig build config is here!
2020-05-25 17:12:08 -04:00
Alexandros Naskos
754a982be2
Make capabilities explicit, make hover capability true
2020-05-25 23:15:54 +03:00
Alexandros Naskos
8d9b96e749
Added build file ref counting and freeing
2020-05-25 20:42:58 +03:00
Alexandros Naskos
379891f937
Dont copy the build runner if a file with that name already exists
2020-05-25 20:21:53 +03:00
Alexandros Naskos
b82fb9c790
Added build_runner_path configuration option
2020-05-25 20:04:23 +03:00
Alexandros Naskos
02745f1472
Free build files in document store deinit
2020-05-25 19:49:04 +03:00
Alexandros Naskos
4bf97bebc9
Seems to work, needs cleanup
2020-05-25 19:33:08 +03:00
Alexandros Naskos
5fb68c9dc7
Do not try to find build files in a std and subdirectories
2020-05-25 17:48:25 +03:00
Alexandros Naskos
155c5b2a95
Started working on build file logic
2020-05-25 17:24:44 +03:00
Alexandros Naskos
4542abf145
Check for the existence of zig in PATH in main()
2020-05-25 16:18:00 +03:00
Alexandros Naskos
f008a776e2
Removed debug traces, added comment
2020-05-25 11:30:12 +03:00
Alexandros Naskos
1f23ba8490
Use new build.zig functions to get the correct steps
2020-05-25 11:28:38 +03:00
Alexandros Naskos
3b052372c2
Added custom build runner, install it along with the zls binary
2020-05-25 03:22:39 +03:00
Alexandros Naskos
7c5ff5c43d
Fix segfault with var params
2020-05-25 02:57:19 +03:00
Alexandros Naskos
727b363f7f
Fix infinite loop in resolveTypeOfNode
2020-05-24 21:01:35 +03:00
Alexandros Naskos
d6513456c1
Keep old scope nodes onContainer
2020-05-24 19:26:46 +03:00
Alexandros Naskos
c6fa528af4
Store trees in handles
2020-05-24 19:00:21 +03:00
Alexandros Naskos
fd069b026a
Added hack to support ParamDecl not being a node anymore
2020-05-24 17:31:28 +03:00
Alexandros Naskos
594488d7c5
Merged master
2020-05-24 17:12:13 +03:00
Alexandros Naskos
34ba67b3d1
Fixed node iteration:
2020-05-24 17:07:48 +03:00
Alexandros Naskos
40e1e8843c
Added timing information output
2020-05-24 15:39:40 +03:00
Alexandros Naskos
9ec32ac830
We now complete ArrayList!
2020-05-24 15:24:18 +03:00
SuperAuguste
dd9ec8e450
Fix completion of functions
2020-05-23 22:07:09 -04:00
Alexandros Naskos
f5ca94a0d1
Merge remote-tracking branch 'zigtools/master' into new_parser
2020-05-24 02:08:06 +03:00
Alexandros Naskos
11b5da3a91
Now compiles on the new parser branch
2020-05-24 01:21:02 +03:00
Alexandros Naskos
22b5d2e2c3
Pass the arguments in the correct order dummy
2020-05-24 00:15:35 +03:00
Alexandros Naskos
5dc7a1b40a
Fix @This() completions, do half the work in global completions
2020-05-23 23:22:50 +03:00
Alexandros Naskos
30cb9e06e4
Complete non-pub declarations in the same module
2020-05-23 16:14:03 +03:00
Alexandros Naskos
c895d7d8f6
Go to definition now works for captures
2020-05-23 02:58:39 +03:00
Alexandros Naskos
34adb4e22f
Added switch to declFromIndex, fixed occasional crash
2020-05-23 02:33:42 +03:00
Alexandros Naskos
a189fa171c
More declsFromIndex improvements
2020-05-23 01:58:47 +03:00
Alexandros Naskos
c3d2aa3434
Handle if, while, for, payloads
2020-05-23 01:03:41 +03:00
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
SuperAuguste
7c388812c7
remove debug
2020-05-13 11:45:32 -04:00
Auguste Rame
adbcaefe26
Merge pull request #14 from SuperAuguste/completion
...
Start implementing completion
2020-05-13 11:44:07 -04:00
SuperAuguste
dc292e74ee
null bug fixes
2020-05-13 11:43:28 -04:00
SuperAuguste
9ae912efdd
super basic completion, tons of things to iron out
2020-05-13 10:10:20 -04:00
SuperAuguste
a3067f88b1
Add new analysis engine
2020-05-13 09:03:33 -04:00
Alexandros Naskos
4f2828f9cb
Removed debug log
2020-05-12 20:02:22 +03:00
Alexandros Naskos
aacad999c4
Made function snippet generation better.
2020-05-12 19:59:16 +03:00
SuperAuguste
d0837ffc51
Start implementing completion
2020-05-11 08:28:08 -04:00
SuperAuguste
a2f314301c
quick fix of asset
2020-05-09 15:42:35 -04:00
Alexandros Naskos
86fbf5fe7e
Global completions now check config for snippet support, modified readme to reflect changes.
2020-05-09 21:45:13 +03:00
Alexandros Naskos
25cc662bcc
Merge branch 'master' of https://github.com/SuperAuguste/zls into read_config
2020-05-09 21:38:20 +03:00
Alexandros Naskos
35b4913b3e
Removed no_snippets build option.
...
Instead, we now read a configuration file, zls.json in the same folder as the executable.
Options are defined in the struct config.zig and must have default values.
The only option right now is enable_snippets and it defaults to true.
2020-05-09 16:43:51 +03:00
Alexandros Naskos
f25dade27d
Removed comments
2020-05-09 05:43:17 +03:00
Alexandros Naskos
e46135cb68
Added snippet completion for global functions, fixed no snipper completion.
2020-05-09 05:38:08 +03:00
Alexandros Naskos
922559c83a
Use error iterator instead of manual looping in diagnostic generation
2020-05-09 04:02:29 +03:00
SuperAuguste
01b2c2e328
fix bug with latest pr
2020-05-08 13:02:46 -04:00
Auguste Rame
b939b9cefa
Merge pull request #11 from alexnask/PascalCase
...
Detect type functions and require PascalCase, require camelCase for the rest
2020-05-08 12:20:34 -04:00
Alexandros Naskos
d8457c96a1
is_type_function is const
2020-05-08 18:07:14 +03:00
Alexandros Naskos
29b0045bc7
Detect type functions and require PascalCase, require camelCase for the rest
2020-05-08 18:01:34 +03:00
Alexandros Naskos
bd7675e5b7
Fixed typo
2020-05-08 17:25:22 +03:00
Alexandros Naskos
09cd91690c
Renamed documentContext
to documentPositionContext
and added multiline string literal to it.
2020-05-08 17:24:29 +03:00
SuperAuguste
ffcdb886d9
fix crash with documentContext
2020-05-08 09:17:32 -04:00
Alexandros Naskos
aca7db3e88
Reset context to other when trying to find field/var access and don't get alphanumerical or @"..."
2020-05-08 15:09:31 +03:00
Alexandros Naskos
0b5eb4b9d2
Fixed field_access check
2020-05-08 15:07:14 +03:00
Alexandros Naskos
0149f11c7c
Switched Context to PositionContext
2020-05-08 14:36:54 +03:00
Alexandros Naskos
982a39f868
Added context detection from document and position for builtins, variable accesses, field accesses, string literals and comments.
2020-05-08 13:50:21 +03:00
SuperAuguste
fb9f50d606
fix builtin completion
2020-05-07 23:05:17 -04:00
SuperAuguste
84837dfe58
fix pub functions
2020-05-07 22:27:42 -04:00
Alexandros Naskos
02e57f5d59
Renamed leak_alloction build option to allocation_info
...
Switched to readAll and writeAll stream functions
Disabled logs on non-debug builds
Created freeDocument(doc), closeDocument(uri), called at appropriate sites
Removed _ = expr; for void values
Added and clarified some logging messages
Simplified builtin_completion generation
The JSON parser is now reused but reset after parsing a RPC
Fix memory leak when closing a document (last mem. leak)
Renamed leak_alloc to debug_alloc
Removed catch return statements from main(), rely on try to also get stacktraces instead
2020-05-08 02:53:00 +03:00
SuperAuguste
01ff89eea3
Add no_snippets
2020-05-07 13:16:04 -04:00
Alexandros Naskos
6ed45a1f23
Also free the sane text when releasing a document
2020-05-07 20:02:54 +03:00
Alexandros Naskos
6ac068a3c5
Merge branch 'master' of https://github.com/SuperAuguste/zls into separate_text_mem
2020-05-07 19:54:11 +03:00
SuperAuguste
447d52dd1c
fix init error
2020-05-07 12:47:39 -04:00
SuperAuguste
6b099f8c6d
fix
2020-05-07 12:25:37 -04:00
Alexandros Naskos
4d5f833226
Merge branch 'master' of https://github.com/SuperAuguste/zls into separate_text_mem
2020-05-07 18:43:56 +03:00
SuperAuguste
1725278be1
add master data, add data selection
2020-05-07 11:29:40 -04:00
Alexandros Naskos
ee594a1b2f
Separate document text and memory.
...
Text is now a substring of memory, starting at index 0.
We now realloc memory when needed and only copy the existing data around
instead of allocating a new string, copying all the data and freeing
the old string.
This leads to possibly less allocation calls, depending on the allocator
and less copying necesssary.
2020-05-07 17:58:31 +03:00
Alexandros Naskos
04abb3a5ff
Fix merge conflicts
2020-05-07 16:23:13 +03:00
Alexandros Naskos
5c602745fd
Use the page allocator as our base allocator for now.
2020-05-07 16:20:45 +03:00
Alexandros Naskos
cea1222b79
Free the old document text after rebuilding the new one, this was a use after free since before, after point into the old memory
2020-05-07 16:04:57 +03:00
Alexandros Naskos
eaf0c1f3e5
Switched struct and enum literals to use the anonymous form where possible.
...
Added trailing commas to fields of struct literals that are followed by newline.
2020-05-07 15:29:53 +03:00
Alexandros Naskos
a0addc040d
Fixed a bug in publishDiagnostics where message data on the stack could be corrupted before being sent
2020-05-07 15:01:16 +03:00
Alexandros Naskos
c5d3d7902e
Free json parser state, compute builtin completions at comptime
2020-05-07 14:36:40 +03:00
Alexandros Naskos
a7e4d0b5e3
Use a local arena to free all memory with one call.
2020-05-07 14:10:58 +03:00
Alexandros Naskos
e9d9c57ff4
Fixed some additional memory leaks.
2020-05-07 13:56:08 +03:00
Alexandros Naskos
3fa5ef4b96
Fixed a couple of typos
2020-05-07 12:58:35 +03:00
Alexandros Naskos
0283222e3a
Added build option to enable the leak counting allocator.
...
Log the allocation count to the client at the end of the main loop.
Fixed two memory leaks in analysis.zig
2020-05-07 12:50:25 +03:00
SuperAuguste
5bd790f416
basic stylistic linter
2020-05-03 22:17:19 -04:00
SuperAuguste
b0e21bf82c
hotfix
2020-05-03 17:27:37 -04:00
SuperAuguste
738a9be0cc
added function comments and signature
2020-05-03 17:27:08 -04:00
SuperAuguste
88814b9589
better builtin completion, versioning
2020-05-02 12:43:26 -04:00
SuperAuguste
999a365f3c
fixes
2020-04-28 09:31:41 -04:00
SuperAuguste
def89a90f5
Better builtin completion
2020-04-27 22:59:28 -04:00