diff --git a/doc/api.md b/doc/api.md new file mode 100644 index 0000000..2aaea35 --- /dev/null +++ b/doc/api.md @@ -0,0 +1,155 @@ +# Lua API + +astrotheme API documentation + +## astrotheme + +AstroTheme + + The default colorscheme used by AstroNvim an aesthetic and feature-rich + neovim config that is extensible and easy to use with a great set of + plugins + +This module can be loaded with `local astrotheme = require "astrotheme"` + +copyright 2023 license GNU General Public License v3.0 @class astrocore + +### config + + +```lua +AstroThemeOpts +``` + +### load + + +```lua +function astrotheme.load(theme?: string) +``` + + Load a specific theme given a palette name + +### setup + + +```lua +function astrotheme.setup(opts: AstroThemeOpts) +``` + + Set up AstroTheme with provided user configured options + + +## astrotheme.lib.config + +AstroTheme Configuration + +Default configuration of AstroTheme + +This module can be loaded with `local astrotheme_config = require "astrotheme.lib.config"` + +copyright 2023 license GNU General Public License v3.0 @class astrocore + +### default + + +```lua +AstroThemeOpts +``` + +### user_config + + +```lua +function M.user_config(opts: AstroThemeOpts) + -> AstroThemeOpts +``` + + +## astrotheme.lib.util + +AstroTheme Utilities + +Various utilities for use within AstroTheme + +This module can be loaded with `local astrotheme_utils = require "astrotheme.lib.util"` + +copyright 2023 license GNU General Public License v3.0 @class astrocore + +### get_hl_modules + + +```lua +function astrotheme.lib.util.get_hl_modules(highlights: table, path: string, modules: string[], opts: AstroThemeOpts) + -> table +``` + + Compile all highlights from a list of modules + +### get_plugin_list + + +```lua +function astrotheme.lib.util.get_plugin_list(opts: AstroThemeOpts) + -> string[] +``` + + Retrieve a list of all plugins to enable + +### live_reloading + + +```lua +function astrotheme.lib.util.live_reloading(opts: AstroThemeOpts) +``` + + Enable live reloading of AstroTheme for development + +### reload + + +```lua +function astrotheme.lib.util.reload(opts: AstroThemeOpts, theme: string) +``` + + Reload a given theme + +### reload_module + + +```lua +function astrotheme.lib.util.reload_module(module: string, bool: boolean) + -> any +``` + + Reload a module + +### set_highlights + + +```lua +function astrotheme.lib.util.set_highlights(opts: AstroThemeOpts, highlights: table, theme: string) +``` + + Set highlights in Neovim + +### set_palettes + + +```lua +function astrotheme.lib.util.set_palettes(opts: AstroThemeOpts) + -> AstroThemePalette +``` + + Set a palette given a AstroTheme options + +### set_terminal_colors + + +```lua +function astrotheme.lib.util.set_terminal_colors() +``` + + Set terminal colors based on the currently loaded colors + + diff --git a/doc/astrotheme.txt b/doc/astrotheme.txt index 78c06ea..bebb9fc 100644 --- a/doc/astrotheme.txt +++ b/doc/astrotheme.txt @@ -11,6 +11,10 @@ Table of Contents *astrotheme-table-of-contents* - Supported Plugins |astrotheme-supported-plugins| - Installation |astrotheme-installation| - Contributing |astrotheme-contributing| +1. Lua API |astrotheme-lua-api| + - astrotheme |astrotheme-lua-api-astrotheme| + - astrotheme.lib.config |astrotheme-lua-api-astrotheme.lib.config| + - astrotheme.lib.util |astrotheme-lua-api-astrotheme.lib.util| AstroThemeThe default colorscheme used by AstroNvim an aesthetic and feature-rich neovim config that is extensible and easy to use with a great set of plugins FEATURES *astrotheme-features* @@ -290,6 +294,171 @@ CONTRIBUTING *astrotheme-contributing* If you plan to contribute, please check the contribution guidelines first. + +============================================================================== +1. Lua API *astrotheme-lua-api* + +astrotheme API documentation + + +ASTROTHEME *astrotheme-lua-api-astrotheme* + +AstroTheme + +The default colorscheme used by AstroNvim an aesthetic and feature-rich neovim +config that is extensible and easy to use with a great set of plugins + +This module can be loaded with `local astrotheme = require "astrotheme"` + +copyright 2023 license GNU General Public License v3.0 @class astrocore + + +CONFIG ~ + +>lua + AstroThemeOpts +< + + +LOAD ~ + +>lua + function astrotheme.load(theme?: string) +< + +Load a specific theme given a palette name + + +SETUP ~ + +>lua + function astrotheme.setup(opts: AstroThemeOpts) +< + +Set up AstroTheme with provided user configured options + + +ASTROTHEME.LIB.CONFIG *astrotheme-lua-api-astrotheme.lib.config* + +AstroTheme Configuration + +Default configuration of AstroTheme + +This module can be loaded with `local astrotheme_config = require +"astrotheme.lib.config"` + +copyright 2023 license GNU General Public License v3.0 @class astrocore + + +DEFAULT ~ + +>lua + AstroThemeOpts +< + + +USER_CONFIG ~ + +>lua + function M.user_config(opts: AstroThemeOpts) + -> AstroThemeOpts +< + + +ASTROTHEME.LIB.UTIL *astrotheme-lua-api-astrotheme.lib.util* + +AstroTheme Utilities + +Various utilities for use within AstroTheme + +This module can be loaded with `local astrotheme_utils = require +"astrotheme.lib.util"` + +copyright 2023 license GNU General Public License v3.0 @class astrocore + + +GET_HL_MODULES ~ + +>lua + function astrotheme.lib.util.get_hl_modules(highlights: table, path: string, modules: string[], opts: AstroThemeOpts) + -> table +< + +Compile all highlights from a list of modules + + +GET_PLUGIN_LIST ~ + +>lua + function astrotheme.lib.util.get_plugin_list(opts: AstroThemeOpts) + -> string[] +< + +Retrieve a list of all plugins to enable + + +LIVE_RELOADING ~ + +>lua + function astrotheme.lib.util.live_reloading(opts: AstroThemeOpts) +< + +Enable live reloading of AstroTheme for development + + +RELOAD ~ + +>lua + function astrotheme.lib.util.reload(opts: AstroThemeOpts, theme: string) +< + +Reload a given theme + + +RELOAD_MODULE ~ + +>lua + function astrotheme.lib.util.reload_module(module: string, bool: boolean) + -> any +< + +Reload a module + + +SET_HIGHLIGHTS ~ + +>lua + function astrotheme.lib.util.set_highlights(opts: AstroThemeOpts, highlights: table, theme: string) +< + +Set highlights in Neovim + + +SET_PALETTES ~ + +>lua + function astrotheme.lib.util.set_palettes(opts: AstroThemeOpts) + -> AstroThemePalette +< + +Set a palette given a AstroTheme options + + +SET_TERMINAL_COLORS ~ + +>lua + function astrotheme.lib.util.set_terminal_colors() +< + +Set terminal colors based on the currently loaded colors + +============================================================================== +2. Links *astrotheme-links* + +1. *@class*: +2. *@class*: +3. *@class*: + Generated by panvimdoc vim:tw=78:ts=8:noet:ft=help:norl: