From b37e075aab6c3be6795d83b670f23f243419b8fb Mon Sep 17 00:00:00 2001 From: tj-moody <92702993+tj-moody@users.noreply.github.com> Date: Wed, 29 Nov 2023 07:21:19 -0500 Subject: [PATCH] fix: remove `missing required fields` diagnostic from config (#812) --- lua/bufferline/types.lua | 144 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/lua/bufferline/types.lua b/lua/bufferline/types.lua index 0dba6e76..80106408 100644 --- a/lua/bufferline/types.lua +++ b/lua/bufferline/types.lua @@ -4,15 +4,15 @@ ---@field logging boolean ---@class bufferline.GroupOptions ----@field toggle_hidden_on_enter boolean re-open hidden groups on bufenter +---@field toggle_hidden_on_enter? boolean re-open hidden groups on bufenter ---@class bufferline.GroupOpts ----@field options bufferline.GroupOptions +---@field options? bufferline.GroupOptions ---@field items bufferline.Group[] ---@class bufferline.Indicator ----@field style "underline" | "icon" | "none" ----@field icon string? +---@field style? "underline" | "icon" | "none" +---@field icon? string? ---@alias bufferline.Mode 'tabs' | 'buffers' @@ -22,70 +22,70 @@ ---@alias bufferline.IconFetcherOpts {directory: boolean, path: string, extension: string, filetype: string?} ---@class bufferline.Options ----@field public mode bufferline.Mode ----@field public style_preset bufferline.StylePreset | bufferline.StylePreset[] ----@field public view string ----@field public debug bufferline.DebugOpts ----@field public numbers string | fun(ordinal: number, id: number, lower: number_helper, raise: number_helper): string ----@field public buffer_close_icon string ----@field public modified_icon string ----@field public close_icon string ----@field public close_command string | function ----@field public custom_filter fun(buf: number, bufnums: number[]): boolean ----@field public left_mouse_command string | function ----@field public right_mouse_command string | function ----@field public middle_mouse_command (string | function)? ----@field public indicator bufferline.Indicator ----@field public left_trunc_marker string ----@field public right_trunc_marker string ----@field public separator_style string | {[1]: string, [2]: string} ----@field public name_formatter (fun(path: string):string)? ----@field public tab_size number ----@field public truncate_names boolean ----@field public max_name_length number ----@field public color_icons boolean ----@field public show_buffer_icons boolean ----@field public show_buffer_close_icons boolean ----@field public show_buffer_default_icon boolean ----@field public get_element_icon fun(opts: bufferline.IconFetcherOpts): string?, string? ----@field public show_close_icon boolean ----@field public show_tab_indicators boolean ----@field public show_duplicate_prefix boolean ----@field public enforce_regular_tabs boolean ----@field public always_show_bufferline boolean ----@field public persist_buffer_sort boolean ----@field public move_wraps_at_ends boolean ----@field public max_prefix_length number ----@field public sort_by string ----@field public diagnostics boolean | 'nvim_lsp' | 'coc' ----@field public diagnostics_indicator bufferline.DiagnosticIndicator ----@field public diagnostics_update_in_insert boolean ----@field public offsets table[] ----@field public groups bufferline.GroupOpts ----@field public themable boolean ----@field public hover bufferline.HoverOptions +---@field public mode? bufferline.Mode +---@field public style_preset? bufferline.StylePreset | bufferline.StylePreset[] +---@field public view? string +---@field public debug? bufferline.DebugOpts +---@field public numbers? string | fun(ordinal: number, id: number, lower: number_helper, raise: number_helper): string +---@field public buffer_close_icon? string +---@field public modified_icon? string +---@field public close_icon? string +---@field public close_command? string | function +---@field public custom_filter? fun(buf: number, bufnums: number[]): boolean +---@field public left_mouse_command? string | function +---@field public right_mouse_command? string | function +---@field public middle_mouse_command? (string | function)? +---@field public indicator? bufferline.Indicator +---@field public left_trunc_marker? string +---@field public right_trunc_marker? string +---@field public separator_style? string | {[1]: string, [2]: string} +---@field public name_formatter? (fun(path: string):string)? +---@field public tab_size? number +---@field public truncate_names? boolean +---@field public max_name_length? number +---@field public color_icons? boolean +---@field public show_buffer_icons? boolean +---@field public show_buffer_close_icons? boolean +---@field public show_buffer_default_icon? boolean +---@field public get_element_icon? fun(opts: bufferline.IconFetcherOpts): string?, string? +---@field public show_close_icon? boolean +---@field public show_tab_indicators? boolean +---@field public show_duplicate_prefix? boolean +---@field public enforce_regular_tabs? boolean +---@field public always_show_bufferline? boolean +---@field public persist_buffer_sort? boolean +---@field public move_wraps_at_ends? boolean +---@field public max_prefix_length? number +---@field public sort_by? string +---@field public diagnostics? boolean | 'nvim_lsp' | 'coc' +---@field public diagnostics_indicator? bufferline.DiagnosticIndicator +---@field public diagnostics_update_in_insert? boolean +---@field public offsets? table[] +---@field public groups? bufferline.GroupOpts +---@field public themable? boolean +---@field public hover? bufferline.HoverOptions ---@class bufferline.HLGroup ----@field fg string ----@field bg string ----@field sp string ----@field special string ----@field bold boolean ----@field italic boolean ----@field underline boolean ----@field undercurl boolean ----@field hl_group string ----@field hl_name string +---@field fg? string +---@field bg? string +---@field sp? string +---@field special? string +---@field bold? boolean +---@field italic? boolean +---@field underline? boolean +---@field undercurl? boolean +---@field hl_group? string +---@field hl_name? string ---@alias bufferline.Highlights table ---@class bufferline.UserConfig ----@field public options bufferline.Options ----@field public highlights bufferline.Highlights | fun(BufferlineHighlights): bufferline.Highlights +---@field public options? bufferline.Options +---@field public highlights? bufferline.Highlights | fun(BufferlineHighlights): bufferline.Highlights ---@class bufferline.Config ----@field public options bufferline.Options ----@field public highlights bufferline.Highlights +---@field public options? bufferline.Options +---@field public highlights? bufferline.Highlights ---@field user bufferline.UserConfig original copy of user preferences ---@field merge fun(self: bufferline.Config, defaults: bufferline.Config): bufferline.Config ---@field validate fun(self: bufferline.Config, defaults: bufferline.Config, resolved: bufferline.Highlights): nil @@ -96,9 +96,9 @@ --- @alias bufferline.Duplicate "path" | "element" | nil ---@class bufferline.Component ----@field name string? +---@field name? string ---@field id integer ----@field path string? +---@field path? string ---@field length integer ---@field component fun(BufferlineState): bufferline.Segment[] ---@field hidden boolean @@ -175,16 +175,16 @@ ---@alias GroupSeparators table ---@class bufferline.Group ----@field public id string used for identifying the group in the tabline ----@field public name string 'formatted name of the group' ----@field public display_name string original name including special characters ----@field public matcher fun(b: bufferline.Buffer): boolean? ----@field public separator GroupSeparators ----@field public priority number ----@field public highlight table ----@field public icon string ----@field public hidden boolean ----@field public with fun(Group, Group): bufferline.Group +---@field public id? string used for identifying the group in the tabline +---@field public name? string 'formatted name of the group' +---@field public display_name? string original name including special characters +---@field public matcher? fun(b: bufferline.Buffer): boolean? +---@field public separator? GroupSeparators +---@field public priority? number +---@field public highlight? table +---@field public icon? string +---@field public hidden? boolean +---@field public with? fun(Group, Group): bufferline.Group ---@field auto_close boolean when leaving the group automatically close it ---@class bufferline.RenderContext