Meghan Denny
8d46ceff07
use an enum for zig version
2021-10-19 19:26:57 -07: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
4bc8b92e19
collapse more fn signatures
2021-09-30 18:45:45 -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
7c209a8404
condese small expanded things
2021-09-30 17:52:36 -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
Sashiri
fed1c4c2c6
usingnamespace semantics update
...
+ Ast changes adjustments
2021-09-04 21:25:35 +02: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
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
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
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
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
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
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
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
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
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
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
2fc9506fdc
Refactor config wizard
...
Deduplicated zig finder and added `zls config` subcommand
2021-03-30 23:52:25 +02:00
Alexandros Naskos
6edd686668
Yet more import resolution fixes
2021-03-30 21:41:04 +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
Austin Clements
ec7ed30e65
Add check for semantic tokens client capability
2021-03-29 19:04:55 -05: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
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
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