-
-
Notifications
You must be signed in to change notification settings - Fork 612
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(#2948): add nvim_tree.api.* node classes
- Loading branch information
1 parent
dd6b015
commit 1f1ad93
Showing
10 changed files
with
89 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
---@meta | ||
|
||
-- | ||
-- Nodes | ||
-- | ||
|
||
---@class (exact) nvim_tree.api.Node: Class | ||
---@field type "file" | "directory" | "link" uv.fs_stat.result.type | ||
---@field absolute_path string | ||
---@field executable boolean | ||
---@field fs_stat uv.fs_stat.result? | ||
---@field git_status GitNodeStatus? | ||
---@field hidden boolean | ||
---@field name string | ||
---@field parent nvim_tree.api.DirectoryNode? | ||
---@field diag_severity lsp.DiagnosticSeverity? | ||
|
||
---@class (exact) nvim_tree.api.FileNode: nvim_tree.api.Node | ||
---@field extension string | ||
|
||
---@class (exact) nvim_tree.api.DirectoryNode: nvim_tree.api.Node | ||
---@field has_children boolean | ||
---@field nodes nvim_tree.api.Node[] | ||
---@field open boolean | ||
|
||
---@class (exact) nvim_tree.api.RootNode: nvim_tree.api.DirectoryNode | ||
|
||
---@class (exact) nvim_tree.api.LinkNode: Class | ||
---@field link_to string | ||
---@field fs_stat_target uv.fs_stat.result | ||
|
||
---@class (exact) nvim_tree.api.FileLinkNode: nvim_tree.api.FileNode, nvim_tree.api.LinkNode | ||
|
||
---@class (exact) nvim_tree.api.DirectoryLinkNode: nvim_tree.api.DirectoryNode, nvim_tree.api.LinkNode | ||
|
||
-- | ||
-- Decorators | ||
-- | ||
|
||
---Highlight group range as per nvim-tree.renderer.highlight_* | ||
---@alias DecoratorHighlightRange "none" | "icon" | "name" | "all" | ||
|
||
---Icon position as per renderer.icons.*_placement | ||
---@alias DecoratorIconPlacement "none" | "before" | "after" | "signcolumn" | "right_align" | ||
|
||
---Decorator Constructor Arguments | ||
---@class (exact) DecoratorArgs | ||
---@field enabled boolean | ||
---@field highlight_range DecoratorHighlightRange | ||
---@field icon_placement DecoratorIconPlacement | ||
|
||
-- | ||
-- Types | ||
-- | ||
|
||
---A string for rendering, with optional highlight groups to apply to it | ||
---@class (exact) HighlightedString | ||
---@field str string | ||
---@field hl string[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.