From de51d9f4f57373d5fd2a66d47141dddfff0d0fbe Mon Sep 17 00:00:00 2001 From: markfirmware Date: Mon, 18 May 2020 12:56:43 -0400 Subject: [PATCH 1/2] Update -Ddata_version explanation --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 56762a1..91e237e 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,9 @@ zig build ### Build Options -| Option | Type | What it Does | -| --- | --- | --- | -| `-Ddata_version` | `string` | The data file version. Any files in the `src/data` file that correspond with the Zig version you want the language server to build for (0.6.0, master). +| Option | Type | Default Value | What it Does | +| --- | --- | --- | --- | +| `-Ddata_version` | `string` (master or 0.6.0) | 0.6.0 | The data file version. This selects the files in the `src/data` folder that correspond to the Zig version being served. Then, you can use the `zls` executable in an editor of your choice that has a Zig language server client! From 27034abbaf7a5ad83f4fdb5d2d08299c30490fb6 Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Mon, 18 May 2020 20:59:44 +0200 Subject: [PATCH 2/2] Also return from `getFieldAccessTypeNode` when a comma is found. This allows to get completion support when a function with multiple arguments is completed. --- src/analysis.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/analysis.zig b/src/analysis.zig index d818a18..e0ef1c4 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -382,7 +382,7 @@ pub fn getFieldAccessTypeNode( }, .Period => { var after_period = tokenizer.next(); - if (after_period.id == .Eof) { + if (after_period.id == .Eof or after_period.id == .Comma) { return current_node; } else if (after_period.id == .Identifier) { // TODO: This works for now, maybe we should filter based on the partial identifier ourselves?