Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

improve the look of the hover snapshots

author
Giacomo Cavalieri
committer
Louis Pilfold
date (Feb 12, 2026, 8:34 PM UTC) commit 4b952446 parent 842b2947 change-id otxmpmpp
+676 -860
-58
compiler-core/src/javascript/tests/snapshots/gleam_core__javascript__tests__assert__assert_with_logical_on_right.snap
··· 1 - --- 2 - source: compiler-core/src/javascript/tests/assert.rs 3 - expression: "\npub fn main() {\n assert True && 3 < 4\n}\n" 4 - --- 5 - ----- SOURCE CODE 6 - 7 - pub fn main() { 8 - assert True && 3 < 4 9 - } 10 - 11 - 12 - ----- COMPILED JAVASCRIPT 13 - import { makeError } from "../gleam.mjs"; 14 - 15 - const FILEPATH = "src/module.gleam"; 16 - 17 - export function main() { 18 - if (true) { 19 - if (!(3 < 4)) { 20 - throw makeError( 21 - "assert", 22 - FILEPATH, 23 - "my/mod", 24 - 3, 25 - "main", 26 - "Assertion failed.", 27 - { 28 - kind: "binary_operator", 29 - operator: "&&", 30 - left: { kind: "literal", value: true, start: 26, end: 30 }, 31 - right: { kind: "expression", value: false, start: 34, end: 39 }, 32 - start: 19, 33 - end: 39, 34 - expression_start: 26 35 - } 36 - ) 37 - } 38 - } else { 39 - throw makeError( 40 - "assert", 41 - FILEPATH, 42 - "my/mod", 43 - 3, 44 - "main", 45 - "Assertion failed.", 46 - { 47 - kind: "binary_operator", 48 - operator: "&&", 49 - left: { kind: "literal", value: false, start: 26, end: 30 }, 50 - right: { kind: "unevaluated", start: 34, end: 39 }, 51 - start: 19, 52 - end: 39, 53 - expression_start: 26 54 - } 55 - ) 56 - } 57 - return undefined; 58 - }
+31 -3
language-server/src/tests/hover.rs
··· 1 - use lsp_types::{Hover, HoverParams, Position, Range}; 1 + use lsp_types::{Hover, HoverContents, HoverParams, MarkedString, Position, Range}; 2 2 3 3 use super::*; 4 4 ··· 49 49 buffer 50 50 } 51 51 52 + fn pretty_hover_contents(contents: HoverContents) -> String { 53 + let (kind, content) = match contents { 54 + HoverContents::Scalar(marked_string) => ("markdown", pretty_marked_string(marked_string)), 55 + HoverContents::Array(marked_strings) => ( 56 + "markdown array", 57 + marked_strings 58 + .into_iter() 59 + .map(pretty_marked_string) 60 + .join("\n\n"), 61 + ), 62 + HoverContents::Markup(lsp_types::MarkupContent { kind, value }) => match kind { 63 + lsp_types::MarkupKind::PlainText => ("plaintext", value), 64 + lsp_types::MarkupKind::Markdown => ("markdown", value), 65 + }, 66 + }; 67 + format!("----- Hover content ({kind}) -----\n{content}") 68 + } 69 + 70 + fn pretty_marked_string(marked_string: MarkedString) -> String { 71 + match marked_string { 72 + MarkedString::String(string) => string, 73 + MarkedString::LanguageString(lsp_types::LanguageString { language, value }) => { 74 + format!("```{language}\n{value}\n```") 75 + } 76 + } 77 + } 78 + 52 79 #[macro_export] 53 80 macro_rules! assert_hover { 54 81 ($code:literal, $position:expr $(,)?) => { ··· 62 89 let result = hover($project, position).expect("no hover produced"); 63 90 let pretty_hover = show_hover(src, result.range.expect("hover with no range"), position); 64 91 let output = format!( 65 - "{}\n\n----- Hover content -----\n{:#?}", 66 - pretty_hover, result.contents 92 + "{}\n\n{}", 93 + pretty_hover, 94 + pretty_hover_contents(result.contents) 67 95 ); 68 96 insta::assert_snapshot!(insta::internals::AutoName, output, src); 69 97 };
+6 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__documentation_for_shared_record_field_when_variant_is_known.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub type Wibble {\n Wibble(\n /// This is some documentation about the wibble field.\n wibble: Int\n )\n Wobble(\n /// This won't show up because it's a Wibble variant\n wibble: Int\n )\n}\n\npub fn wibble(w: Wibble) {\n let assert Wibble(..) = w\n w.wibble\n}\n" 4 4 --- 5 5 pub type Wibble { ··· 20 20 } 21 21 22 22 23 - ----- Hover content ----- 24 - Scalar( 25 - String( 26 - "```gleam\nInt\n```\n This is some documentation about the wibble field.\n", 27 - ), 28 - ) 23 + ----- Hover content (markdown) ----- 24 + ```gleam 25 + Int 26 + ``` 27 + This is some documentation about the wibble field.
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_assignment_annotation.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn wibble() {\n let wobble: Int = 7\n wobble\n}\n" 4 4 --- 5 5 fn wibble() { ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\ngleam.Int\n```\n", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + gleam.Int 15 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble\nconst value = wobble.Wobble\n" 4 4 --- 5 5 import wibble/wobble ··· 7 7 ▔▔▔▔▔▔↑▔▔▔▔ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\nwobble.Wibble\n```\n", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + wobble.Wibble 13 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_aliased.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble\ntype Local = wobble.Wibble\nconst value = wobble.Wobble\n" 4 4 --- 5 5 import wibble/wobble ··· 8 8 ▔▔▔▔▔▔↑▔▔▔▔ 9 9 10 10 11 - ----- Hover content ----- 12 - Scalar( 13 - String( 14 - "```gleam\nLocal\n```\n", 15 - ), 16 - ) 11 + ----- Hover content (markdown) ----- 12 + ```gleam 13 + Local 14 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_aliased_module.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble as wubble\nconst value = wubble.Wobble\n" 4 4 --- 5 5 import wibble/wobble as wubble ··· 7 7 ▔▔▔▔▔▔↑▔▔▔▔ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\nwubble.Wibble\n```\n", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + wubble.Wibble 13 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_annotation.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble\n\nfn make_wibble() -> wobble.Wibble { wobble.Wibble }\n" 4 4 --- 5 5 import wibble/wobble ··· 8 8 ▔▔▔▔▔▔▔▔↑▔▔▔▔ 9 9 10 10 11 - ----- Hover content ----- 12 - Scalar( 13 - String( 14 - "```gleam\nwobble.Wibble\n```\n", 15 - ), 16 - ) 11 + ----- Hover content (markdown) ----- 12 + ```gleam 13 + wobble.Wibble 14 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_annotation_aliased.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble\n\ntype Wubble = wobble.Wibble\n\nfn main(wibble: Wubble) {\n wibble\n}\n" 4 4 --- 5 5 import wibble/wobble ··· 12 12 } 13 13 14 14 15 - ----- Hover content ----- 16 - Scalar( 17 - String( 18 - "```gleam\nwobble.Wibble\n```\n", 19 - ), 20 - ) 15 + ----- Hover content (markdown) ----- 16 + ```gleam 17 + wobble.Wibble 18 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_annotation_aliased_module.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble as wubble\n\nfn main(wibble: wubble.Wibble) {\n wibble\n}\n" 4 4 --- 5 5 import wibble/wobble as wubble ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nwubble.Wibble\n```\n", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + wubble.Wibble 16 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_annotation_prelude.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn add_one(a: Int) -> Int {\n a + 1\n}\n" 4 4 --- 5 5 fn add_one(a: Int) -> Int { ··· 8 8 } 9 9 10 10 11 - ----- Hover content ----- 12 - Scalar( 13 - String( 14 - "```gleam\ngleam.Int\n```\n", 15 - ), 16 - ) 11 + ----- Hover content (markdown) ----- 12 + ```gleam 13 + gleam.Int 14 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_annotation_unqualified.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble.{type Wibble}\n\nfn main(wibble: Wibble) {\n wibble\n}\n" 4 4 --- 5 5 import wibble/wobble.{type Wibble} ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nwobble.Wibble\n```\n", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + wobble.Wibble 16 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_annotation_unqualified_aliased.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble.{type Wibble as Wubble}\n\nfn main(wibble: Wubble) {\n wibble\n}\n" 4 4 --- 5 5 import wibble/wobble.{type Wibble as Wubble} ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nwobble.Wibble\n```\n", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + wobble.Wibble 16 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_arg.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble\n\nfn do_things(wibble: wobble.Wibble) { wibble }\n" 4 4 --- 5 5 import wibble/wobble ··· 8 8 ↑▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ 9 9 10 10 11 - ----- Hover content ----- 12 - Scalar( 13 - String( 14 - "```gleam\nwobble.Wibble\n```", 15 - ), 16 - ) 11 + ----- Hover content (markdown) ----- 12 + ```gleam 13 + wobble.Wibble 14 + ```
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_expression.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble\n\npub fn main() {\n let wibble = wobble.Wibble\n}\n" 4 4 --- 5 5 import wibble/wobble ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nwobble.Wibble\n```\n\nView on [HexDocs](https://hexdocs.pm/hex/wibble/wobble.html#Wibble)", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + wobble.Wibble 16 + ``` 17 + 18 + View on [HexDocs](https://hexdocs.pm/hex/wibble/wobble.html#Wibble)
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_function.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble\ntype MyInt = Int\nfn func(value: wobble.Wibble) -> MyInt { 1 }\n" 4 4 --- 5 5 import wibble/wobble ··· 8 8 ▔▔▔↑▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ 9 9 10 10 11 - ----- Hover content ----- 12 - Scalar( 13 - String( 14 - "```gleam\nfn(wobble.Wibble) -> MyInt\n```\n", 15 - ), 16 - ) 11 + ----- Hover content (markdown) ----- 12 + ```gleam 13 + fn(wobble.Wibble) -> MyInt 14 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_pattern.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble.{Wibble, Wobble, Wubble}\n\npub fn cycle(wibble: wobble.Wibble) {\n case wibble {\n Wibble -> Wobble\n Wobble -> Wubble\n Wubble -> Wibble\n }\n}\n" 4 4 --- 5 5 import wibble/wobble.{Wibble, Wobble, Wubble} ··· 14 14 } 15 15 16 16 17 - ----- Hover content ----- 18 - Scalar( 19 - String( 20 - "```gleam\nwobble.Wibble\n```\n", 21 - ), 22 - ) 17 + ----- Hover content (markdown) ----- 18 + ```gleam 19 + wobble.Wibble 20 + ```
+4 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_pattern_spread.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble.{type Wibble as Wobble}\n\ntype Thing {\n Thing(id: Int, value: Wobble)\n}\n\npub fn main(thing: Thing) {\n case thing {\n Thing(id: 0, ..) -> 12\n _ -> 14\n }\n}\n" 4 4 --- 5 5 import wibble/wobble.{type Wibble as Wobble} ··· 17 17 } 18 18 19 19 20 - ----- Hover content ----- 21 - Scalar( 22 - String( 23 - "Unused labelled fields:\n- `value: Wobble`", 24 - ), 25 - ) 20 + ----- Hover content (markdown) ----- 21 + Unused labelled fields: 22 + - `value: Wobble`
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_unqualified.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble.{type Wibble}\nconst value = wobble.Wobble\n" 4 4 --- 5 5 import wibble/wobble.{type Wibble} ··· 7 7 ▔▔▔▔▔▔↑▔▔▔▔ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\nWibble\n```\n", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + Wibble 13 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_unqualified_aliased.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble.{type Wibble as Wobble}\nconst value = wobble.Wobble\n" 4 4 --- 5 5 import wibble/wobble.{type Wibble as Wobble} ··· 7 7 ▔▔▔▔▔▔↑▔▔▔▔ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\nWobble\n```\n", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + Wobble 13 + ```
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_contextual_type_unqualified_import.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble.{type Wibble as Wobble, Wobble}\n" 4 4 --- 5 5 import wibble/wobble.{type Wibble as Wobble, Wobble} 6 6 ↑▔▔▔▔▔ 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\nWobble\n```\n\nView on [HexDocs](https://hexdocs.pm/hex/wibble/wobble.html#Wobble)", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + Wobble 12 + ``` 13 + 14 + View on [HexDocs](https://hexdocs.pm/hex/wibble/wobble.html#Wobble)
+6 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_expressions_in_function_body.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn append(x, y) {\n x <> y\n}\n" 4 4 --- 5 5 fn append(x, y) { ··· 8 8 } 9 9 10 10 11 - ----- Hover content ----- 12 - Scalar( 13 - String( 14 - "```gleam\nString\n```\nA locally defined variable.", 15 - ), 16 - ) 11 + ----- Hover content (markdown) ----- 12 + ```gleam 13 + String 14 + ``` 15 + A locally defined variable.
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_external_function_with_another_value_same_name.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport a/example_module.{my_const as discarded}\nimport b/example_module.{my_const} as _\nfn main() {\n my_const\n}\n" 4 4 --- 5 5 import a/example_module.{my_const as discarded} ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nInt\n```\n\nView on [HexDocs](https://hexdocs.pm/hex/b/example_module.html#my_const)", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + Int 16 + ``` 17 + 18 + View on [HexDocs](https://hexdocs.pm/hex/b/example_module.html#my_const)
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_external_imported_constants.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport example_module\nfn main() {\n example_module.my_const\n}\n" 4 4 --- 5 5 import example_module ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nInt\n```\n\nView on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_const)", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + Int 15 + ``` 16 + 17 + View on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_const)
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_external_imported_ffi_renamed_function.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport example_module\nfn main() {\n example_module.my_fn\n}\n" 4 4 --- 5 5 import example_module ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nfn() -> Nil\n```\n\nView on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_fn)", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + fn() -> Nil 15 + ``` 16 + 17 + View on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_fn)
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_external_imported_function.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport example_module\nfn main() {\n example_module.my_fn\n}\n" 4 4 --- 5 5 import example_module ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nfn() -> Nil\n```\n\nView on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_fn)", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + fn() -> Nil 15 + ``` 16 + 17 + View on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_fn)
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_external_imported_function_nested_module.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport my/nested/example_module\nfn main() {\n example_module.my_fn\n}\n" 4 4 --- 5 5 import my/nested/example_module ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nfn() -> Nil\n```\n\nView on [HexDocs](https://hexdocs.pm/hex/my/nested/example_module.html#my_fn)", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + fn() -> Nil 15 + ``` 16 + 17 + View on [HexDocs](https://hexdocs.pm/hex/my/nested/example_module.html#my_fn)
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_external_imported_function_renamed_module.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport example_module as renamed_module\nfn main() {\n renamed_module.my_fn\n}\n" 4 4 --- 5 5 import example_module as renamed_module ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nfn() -> Nil\n```\n\nView on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_fn)", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + fn() -> Nil 15 + ``` 16 + 17 + View on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_fn)
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_external_imported_unqualified_constants.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport example_module.{my_const}\nfn main() {\n my_const\n}\n" 4 4 --- 5 5 import example_module.{my_const} ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nInt\n```\n\nView on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_const)", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + Int 15 + ``` 16 + 17 + View on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_const)
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_external_imported_unqualified_function.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport example_module.{my_fn}\nfn main() {\n my_fn\n}\n" 4 4 --- 5 5 import example_module.{my_fn} ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nfn() -> Nil\n```\n\nView on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_fn)", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + fn() -> Nil 15 + ``` 16 + 17 + View on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_fn)
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_external_unqualified_imported_function_renamed_module.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport example_module.{my_fn} as renamed_module\nfn main() {\n my_fn\n}\n" 4 4 --- 5 5 import example_module.{my_fn} as renamed_module ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nfn() -> Nil\n```\n\nView on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_fn)", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + fn() -> Nil 15 + ``` 16 + 17 + View on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_fn)
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_external_value_with_two_modules_same_name.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport a/example_module as _\nimport b/example_module\nfn main() {\n example_module.my_const\n}\n" 4 4 --- 5 5 import a/example_module as _ ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nInt\n```\n\nView on [HexDocs](https://hexdocs.pm/hex/b/example_module.html#my_const)", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + Int 16 + ``` 17 + 18 + View on [HexDocs](https://hexdocs.pm/hex/b/example_module.html#my_const)
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_annotation_in_use.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub fn main() {\n use something: Int <- todo\n todo\n}\n" 4 4 --- 5 5 pub fn main() { ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\ngleam.Int\n```\n", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + gleam.Int 15 + ```
+6 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_anonymous_function_annotation.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\n/// An example type.\npub type Wibble\n\npub fn main() {\n fn(w: Wibble) { todo }\n}\n" 4 4 --- 5 5 /// An example type. ··· 11 11 } 12 12 13 13 14 - ----- Hover content ----- 15 - Scalar( 16 - String( 17 - "```gleam\napp.Wibble\n```\n An example type.\n", 18 - ), 19 - ) 14 + ----- Hover content (markdown) ----- 15 + ```gleam 16 + app.Wibble 17 + ``` 18 + An example type.
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_bit_array.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst bits = <<1:2, 3:4>>\n" 4 4 --- 5 5 const bits = <<1:2, 3:4>> 6 6 ▔↑ 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\nInt\n```", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + Int 12 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_bit_array_segment.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst bits = <<1:2, 3:4>>\n" 4 4 --- 5 5 const bits = <<1:2, 3:4>> 6 6 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\nInt\n```", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + Int 12 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_bit_array_segment_option.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst bits = <<1:size(2), 3:4>>\n" 4 4 --- 5 5 const bits = <<1:size(2), 3:4>> 6 6 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\nInt\n```", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + Int 12 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_float.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst pi = 3.14\n" 4 4 --- 5 5 const pi = 3.14 6 6 ↑▔▔▔ 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\nFloat\n```", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + Float 12 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_int.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst ten = 10\n" 4 4 --- 5 5 const ten = 10 6 6 ↑▔ 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\nInt\n```", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + Int 12 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_list.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst numbers = [2, 4, 6, 8]\n" 4 4 --- 5 5 const numbers = [2, 4, 6, 8] 6 6 ↑▔▔▔▔▔▔▔▔▔▔▔ 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\nList(Int)\n```", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + List(Int) 12 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_list_element.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst numbers = [2, 4, 6, 8]\n" 4 4 --- 5 5 const numbers = [2, 4, 6, 8] 6 6 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\nInt\n```", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + Int 12 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_other_constant.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst constant1 = 10\nconst constant2 = constant1\n" 4 4 --- 5 5 const constant1 = 10 ··· 7 7 ▔▔▔↑▔▔▔▔▔ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\nInt\n```", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + Int 13 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_record.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\ntype Wibble {\n Wibble(Int)\n}\n\nconst w = Wibble(10)\n" 4 4 --- 5 5 type Wibble { ··· 10 10 ▔↑▔▔▔▔▔▔▔▔ 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nWibble\n```", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + Wibble 16 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_string.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst message = \"Hello!\"\n" 4 4 --- 5 5 const message = "Hello!" 6 6 ▔▔▔▔▔▔↑▔ 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\nString\n```", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + String 12 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_string_concatenation.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst name = \"Bob\"\nconst message = \"Hello \" <> name\n" 4 4 --- 5 5 const name = "Bob" ··· 7 7 ▔▔▔▔▔▔▔▔▔↑▔▔▔▔▔▔ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\nString\n```", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + String 13 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_string_concatenation_side.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst name = \"Bob\"\nconst message = \"Hello \" <> name\n" 4 4 --- 5 5 const name = "Bob" ··· 7 7 ↑▔▔▔ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\nString\n```", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + String 13 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_tuple.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst tuple = #(1, 3.5, False)\n" 4 4 --- 5 5 const tuple = #(1, 3.5, False) 6 6 ↑▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\n#(Int, Float, Bool)\n```", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + #(Int, Float, Bool) 12 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_constant_tuple_element.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst tuple = #(1, 3.5, False)\n" 4 4 --- 5 5 const tuple = #(1, 3.5, False) 6 6 ↑▔▔▔▔ 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\nBool\n```", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + Bool 12 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_label_in_expression.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn add(wibble a, wobble b) {\n a + b\n}\n\npub fn main() {\n add(wibble: 1, wobble: 2)\n}\n" 4 4 --- 5 5 fn add(wibble a, wobble b) { ··· 12 12 } 13 13 14 14 15 - ----- Hover content ----- 16 - Scalar( 17 - String( 18 - "```gleam\nInt\n```", 19 - ), 20 - ) 15 + ----- Hover content (markdown) ----- 16 + ```gleam 17 + Int 18 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_label_in_pattern.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\ntype Wibble {\n Wibble(wibble: Int, wobble: Int)\n}\n\npub fn main() {\n let Wibble(wibble: _, wobble: _) = todo\n todo\n}\n" 4 4 --- 5 5 type Wibble { ··· 13 13 } 14 14 15 15 16 - ----- Hover content ----- 17 - Scalar( 18 - String( 19 - "```gleam\nInt\n```", 20 - ), 21 - ) 16 + ----- Hover content (markdown) ----- 17 + ```gleam 18 + Int 19 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_nested_constant.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\ntype Wibble {\n Wibble\n Wobble(BitArray)\n}\n\nconst value = #(1, 2, [Wibble, Wobble(<<1, 2, 3>>), Wibble])\n" 4 4 --- 5 5 type Wibble { ··· 11 11 12 12 13 13 14 - ----- Hover content ----- 15 - Scalar( 16 - String( 17 - "```gleam\nInt\n```", 18 - ), 19 - ) 14 + ----- Hover content (markdown) ----- 15 + ```gleam 16 + Int 17 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_pattern_in_use.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\ntype Wibble {\n Wibble(Int, Float)\n}\n\npub fn main() {\n use Wibble(int, float) <- todo\n todo\n}\n" 4 4 --- 5 5 type Wibble { ··· 13 13 } 14 14 15 15 16 - ----- Hover content ----- 17 - Scalar( 18 - String( 19 - "```gleam\nInt\n```\n", 20 - ), 21 - ) 16 + ----- Hover content (markdown) ----- 17 + ```gleam 18 + Int 19 + ```
+9 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_pattern_spread_ignoring_all_fields.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub type Model {\n Model(\n Int,\n Float,\n label1: Int,\n label2: String,\n )\n}\n\npub fn main() {\n case todo {\n Model(..) -> todo\n }\n}\n" 4 4 --- 5 5 pub type Model { ··· 19 19 } 20 20 21 21 22 - ----- Hover content ----- 23 - Scalar( 24 - String( 25 - "Unused positional fields:\n- `Int`\n- `Float`\n\nUnused labelled fields:\n- `label1: Int`\n- `label2: String`", 26 - ), 27 - ) 22 + ----- Hover content (markdown) ----- 23 + Unused positional fields: 24 + - `Int` 25 + - `Float` 26 + 27 + Unused labelled fields: 28 + - `label1: Int` 29 + - `label2: String`
+4 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_pattern_spread_ignoring_all_positional_fields.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub type Model {\n Model(\n Int,\n Float,\n label1: Int,\n label2: String,\n )\n}\n\npub fn main() {\n case todo {\n Model(_, _, _, ..) -> todo\n }\n}\n" 4 4 --- 5 5 pub type Model { ··· 19 19 } 20 20 21 21 22 - ----- Hover content ----- 23 - Scalar( 24 - String( 25 - "Unused labelled fields:\n- `label2: String`", 26 - ), 27 - ) 22 + ----- Hover content (markdown) ----- 23 + Unused labelled fields: 24 + - `label2: String`
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_pattern_spread_ignoring_some_fields.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub type Model {\n Model(\n Int,\n Float,\n label1: Int,\n label2: String,\n )\n}\n\npub fn main() {\n case todo {\n Model(_, label1: _, ..) -> todo\n }\n}\n" 4 4 --- 5 5 pub type Model { ··· 19 19 } 20 20 21 21 22 - ----- Hover content ----- 23 - Scalar( 24 - String( 25 - "Unused positional fields:\n- `Float`\n\nUnused labelled fields:\n- `label2: String`", 26 - ), 27 - ) 22 + ----- Hover content (markdown) ----- 23 + Unused positional fields: 24 + - `Float` 25 + 26 + Unused labelled fields: 27 + - `label2: String`
+4 -6
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_string_prefix_pattern.snap
··· 11 11 } 12 12 13 13 14 - ----- Hover content ----- 15 - Scalar( 16 - String( 17 - "```gleam\nString\n```\n", 18 - ), 19 - ) 14 + ----- Hover content (markdown) ----- 15 + ```gleam 16 + String 17 + ```
+4 -6
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_string_prefix_pattern_prefix_alias.snap
··· 11 11 } 12 12 13 13 14 - ----- Hover content ----- 15 - Scalar( 16 - String( 17 - "```gleam\nString\n```", 18 - ), 19 - ) 14 + ----- Hover content (markdown) ----- 15 + ```gleam 16 + String 17 + ```
+4 -6
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_string_prefix_pattern_prefix_alias_alternative_definition.snap
··· 11 11 } 12 12 13 13 14 - ----- Hover content ----- 15 - Scalar( 16 - String( 17 - "```gleam\nString\n```", 18 - ), 19 - ) 14 + ----- Hover content (markdown) ----- 15 + ```gleam 16 + String 17 + ```
+4 -6
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_string_prefix_pattern_suffix_variable.snap
··· 11 11 } 12 12 13 13 14 - ----- Hover content ----- 15 - Scalar( 16 - String( 17 - "```gleam\nString\n```", 18 - ), 19 - ) 14 + ----- Hover content (markdown) ----- 15 + ```gleam 16 + String 17 + ```
+4 -6
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_string_prefix_pattern_suffix_variable_alternative_definition.snap
··· 11 11 } 12 12 13 13 14 - ----- Hover content ----- 15 - Scalar( 16 - String( 17 - "```gleam\nString\n```", 18 - ), 19 - ) 14 + ----- Hover content (markdown) ----- 15 + ```gleam 16 + String 17 + ```
+4 -6
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_for_string_prefix_pattern_suffix_variable_discard.snap
··· 11 11 } 12 12 13 13 14 - ----- Hover content ----- 15 - Scalar( 16 - String( 17 - "```gleam\nString\n```\n", 18 - ), 19 - ) 14 + ----- Hover content (markdown) ----- 15 + ```gleam 16 + String 17 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_function_arg_annotation_2.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\n/// Exciting documentation\n/// Maybe even multiple lines\nfn append(x: String, y: String) -> String {\n x <> y\n}\n" 4 4 --- 5 5 /// Exciting documentation ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\ngleam.String\n```\n", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + gleam.String 16 + ```
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_function_arg_annotation_with_documentation.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\n/// Exciting documentation\n/// Maybe even multiple lines\ntype Wibble {\n Wibble(arg: String)\n}\n\nfn identity(x: Wibble) -> Wibble {\n x\n}\n" 4 4 --- 5 5 /// Exciting documentation ··· 14 14 } 15 15 16 16 17 - ----- Hover content ----- 18 - Scalar( 19 - String( 20 - "```gleam\napp.Wibble\n```\n Exciting documentation\n Maybe even multiple lines\n", 21 - ), 22 - ) 17 + ----- Hover content (markdown) ----- 18 + ```gleam 19 + app.Wibble 20 + ``` 21 + Exciting documentation 22 + Maybe even multiple lines
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_function_argument.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\n/// Exciting documentation\n/// Maybe even multiple lines\nfn append(x, y) {\n x <> y\n}\n" 4 4 --- 5 5 /// Exciting documentation ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nString\n```", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + String 16 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_function_definition.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn add_2(x) {\n x + 2\n}\n" 4 4 --- 5 5 fn add_2(x) { ··· 8 8 } 9 9 10 10 11 - ----- Hover content ----- 12 - Scalar( 13 - String( 14 - "```gleam\nfn(Int) -> Int\n```\n", 15 - ), 16 - ) 11 + ----- Hover content (markdown) ----- 12 + ```gleam 13 + fn(Int) -> Int 14 + ```
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_function_definition_with_docs.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\n/// Exciting documentation\n/// Maybe even multiple lines\nfn append(x, y) {\n x <> y\n}\n" 4 4 --- 5 5 /// Exciting documentation ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nfn(String, String) -> String\n```\n Exciting documentation\n Maybe even multiple lines", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + fn(String, String) -> String 16 + ``` 17 + Exciting documentation 18 + Maybe even multiple lines
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_function_return_annotation.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\n/// Exciting documentation\n/// Maybe even multiple lines\nfn append(x: String, y: String) -> String {\n x <> y\n}\n" 4 4 --- 5 5 /// Exciting documentation ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\ngleam.String\n```\n", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + gleam.String 16 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_function_return_annotation_with_tuple.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\n/// Exciting documentation\n/// Maybe even multiple lines\nfn append(x: String, y: String) -> #(String, String) {\n #(x, y)\n}\n" 4 4 --- 5 5 /// Exciting documentation ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\ngleam.String\n```\n", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + gleam.String 16 + ```
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_import_unqualified_type.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport example_module.{type MyType, MyType}\nfn main() -> MyType {\n MyType\n}\n" 4 4 --- 5 5 import example_module.{type MyType, MyType} ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nexample_module.MyType\n```\n Exciting documentation\n Maybe even multiple lines\n", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + example_module.MyType 15 + ``` 16 + Exciting documentation 17 + Maybe even multiple lines
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_import_unqualified_value.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport example_module.{my_num}\nfn main() {\n my_num\n}\n" 4 4 --- 5 5 import example_module.{my_num} ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nInt\n```\n Exciting documentation\n Maybe even multiple lines\n", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + Int 15 + ``` 16 + Exciting documentation 17 + Maybe even multiple lines
+9 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_import_unqualified_value_from_hex.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport example_module.{my_num}\nfn main() {\n my_num\n}\n" 4 4 --- 5 5 import example_module.{my_num} ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nInt\n```\n Exciting documentation\n Maybe even multiple lines\n\nView on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_num)", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + Int 15 + ``` 16 + Exciting documentation 17 + Maybe even multiple lines 18 + 19 + View on [HexDocs](https://hexdocs.pm/hex/example_module.html#my_num)
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_imported_function.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport example_module\nfn main() {\n example_module.my_fn\n}\n" 4 4 --- 5 5 import example_module ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nfn() -> Nil\n```\n", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + fn() -> Nil 15 + ```
+6 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_label_shorthand_in_call_arg.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn wibble(arg1 arg1: Int, arg2 arg2: Bool) { Nil }\n\nfn main() {\n let arg1 = 1\n let arg2 = True\n wibble(arg2:, arg1:)\n}\n" 4 4 --- 5 5 fn wibble(arg1 arg1: Int, arg2 arg2: Bool) { Nil } ··· 12 12 } 13 13 14 14 15 - ----- Hover content ----- 16 - Scalar( 17 - String( 18 - "```gleam\nBool\n```\nA locally defined variable.", 19 - ), 20 - ) 15 + ----- Hover content (markdown) ----- 16 + ```gleam 17 + Bool 18 + ``` 19 + A locally defined variable.
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_label_shorthand_in_pattern_call_arg.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub type Wibble { Wibble(arg1: Int, arg2: Bool) }\n\npub fn main() {\n case todo {\n Wibble(arg2:, ..) -> todo\n }\n}\n" 4 4 --- 5 5 pub type Wibble { Wibble(arg1: Int, arg2: Bool) } ··· 12 12 } 13 13 14 14 15 - ----- Hover content ----- 16 - Scalar( 17 - String( 18 - "```gleam\nBool\n```\n", 19 - ), 20 - ) 15 + ----- Hover content (markdown) ----- 16 + ```gleam 17 + Bool 18 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_label_shorthand_in_pattern_call_arg_2.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub type Wibble { Wibble(arg1: Int, arg2: Bool) }\n\npub fn main() {\n let Wibble(arg2:, ..) = todo\n}\n" 4 4 --- 5 5 pub type Wibble { Wibble(arg1: Int, arg2: Bool) } ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nBool\n```\n", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + Bool 16 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_local_function.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn my_fn() {\n Nil\n}\n\nfn main() {\n my_fn\n}\n" 4 4 --- 5 5 fn my_fn() { ··· 12 12 } 13 13 14 14 15 - ----- Hover content ----- 16 - Scalar( 17 - String( 18 - "```gleam\nfn() -> Nil\n```\n", 19 - ), 20 - ) 15 + ----- Hover content (markdown) ----- 16 + ```gleam 17 + fn() -> Nil 18 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_local_function_in_pipe.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn add1(num: Int) -> Int {\n num + 1\n}\n\npub fn main() {\n add1(1)\n\n 1\n |> add1\n |> add1\n |> add1\n}\n" 4 4 --- 5 5 fn add1(num: Int) -> Int { ··· 17 17 } 18 18 19 19 20 - ----- Hover content ----- 21 - Scalar( 22 - String( 23 - "```gleam\nfn(Int) -> Int\n```\n", 24 - ), 25 - ) 20 + ----- Hover content (markdown) ----- 21 + ```gleam 22 + fn(Int) -> Int 23 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_local_function_in_pipe_1.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn add1(num: Int) -> Int {\n num + 1\n}\n\npub fn main() {\n add1(1)\n\n 1\n |> add1\n |> add1\n |> add1\n}\n" 4 4 --- 5 5 fn add1(num: Int) -> Int { ··· 17 17 } 18 18 19 19 20 - ----- Hover content ----- 21 - Scalar( 22 - String( 23 - "```gleam\nfn(Int) -> Int\n```\n", 24 - ), 25 - ) 20 + ----- Hover content (markdown) ----- 21 + ```gleam 22 + fn(Int) -> Int 23 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_local_function_in_pipe_2.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn add1(num: Int) -> Int {\n num + 1\n}\n\npub fn main() {\n add1(1)\n\n 1\n |> add1\n |> add1\n |> add1\n}\n" 4 4 --- 5 5 fn add1(num: Int) -> Int { ··· 17 17 } 18 18 19 19 20 - ----- Hover content ----- 21 - Scalar( 22 - String( 23 - "```gleam\nfn(Int) -> Int\n```\n", 24 - ), 25 - ) 20 + ----- Hover content (markdown) ----- 21 + ```gleam 22 + fn(Int) -> Int 23 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_local_function_in_pipe_3.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn add1(num: Int) -> Int {\n num + 1\n}\n\npub fn main() {\n add1(1)\n\n 1\n |> add1\n |> add1\n |> add1\n}\n" 4 4 --- 5 5 fn add1(num: Int) -> Int { ··· 17 17 } 18 18 19 19 20 - ----- Hover content ----- 21 - Scalar( 22 - String( 23 - "```gleam\nfn(Int) -> Int\n```\n", 24 - ), 25 - ) 20 + ----- Hover content (markdown) ----- 21 + ```gleam 22 + fn(Int) -> Int 23 + ```
+7 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_module_constant.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\n/// Exciting documentation\n/// Maybe even multiple lines\nconst one = 1\n" 4 4 --- 5 5 /// Exciting documentation ··· 8 8 ▔▔▔▔▔▔↑▔▔ 9 9 10 10 11 - ----- Hover content ----- 12 - Scalar( 13 - String( 14 - "```gleam\nInt\n```\n Exciting documentation\n Maybe even multiple lines", 15 - ), 16 - ) 11 + ----- Hover content (markdown) ----- 12 + ```gleam 13 + Int 14 + ``` 15 + Exciting documentation 16 + Maybe even multiple lines
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_module_constant_annotation.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\n/// Exciting documentation\n/// Maybe even multiple lines\nconst one: Int = 1\n" 4 4 --- 5 5 /// Exciting documentation ··· 8 8 ▔▔↑ 9 9 10 10 11 - ----- Hover content ----- 12 - Scalar( 13 - String( 14 - "```gleam\ngleam.Int\n```\n", 15 - ), 16 - ) 11 + ----- Hover content (markdown) ----- 12 + ```gleam 13 + gleam.Int 14 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_on_pipe_with_invalid_step.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub fn main() {\n [1, 2, 3]\n |> map(wibble)\n |> filter(fn(value) { value })\n}\n\nfn map(list: List(a), fun: fn(a) -> b) -> List(b) {}\nfn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) {}\n" 4 4 --- 5 5 pub fn main() { ··· 13 13 fn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) {} 14 14 15 15 16 - ----- Hover content ----- 17 - Scalar( 18 - String( 19 - "```gleam\nList(Int)\n```\n", 20 - ), 21 - ) 16 + ----- Hover content (markdown) ----- 17 + ```gleam 18 + List(Int) 19 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_on_pipe_with_invalid_step_1.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub fn main() {\n [1, 2, 3]\n |> map(wibble)\n |> filter(fn(value) { value })\n}\n\nfn map(list: List(a), fun: fn(a) -> b) -> List(b) {}\nfn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) {}\n" 4 4 --- 5 5 pub fn main() { ··· 13 13 fn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) {} 14 14 15 15 16 - ----- Hover content ----- 17 - Scalar( 18 - String( 19 - "```gleam\nInt\n```\n", 20 - ), 21 - ) 16 + ----- Hover content (markdown) ----- 17 + ```gleam 18 + Int 19 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_on_pipe_with_invalid_step_2.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub fn main() {\n [1, 2, 3]\n |> map(wibble)\n |> filter(fn(value) { value })\n}\n\nfn map(list: List(a), fun: fn(a) -> b) -> List(b) {}\nfn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) {}\n" 4 4 --- 5 5 pub fn main() { ··· 13 13 fn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) {} 14 14 15 15 16 - ----- Hover content ----- 17 - Scalar( 18 - String( 19 - "```gleam\nfn(List(Int), fn(Int) -> Bool) -> List(Bool)\n```\n", 20 - ), 21 - ) 16 + ----- Hover content (markdown) ----- 17 + ```gleam 18 + fn(List(Int), fn(Int) -> Bool) -> List(Bool) 19 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_on_pipe_with_invalid_step_3.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub fn main() {\n [1, 2, 3]\n |> map(wibble)\n |> filter(fn(value) { value })\n}\n\nfn map(list: List(a), fun: fn(a) -> b) -> List(b) {}\nfn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) {}\n" 4 4 --- 5 5 pub fn main() { ··· 13 13 fn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) {} 14 14 15 15 16 - ----- Hover content ----- 17 - Scalar( 18 - String( 19 - "```gleam\nfn(Int) -> Bool\n```\n", 20 - ), 21 - ) 16 + ----- Hover content (markdown) ----- 17 + ```gleam 18 + fn(Int) -> Bool 19 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_on_pipe_with_invalid_step_4.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub fn main() {\n [1, 2, 3]\n |> map(wibble)\n |> filter(fn(value) { value })\n}\n\nfn map(list: List(a), fun: fn(a) -> b) -> List(b) {}\nfn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) {}\n" 4 4 --- 5 5 pub fn main() { ··· 13 13 fn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) {} 14 14 15 15 16 - ----- Hover content ----- 17 - Scalar( 18 - String( 19 - "```gleam\nfn(List(Bool), fn(Bool) -> Bool) -> List(Bool)\n```\n", 20 - ), 21 - ) 16 + ----- Hover content (markdown) ----- 17 + ```gleam 18 + fn(List(Bool), fn(Bool) -> Bool) -> List(Bool) 19 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_on_pipe_with_invalid_step_5.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub fn main() {\n [1, 2, 3]\n |> map(wibble)\n |> filter(fn(value) { value })\n}\n\nfn map(list: List(a), fun: fn(a) -> b) -> List(b) { todo }\nfn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) { todo }\n" 4 4 --- 5 5 pub fn main() { ··· 13 13 fn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) { todo } 14 14 15 15 16 - ----- Hover content ----- 17 - Scalar( 18 - String( 19 - "```gleam\nfn(Bool) -> Bool\n```\n", 20 - ), 21 - ) 16 + ----- Hover content (markdown) ----- 17 + ```gleam 18 + fn(Bool) -> Bool 19 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_on_pipe_with_invalid_step_6.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub fn main() {\n [1, 2, 3]\n |> wibble\n |> filter(fn(value) { value })\n}\n\nfn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) { todo }\n" 4 4 --- 5 5 pub fn main() { ··· 12 12 fn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) { todo } 13 13 14 14 15 - ----- Hover content ----- 16 - Scalar( 17 - String( 18 - "```gleam\nfn(List(Int)) -> List(Bool)\n```\n", 19 - ), 20 - ) 15 + ----- Hover content (markdown) ----- 16 + ```gleam 17 + fn(List(Int)) -> List(Bool) 18 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_on_pipe_with_invalid_step_8.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub fn main() {\n [1, 2, 3]\n |> wibble\n |> filter(fn(value) { value })\n}\n\nfn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) { todo }\n" 4 4 --- 5 5 pub fn main() { ··· 12 12 fn filter(list: List(a), fun: fn(a) -> Bool) -> List(a) { todo } 13 13 14 14 15 - ----- Hover content ----- 16 - Scalar( 17 - String( 18 - "```gleam\nfn(Bool) -> Bool\n```\n", 19 - ), 20 - ) 15 + ----- Hover content (markdown) ----- 16 + ```gleam 17 + fn(Bool) -> Bool 18 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_over_block_in_list_spread.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub fn main() {\n [1, 2, ..{\n let x = 1\n [x]\n }]\n}\n" 4 4 --- 5 5 pub fn main() { ··· 11 11 } 12 12 13 13 14 - ----- Hover content ----- 15 - Scalar( 16 - String( 17 - "```gleam\nInt\n```\n", 18 - ), 19 - ) 14 + ----- Hover content (markdown) ----- 15 + ```gleam 16 + Int 17 + ```
+10 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_over_imported_module.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble\n" 4 4 --- 5 5 import wibble 6 6 ▔▔▔▔▔▔▔↑▔▔▔▔▔ 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\nwibble\n```\n This is the wibble module.\n Here is some documentation about it.\n This module does stuff\n\nView on [HexDocs](https://hexdocs.pm/hex/wibble.html)", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + wibble 12 + ``` 13 + This is the wibble module. 14 + Here is some documentation about it. 15 + This module does stuff 16 + 17 + View on [HexDocs](https://hexdocs.pm/hex/wibble.html)
+10 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_over_module_name.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble\n\npub fn main() {\n wibble.wibble()\n}\n" 4 4 --- 5 5 import wibble ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nwibble\n```\n This is the wibble module.\n Here is some documentation about it.\n This module does stuff\n\nView on [HexDocs](https://hexdocs.pm/hex/wibble.html)", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + wibble 16 + ``` 17 + This is the wibble module. 18 + Here is some documentation about it. 19 + This module does stuff 20 + 21 + View on [HexDocs](https://hexdocs.pm/hex/wibble.html)
+10 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_over_module_name_in_annotation.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble\n\npub fn main(w: wibble.Wibble) {\n todo\n}\n" 4 4 --- 5 5 import wibble ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nwibble\n```\n This is the wibble module.\n Here is some documentation about it.\n This module does stuff\n\nView on [HexDocs](https://hexdocs.pm/hex/wibble.html)", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + wibble 16 + ``` 17 + This is the wibble module. 18 + Here is some documentation about it. 19 + This module does stuff 20 + 21 + View on [HexDocs](https://hexdocs.pm/hex/wibble.html)
+8 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_over_module_with_path.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport wibble/wobble\n\npub fn main() {\n wobble.wibble()\n}\n" 4 4 --- 5 5 import wibble/wobble ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nwibble/wobble\n```\n The module documentation\n\nView on [HexDocs](https://hexdocs.pm/hex/wibble/wobble.html)", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + wibble/wobble 16 + ``` 17 + The module documentation 18 + 19 + View on [HexDocs](https://hexdocs.pm/hex/wibble/wobble.html)
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_prelude_type.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nconst number = 100\n" 4 4 --- 5 5 const number = 100 6 6 ▔▔▔▔▔▔▔▔▔↑▔▔ 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\nInt\n```\n", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + Int 12 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_print_alias_when_parameters_match.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\ntype MyResult(a, b) = Result(a, b)\n\nfn do_thing() -> MyResult(Int, Int) {\n Error(1)\n}\n" 4 4 --- 5 5 type MyResult(a, b) = Result(a, b) ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nfn() -> MyResult(Int, Int)\n```\n", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + fn() -> MyResult(Int, Int) 16 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_print_aliased_imported_generic_type.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport gleam/option.{type Option as Maybe}\n\nconst none: Maybe(Int) = option.None\n" 4 4 --- 5 5 import gleam/option.{type Option as Maybe} ··· 8 8 ▔▔▔▔▔▔▔▔▔↑▔▔▔▔▔▔▔▔▔▔▔▔ 9 9 10 10 11 - ----- Hover content ----- 12 - Scalar( 13 - String( 14 - "```gleam\nMaybe(Int)\n```\n", 15 - ), 16 - ) 11 + ----- Hover content (markdown) ----- 12 + ```gleam 13 + Maybe(Int) 14 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_print_imported_alias.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport aliases.{type Aliased}\nconst thing: Aliased = 10\n" 4 4 --- 5 5 import aliases.{type Aliased} ··· 7 7 ▔▔▔▔▔▔▔▔▔▔↑▔▔▔▔▔▔▔▔▔ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\nAliased\n```\n", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + Aliased 13 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_print_qualified_prelude_type_when_shadowed_by_alias.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\ntype Result = #(Bool, String)\nconst ok = Ok(10)\n" 4 4 --- 5 5 type Result = #(Bool, String) ··· 7 7 ▔▔▔▔▔▔▔↑ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\ngleam.Result(Int, a)\n```\n", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + gleam.Result(Int, a) 13 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_print_qualified_prelude_type_when_shadowed_by_imported_alias.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport alias.{type Bool}\nconst value = True\n" 4 4 --- 5 5 import alias.{type Bool} ··· 7 7 ▔▔▔▔▔▔↑▔▔▔▔ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\ngleam.Bool\n```\n", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + gleam.Bool 13 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_print_type_variable_names.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn main(value: Result(ok, error)) {\n let v = value\n v\n}\n" 4 4 --- 5 5 fn main(value: Result(ok, error)) { ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nResult(ok, error)\n```\n", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + Result(ok, error) 15 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_print_unbound_type_variable_name_without_conflicts.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn make_ok(value: a) {\n let result = Ok(value)\n result\n}\n" 4 4 --- 5 5 fn make_ok(value: a) { ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nResult(a, b)\n```\n", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + Result(a, b) 15 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_print_unbound_type_variable_names.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn make_ok(value: some_type) {\n let result = Ok(value)\n result\n}\n" 4 4 --- 5 5 fn make_ok(value: some_type) { ··· 9 9 } 10 10 11 11 12 - ----- Hover content ----- 13 - Scalar( 14 - String( 15 - "```gleam\nResult(some_type, a)\n```\n", 16 - ), 17 - ) 12 + ----- Hover content (markdown) ----- 13 + ```gleam 14 + Result(some_type, a) 15 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_print_underlying_for_alias_with_parameters.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\ntype LocalResult = Result(String, Int)\n\nfn do_thing() -> LocalResult {\n Error(1)\n}\n" 4 4 --- 5 5 type LocalResult = Result(String, Int) ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nfn() -> Result(String, Int)\n```\n", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + fn() -> Result(String, Int) 16 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_print_underlying_for_imported_alias.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport alias.{type A}\n\nfn wibble() -> Result(Int, String) {\n todo\n}\n" 4 4 --- 5 5 import alias.{type A} ··· 10 10 } 11 11 12 12 13 - ----- Hover content ----- 14 - Scalar( 15 - String( 16 - "```gleam\nfn() -> Result(Int, String)\n```\n", 17 - ), 18 - ) 13 + ----- Hover content (markdown) ----- 14 + ```gleam 15 + fn() -> Result(Int, String) 16 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_shadowed_prelude_type.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\ntype Int { Int }\nconst number = 100\n" 4 4 --- 5 5 type Int { Int } ··· 7 7 ▔▔▔▔▔▔▔▔▔↑▔▔ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\ngleam.Int\n```\n", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + gleam.Int 13 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_shadowed_prelude_type_imported.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nimport numbers.{type Int}\nconst number = 100\n" 4 4 --- 5 5 import numbers.{type Int} ··· 7 7 ▔▔▔▔▔▔▔▔▔↑▔▔ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\ngleam.Int\n```\n", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + gleam.Int 13 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_type_alias_annotation.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: type Wibble = Int 4 4 --- 5 5 type Wibble = Int 6 6 ▔↑▔ 7 7 8 8 9 - ----- Hover content ----- 10 - Scalar( 11 - String( 12 - "```gleam\ngleam.Int\n```\n", 13 - ), 14 - ) 9 + ----- Hover content (markdown) ----- 10 + ```gleam 11 + gleam.Int 12 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_type_constructor_annotation.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\ntype Wibble {\n Wibble(arg: String)\n}\n" 4 4 --- 5 5 type Wibble { ··· 8 8 } 9 9 10 10 11 - ----- Hover content ----- 12 - Scalar( 13 - String( 14 - "```gleam\ngleam.String\n```\n", 15 - ), 16 - ) 11 + ----- Hover content (markdown) ----- 12 + ```gleam 13 + gleam.String 14 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_variable_in_use_expression.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn b(fun: fn(Int) -> String) {\n fun(42)\n}\n\nfn do_stuff() {\n let c = \"done\"\n\n use a <- b\n c\n}\n" 4 4 --- 5 5 fn b(fun: fn(Int) -> String) { ··· 15 15 } 16 16 17 17 18 - ----- Hover content ----- 19 - Scalar( 20 - String( 21 - "```gleam\nInt\n```", 22 - ), 23 - ) 18 + ----- Hover content (markdown) ----- 19 + ```gleam 20 + Int 21 + ```
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_variable_in_use_expression_1.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn b(fun: fn(Int) -> String) {\n fun(42)\n}\n\nfn do_stuff() {\n let c = \"done\"\n\n use a <- b\n c\n}\n" 4 4 --- 5 5 fn b(fun: fn(Int) -> String) { ··· 15 15 } 16 16 17 17 18 - ----- Hover content ----- 19 - Scalar( 20 - String( 21 - "```gleam\nfn(fn(Int) -> String) -> String\n```\n", 22 - ), 23 - ) 18 + ----- Hover content (markdown) ----- 19 + ```gleam 20 + fn(fn(Int) -> String) -> String 21 + ```
+6 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_variable_in_use_expression_2.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn b(fun: fn(Int) -> String) {\n fun(42)\n}\n\nfn do_stuff() {\n let c = \"done\"\n\n use a <- b\n c\n}\n" 4 4 --- 5 5 fn b(fun: fn(Int) -> String) { ··· 15 15 } 16 16 17 17 18 - ----- Hover content ----- 19 - Scalar( 20 - String( 21 - "```gleam\nString\n```\nA locally defined variable.", 22 - ), 23 - ) 18 + ----- Hover content (markdown) ----- 19 + ```gleam 20 + String 21 + ``` 22 + A locally defined variable.
+5 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__hover_works_even_for_invalid_code.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\nfn invalid() { 1 + Nil }\nfn valid() { Nil }\n" 4 4 --- 5 5 fn invalid() { 1 + Nil } ··· 7 7 ▔▔▔↑▔▔▔▔▔▔ 8 8 9 9 10 - ----- Hover content ----- 11 - Scalar( 12 - String( 13 - "```gleam\nfn() -> Nil\n```\n", 14 - ), 15 - ) 10 + ----- Hover content (markdown) ----- 11 + ```gleam 12 + fn() -> Nil 13 + ```
+12 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__no_documentation_for_shared_record_field.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub type Wibble {\n Wibble(\n /// This is some documentation about the wibble field.\n wibble: Int\n )\n Wobble(\n /// Here's some documentation explaining a field of Wobble\n wibble: Int\n )\n}\n\npub fn wibble(w: Wibble) {\n w.wibble\n}\n" 4 4 --- 5 5 pub type Wibble { ··· 19 19 } 20 20 21 21 22 - ----- Hover content ----- 23 - Scalar( 24 - String( 25 - "```gleam\nInt\n```\n## Wibble\n\n This is some documentation about the wibble field.\n\n## Wobble\n\n Here's some documentation explaining a field of Wobble\n", 26 - ), 27 - ) 22 + ----- Hover content (markdown) ----- 23 + ```gleam 24 + Int 25 + ``` 26 + ## Wibble 27 + 28 + This is some documentation about the wibble field. 29 + 30 + ## Wobble 31 + 32 + Here's some documentation explaining a field of Wobble
+6 -7
language-server/src/tests/snapshots/gleam_language_server__tests__hover__record_field_documentation.snap
··· 1 1 --- 2 - source: compiler-core/src/language_server/tests/hover.rs 2 + source: language-server/src/tests/hover.rs 3 3 expression: "\npub type Wibble {\n Wibble(\n /// This is some documentation about the wibble field.\n wibble: Int\n )\n}\n\npub fn wibble(w: Wibble) {\n w.wibble\n}\n" 4 4 --- 5 5 pub type Wibble { ··· 15 15 } 16 16 17 17 18 - ----- Hover content ----- 19 - Scalar( 20 - String( 21 - "```gleam\nInt\n```\n This is some documentation about the wibble field.\n", 22 - ), 23 - ) 18 + ----- Hover content (markdown) ----- 19 + ```gleam 20 + Int 21 + ``` 22 + This is some documentation about the wibble field.