init sequence rewrite #41
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
kevintl1998/yapp.nvim!41
Loading…
Reference in a new issue
No description provided.
Delete branch "init_sequence_rewrite"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +1,218 @@---@class core_config.addon_data.flag_data---@field default_value string---@field handler? fun(keypath: string, flag_key: string, flag_value: string)No references to the handler. This needs to be implemented or removed
@ -0,0 +4,4 @@---@class core_config.addon_data.entry_data---@field required boolean---@field validator? fun(keypath: string, value: any): booleanNeed to test the effects of function pointers on caching.
Edit: they can't be cached, so the method of getting data from addons needs to be reworked.
Leaving this to the addons for now. Added a register function for addons to register themselves and their versions which will be tracked for caching.
@ -111,0 +59,4 @@--- Configure settings for a keypath---@param keypath string Path to the value formatted as "key1.key2.key3"---@param opts core_config.addon_data.entry_dataM.register_keypath = function(keypath, opts)Data registration should be split out into a separate module and explicitly state that api functions cannot be called until after the output config has been loaded.
@ -111,0 +52,4 @@--- Gets the data directory for the current working directory---@return stringM.get_project_data_dir = function()Move to CoreConfig.get_project_data_dir and document that it cannot be called before this plugin is initialized.
@ -0,0 +17,4 @@---@param obj any---@return stringM.hash_fn = function(obj)local obj_serialized = table_utils.serialize(obj)See if vim.inspect can be used here instead.
@ -50,0 +25,4 @@--- Registers a handler for the given event.---@param event core_config.event.type---@param handler core_config.event.handlerM.register_event_handler = function(event, handler)Passed in event needs to be validated
@ -111,0 +52,4 @@--- Gets the data directory for the current working directory---@return stringM.get_project_data_dir = function()move to init.lua
@ -0,0 +10,4 @@---@param configs table---@param addon_data core_config.addon_data---@return tablelocal create_cache_input_data = function(configs, addon_data)Have a cache utils function for creating input data and use that to fill the input data
@ -125,3 +132,3 @@else-- If M.set_value is behaving correctly, we should not be able to reach this brancherror("Fatal error occured. key_path passed to handle_globs did not start with '*'")error("Fatal error occured. keypath "..keypath.." passed to handle_globs did not start with '*'")Error handling should be done with the custom error handler
@ -265,0 +274,4 @@--- Converts a keypath to a 1-indexed list of keys---@param keypath string---@return table 1-indexed list of keysM.as_list = function(keypath)Is this the same as keypath_to_list?
Edit: yes. keypath_to_list has been removed and references to it replaced with M.as_list
@ -0,0 +5,4 @@---@class core_config.utils.flags---@field illegal_chars string---@field is_flag_entry_format_correct fun(flag_key: string, flag_value: string): boolean---@field verify_flag fun(flag_key: string, flag_value: string, keypath: string, error_handler: core_config.error_handler, addon_data: core_config.addon_data?)remove error handler parameter and return an error message.