Commit Graph

293 Commits

Author SHA1 Message Date
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