Skip to content

Commit c90ac64

Browse files
committed
docs(#3241): namespace decorator types
1 parent e53ff5b commit c90ac64

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/nvim-tree-lua.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -891,9 +891,9 @@ Require and register it during |nvim-tree-setup|:
891891
Contents of `my-decorator.lua`:
892892
>lua
893893
---@class (exact) MyDecorator: nvim_tree.api.decorator.UserDecorator
894-
---@field private my_icon1 nvim_tree.api.HighlightedString
895-
---@field private my_icon2 nvim_tree.api.HighlightedString
896-
---@field private my_icon_node nvim_tree.api.HighlightedString
894+
---@field private my_icon1 nvim_tree.api.decorator.highlighted_string
895+
---@field private my_icon2 nvim_tree.api.decorator.highlighted_string
896+
---@field private my_icon_node nvim_tree.api.decorator.highlighted_string
897897
---@field private my_highlight_group string
898898
local MyDecorator = require("nvim-tree.api").decorator.UserDecorator:extend()
899899

@@ -917,7 +917,7 @@ Contents of `my-decorator.lua`:
917917

918918
---Override node icon
919919
---@param node nvim_tree.api.Node
920-
---@return nvim_tree.api.HighlightedString? icon_node
920+
---@return nvim_tree.api.decorator.highlighted_string? icon_node
921921
function MyDecorator:icon_node(node)
922922
if node.name == "example" then
923923
return self.my_icon_node
@@ -928,7 +928,7 @@ Contents of `my-decorator.lua`:
928928

929929
---Return two icons for DecoratorIconPlacement "after"
930930
---@param node nvim_tree.api.Node
931-
---@return nvim_tree.api.HighlightedString[]? icons
931+
---@return nvim_tree.api.decorator.highlighted_string[]? icons
932932
function MyDecorator:icons(node)
933933
if node.name == "example" then
934934
return { self.my_icon1, self.my_icon2, }

0 commit comments

Comments
 (0)