From f4eaf1850bb147598d1712fbb3c0cbefc968a0f6 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli <506791+stevearc@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:31:58 -0800 Subject: [PATCH] types: refactor formatting of highlight types --- lua/oil/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/oil/init.lua b/lua/oil/init.lua index 899fa384..747f9e31 100644 --- a/lua/oil/init.lua +++ b/lua/oil/init.lua @@ -7,7 +7,10 @@ local M = {} ---@field parsed_name nil|string ---@alias oil.EntryType "file"|"directory"|"socket"|"link"|"fifo" ----@alias oil.TextChunk string|string[]|{ [1]: string, [2]: { [1]: string, [2]: integer, [3]: integer }[] } +---@alias oil.HlRange { [1]: string, [2]: integer, [3]: integer } A tuple of highlight group name, col_start, col_end +---@alias oil.HlTuple { [1]: string, [2]: string } A tuple of text, highlight group +---@alias oil.HlRangeTuple { [1]: string, [2]: oil.HlRange[] } A tuple of text, internal highlights +---@alias oil.TextChunk string|oil.HlTuple|oil.HlRangeTuple ---@alias oil.CrossAdapterAction "copy"|"move" ---@class (exact) oil.Adapter