Commit Graph

314 Commits

Author SHA1 Message Date
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
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
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
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
rhysd
addecb3a37 Add missing \n in error message output to stderr 2021-03-10 20:24:43 +09: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
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
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
a699dab2f7
Referencing fixes and more 2021-03-03 16:34:24 +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
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
0133f0d863
First set of changes to work with new std's ast 2021-02-26 21:26:52 +01: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
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
5b50d98353 make sure exe exists 2020-12-19 21:01:16 -05: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
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
f7eff6632e
Cleaned up LSP types, add InitializeResult, no longer use a hardcoded string 2020-11-06 10:08:20 +02:00
Alexandros Naskos
996deb45fe
Added builtin hover handler 2020-11-05 00:54:47 +02:00
Alexandros Naskos
560b39d359
Better builtin data format and script 2020-11-05 00:39:24 +02:00
data-man
fdcb7c264f Increase eval branch quota 2020-10-18 14:18:11 +05:00
Alexandros Naskos
27f9f14ab3 Removed DebugAllocator, use std.heap.GeneralPurposeAllocator 2020-10-10 12:44:37 +03:00
Alexandros Naskos
162f1b2fbe Opaque type support 2020-10-10 12:25:50 +03:00
Alexandros Naskos
a2265afce0 Added keywordLiteral token type for null, true, false, undefined, unreachable, fixed all pointer type semantic token generation 2020-10-04 13:10:48 +03:00
Tadeo Kondrak
b52817cd8f
Update to LSP version 3.16 semantic tokens protocol 2020-09-25 15:31:54 -06:00
codehz
d57d04f3bb Adopt to new ast API 2020-09-01 13:53:52 +08:00
Alexandros Naskos
0f54b0e860 Use scoped loggers 2020-08-14 13:41:34 +03:00
Alexandros Naskos
c09e488109 Added addressof, fixed slice and array completions 2020-07-24 13:20:13 +03:00
Alexandros Naskos
9aa11276a8 Dont respond with semantic token data when disabled in the config 2020-07-23 22:09:28 +03:00
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
213366f029 Fix various bugs 2020-07-23 20:30:03 +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
f00d09c746 fix almost everything - commented some things out, please don't file any issues yet! 2020-07-16 15:02:30 -04:00
SuperAuguste
20f440b3a0 more fixes 2020-07-16 12:04:23 -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
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
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
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
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
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
16b44a334b Finished semantic token analysis 2020-06-18 15:12:09 +03:00
Alexandros Naskos
42f1325488 Prototype semantic tokens implementation with actual semantic analysis 2020-06-17 23:36:40 +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
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
bfdeecbd04 Better alias support 2020-06-15 01:19:21 +03:00
Alexandros Naskos
48019dd7e2 Added label support 2020-06-14 22:24:18 +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
04638a6d4d Fixed occasional crash on Sublime text, only get params when we use then 2020-06-12 20:31:33 +03:00