-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtypes.lua
More file actions
28 lines (21 loc) · 879 Bytes
/
types.lua
File metadata and controls
28 lines (21 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---@meta
---@class FileAttributes
---@field file_type "directory"|"file"|"symlink"
---@field is_hidden boolean
---@field is_executable boolean
---@field language string|nil
---@class RGB
---@field r integer
---@field g integer
---@field b integer
---@alias ANSI "black"|"red"|"green"|"yellow"|"blue"|"magenta"|"cyan"|"white"|"bright-black"|"bright-red"|"bright-green"|"bright-yellow"|"bright-blue"|"bright-magenta"|"bright-cyan"|"bright-white"
---@alias Color ANSI|RGB
---@alias GitStatus "added"|"modified"|"removed"|"renamed"
---@class SortingConfig
---@field method "naive"|"natural"|nil
---@field direction "asc"|"desc"|"ascending"|"descending"|nil
---@field directories "mixed"|"first"|"last"|nil
---@field ignore_case boolean|nil
---@field ignore_dot boolean|nil
---@alias SortingFn fun(left: string, right: string): -1|0|1
---@alias Sorting SortingConfig|SortingFn