Skip to content

Commit

Permalink
Hover: Show name of struct type defined at file scope (#1269)
Browse files Browse the repository at this point in the history
  • Loading branch information
FnControlOption authored and Techatrix committed Aug 26, 2023
1 parent 6638748 commit 5a9face
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/features/hover.zig
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pub fn hoverSymbol(server: *Server, decl_handle: Analyser.DeclWithHandle, markup
.primitive,
=> |p| offsets.nodeToSlice(rt.handle.tree, p),
.other => |p| switch (rt.handle.tree.nodes.items(.tag)[p]) {
.root => if (URI.parse(server.arena.allocator(), rt.handle.uri)) |path| std.fs.path.stem(path) else |_| "unknown",
.container_decl,
.container_decl_arg,
.container_decl_arg_trailing,
Expand Down

0 comments on commit 5a9face

Please sign in to comment.