From f47d13bc20e8e6a73dd322ffc8d7367edd3bf6b6 Mon Sep 17 00:00:00 2001 From: Yingchi Long Date: Sat, 22 Jun 2024 11:06:03 +0800 Subject: [PATCH] add option type --- nixd/tools/nixd/test/hover-options.md | 37 ++++++++++++++------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/nixd/tools/nixd/test/hover-options.md b/nixd/tools/nixd/test/hover-options.md index 626bb2348..35583a333 100644 --- a/nixd/tools/nixd/test/hover-options.md +++ b/nixd/tools/nixd/test/hover-options.md @@ -1,5 +1,5 @@ # RUN: nixd --lit-test \ -# RUN: --nixos-options-expr="{ foo.bar = { _type = \"option\"; }; }" \ +# RUN: --nixos-options-expr="{ foo.bar = { _type = \"option\"; description = \"test\"; type.description = \"hello type\"; }; }" \ # RUN: < %s | FileCheck %s @@ -59,23 +59,24 @@ ``` ``` - CHECK: "id": 2, -CHECK-NEXT: "jsonrpc": "2.0", -CHECK-NEXT: "result": { -CHECK-NEXT: "contents": { -CHECK-NEXT: "kind": "markdown", -CHECK-NEXT: "value": "? (missing type)" -CHECK-NEXT: }, -CHECK-NEXT: "range": { -CHECK-NEXT: "end": { -CHECK-NEXT: "character": 9, -CHECK-NEXT: "line": 0 -CHECK-NEXT: }, -CHECK-NEXT: "start": { -CHECK-NEXT: "character": 6, -CHECK-NEXT: "line": 0 -CHECK-NEXT: } -CHECK-NEXT: } + CHECK: "id": 2, +CHECK-NEXT: "jsonrpc": "2.0", +CHECK-NEXT: "result": { +CHECK-NEXT: "contents": { +CHECK-NEXT: "kind": "markdown", +CHECK-NEXT: "value": " (hello type)\ntest" +CHECK-NEXT: }, +CHECK-NEXT: "range": { +CHECK-NEXT: "end": { +CHECK-NEXT: "character": 9, +CHECK-NEXT: "line": 0 +CHECK-NEXT: }, +CHECK-NEXT: "start": { +CHECK-NEXT: "character": 6, +CHECK-NEXT: "line": 0 +CHECK-NEXT: } +CHECK-NEXT: } +CHECK-NEXT: } ``` ```json