### Configure lazydev.nvim for Local wez-tmux Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.wez-tmux.txt Setup lazydev.nvim to recognize local wez-tmux and wezterm-types installations. Ensure 'wezterm-types' is listed in dependencies. ```lua { 'folke/lazydev.nvim', ft = 'lua', dependencies = { 'DrKJeff16/wezterm-types' }, opts = { library = { -- Other library configs... { path = 'wezterm-types', mods = { 'wezterm' } }, { path = 'wez-tmux', mods = { 'wez-tmux' } }, }, }, } ``` -------------------------------- ### Install pre-commit Hooks Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Install the pre-commit framework to automatically run hooks on Git commits, ensuring code quality and consistency. ```bash pre-commit install ``` -------------------------------- ### Import wez-tmux from Local Installation Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.wez-tmux.txt Import the wez-tmux type annotations when the plugin is installed locally. ```lua ---@type WezTmux local wez_tmux = require("wez-tmux.plugin") ``` -------------------------------- ### Import WezPainControl from Local Installation Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/wez-pain-control.md Import the WezPainControl type annotation when the plugin is installed locally. ```lua ---@type WezPainControl local wez_pain_control = require("wez-pain-control.plugin") ``` -------------------------------- ### Import Tabsets Plugin Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/tabsets.md Import the tabsets.wezterm plugin to enable its functionality. Ensure the plugin is correctly installed. ```lua ---@type Tabsets local tabsets = wezterm.plugin.require("https://github.com/srackham/tabsets.wezterm") ``` -------------------------------- ### Import wez-pain-control from Local Installation Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.wez-pain-control.txt Import type annotations for wez-pain-control when it is installed locally. This uses the standard Lua module loading mechanism. ```lua ---@type WezPainControl local wez_pain_control = require("wez-pain-control.plugin") ``` -------------------------------- ### Import WezTerm Config Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.wezterm-config.txt Import type annotations for wezterm-config.nvim using wezterm.plugin.require. Ensure you have the plugin installed. ```lua ---@type weztermConfig local wezterm_config_nvim = wezterm.plugin.require('https://github.com/winter-again/wezterm-config.nvim') ``` -------------------------------- ### Import Smart Workspace Switcher Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/smart-workspace-switcher.md Import the type annotations for the smart_workspace_switcher.wezterm plugin. Ensure the plugin is correctly installed and accessible via wezterm.plugin.require. ```lua ---@type SWS local sws = wezterm.plugin.require("https://github.com/MLFlexer/smart_workspace_switcher.wezterm") ``` -------------------------------- ### Import Smart Splits Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.smart-splits.txt Import the SmartSplitsWezterm type annotation for the smart-splits.nvim plugin. Ensure the plugin is installed and accessible. ```lua ---@type SmartSplitsWezterm local smart_splits = wezterm.plugin.require("https://github.com/mrjones2014/smart-splits.nvim") ``` -------------------------------- ### Import wezterm-sync Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/sync.md Use this snippet to import the type annotations for the wezterm-sync plugin. Ensure the plugin is installed. ```lua ---@type Sync local sync = wezterm.plugin.require("https://github.com/dfsramos/wezterm-sync") ``` -------------------------------- ### Import wsinit.wezterm Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/wsinit.md Use this snippet to import the wsinit.wezterm plugin and its type annotations into your WezTerm configuration. Ensure the plugin is correctly installed. ```lua ---@type WsInit local wsinit = wezterm.plugin.require("https://github.com/JuanraCM/wsinit.wezterm") ``` -------------------------------- ### Install wezterm-types via LuaRocks Source: https://github.com/drkjeff16/wezterm-types/blob/main/README.md Install the wezterm-types package globally or locally using LuaRocks. This makes the type annotations available for your WezTerm configuration. ```bash luarocks install wezterm-types # Global install luarocks install --local wezterm-types # Local install ``` -------------------------------- ### Import Workspace Picker Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/workspace-picker.md Import type annotations for the workspace-picker.wezterm plugin. Ensure the plugin is correctly installed and accessible. ```lua ---@type WorkspacePicker local wsp_picker = wezterm.plugin.require("https://github.com/isseii10/workspace-picker.wezterm") ``` -------------------------------- ### Import WezTerm Sync Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.sync.txt Import the Sync type annotation for the wezterm-sync plugin. Ensure the plugin is installed and accessible. ```lua ---@type Sync local sync = wezterm.plugin.require("https://github.com/dfsramos/wezterm-sync") ``` -------------------------------- ### lazydev.nvim Integration with Custom wezterm-types Name Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types.txt Configuration for lazydev.nvim when the wezterm-types plugin is installed under a custom directory name. ```lua { 'folke/lazydev.nvim', ft = 'lua', dependencies = { { 'DrKJeff16/wezterm-types', name = '', -- CUSTOM DIRECTORY NAME }, }, opts = { library = { -- MAKE SURE TO MATCH THE PLUGIN DIRECTORY'S NAME { path = '', mods = { 'wezterm' } }, }, }, } ``` -------------------------------- ### Configure lazydev.nvim for wez-tmux Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/wez-tmux.md Add this configuration to lazydev.nvim to enable type checking and autocompletion for wez-tmux when installed locally. ```lua { 'folke/lazydev.nvim', ft = 'lua', dependencies = { 'DrKJeff16/wezterm-types' }, opts = { library = { -- Other library configs... { path = 'wezterm-types', mods = { 'wezterm' } }, { path = 'wez-tmux', mods = { 'wez-tmux' } }, }, }, } ``` -------------------------------- ### Import Smart Splits Wezterm Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/smart-splits.md Import type annotations for the smart-splits.nvim plugin. Ensure the plugin is correctly installed and accessible via wezterm.plugin.require. ```lua ---@type SmartSplitsWezterm local smart_splits = wezterm.plugin.require("https://github.com/mrjones2014/smart-splits.nvim") ``` -------------------------------- ### Import WezTerm Replay Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.replay.txt Import the Replay type annotation for the wezterm-replay plugin. Ensure the plugin is correctly installed or accessible. ```lua ---@type Replay local replay = wezterm.plugin.require("https://github.com/btrachey/wezterm-replay") ``` -------------------------------- ### Import Ribbon Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/ribbon.md Import the Ribbon API types for use in your wezterm configuration. Ensure the plugin is correctly installed or accessible. ```lua ---@type Ribbon.Api local ribbon = wezterm.plugin.require("https://github.com/sravioli/ribbon.wz") ``` -------------------------------- ### Neovim LSP Configuration for WezTerm Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/README.md Add the install path of `wezterm-types` to your `lua_ls` configuration to enable type checking for WezTerm configurations. ```lua return { cmd = { 'lua-language-server' }, filetypes = { 'lua' }, settings = { Lua = { workspace = { library = { -- Other library paths... '', }, }, }, }, } ``` -------------------------------- ### Import StackWez Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/stack.md Use this to import type annotations for the stack.wez plugin. Ensure the plugin is correctly installed or accessible. ```lua ---@type StackWez local stack_wez = wezterm.plugin.require("https://github.com/bad-noodles/stack.wez") ``` -------------------------------- ### Configure lua_ls with wezterm-types path Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types.txt Add the install path of wezterm-types to your lua_ls configuration to enable proper type checking and autocompletion. ```lua return { cmd = { 'lua-language-server' }, filetypes = { 'lua' }, settings = { Lua = { workspace = { library = { -- Other library paths... '', }, }, }, }, } ``` -------------------------------- ### Example Commit Message for Plugin Feature Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Format your commit message according to Conventional Commits standards when adding type annotations for a new plugin. ```text feat(PLUGIN-NAME): add type annotations ``` -------------------------------- ### Import Wezterm Attention Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.attention.txt Import the WeztermAttention type annotation for the wezterm-attention plugin. Ensure the plugin is installed and accessible. ```lua ---@type WeztermAttention local attention = wezterm.plugin.require("https://github.com/pro-vi/wezterm-attention") ``` -------------------------------- ### Import AI-Helper Type Annotations in Wezterm Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.ai-helper.txt Use this snippet to import the AI-Helper type annotations. Ensure you have the AI-Helper plugin installed and accessible. ```lua ---@type AIHelper local ai_helper = wezterm.plugin.require("https://github.com/Michal1993r/ai-helper.wezterm") ``` -------------------------------- ### Import BarWezterm Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.bar.txt Use this snippet to import type annotations for the bar.wezterm plugin. Ensure the plugin is correctly installed or accessible. ```lua ---@type BarWezterm local bar_wezterm = wezterm.plugin.require("https://github.com/adriankarlen/bar.wezterm") ``` -------------------------------- ### lazydev.nvim Configuration for WezTerm Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/README.md Configure lazydev.nvim to recognize WezTerm types by adding them to the library path. Ensure the path matches the directory name where wezterm-types is installed. ```lua { 'folke/lazydev.nvim', ft = 'lua', dependencies = { 'DrKJeff16/wezterm-types' }, opts = { library = { -- Other library configs... { path = 'wezterm-types', mods = { 'wezterm' } }, }, }, } ``` ```lua { 'folke/lazydev.nvim', ft = 'lua', dependencies = { { 'DrKJeff16/wezterm-types', name = '', -- CUSTOM DIRECTORY NAME }, }, opts = { library = { -- MAKE SURE TO MATCH THE PLUGIN DIRECTORY'S NAME { path = '', mods = { 'wezterm' } }, }, }, } ``` -------------------------------- ### Import Battery Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/battery.md Import the battery.wez plugin to enable type checking for its functions and variables. This requires the plugin to be installed. ```lua ---@type BatteryWez local battery = wezterm.plugin.require("https://github.com/rootiest/battery.wez") ``` -------------------------------- ### Import Sigil Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/sigil.md Use this snippet to import the Sigil type annotations for use in your WezTerm configuration. Ensure the sravioli/sigil.wz plugin is installed. ```lua ---@type Sigil local sigil = wezterm.plugin.require("https://github.com/sravioli/sigil.wz") ``` -------------------------------- ### Install wezterm-types with lazy.nvim for Neovim Source: https://github.com/drkjeff16/wezterm-types/blob/main/README.md Add wezterm-types to your Neovim configuration using the lazy.nvim package manager. This ensures the latest version is used for Neovim integration. ```lua { 'DrKJeff16/wezterm-types', version = false, -- Get the latest version } ``` -------------------------------- ### Import Kanagawa Types in wezterm Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.kanagawa.txt Use this snippet to import type annotations for the sravioli/kanagawa.wz plugin. Ensure the plugin is correctly installed and accessible. ```lua ---@type Kanagawa local kanagawa = wezterm.plugin.require("https://github.com/sravioli/kanagawa.wz") ``` -------------------------------- ### Import PassRelay Type Annotations in Lua Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.passrelay.txt Use this snippet to import the PassRelay type annotations from the specified GitHub repository. Ensure you have the passrelay.wezterm plugin correctly installed or accessible. ```lua ---@type PassRelay local pass_relay = wezterm.plugin.require("https://github.com/dfaerch/passrelay.wezterm") ``` -------------------------------- ### Handle Invalid Options Event Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.dev.txt Register a callback for the 'dev.wezterm.invalid_opts' event. This event fires when invalid options are supplied to the plugin setup for dev.wezterm. ```lua ---Invalid options provided to plugin setup. --- ---@param event "dev.wezterm.invalid_opts" This is for `dev.wezterm` only! ---@param callback function function Wezterm.on(event, callback) end ``` -------------------------------- ### Import Quick Domains Plugin Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/quick-domains.md Import the Quick Domains plugin using `wezterm.plugin.require`. This provides type annotations for the plugin. ```lua ---@type QuickDomains local quick_domains = wezterm.plugin.require("https://github.com/DavidRR-F/quick_domains.wezterm") ``` -------------------------------- ### Import Quickselect WezTerm Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.quickselect.txt Import the type annotations for the quickselect WezTerm plugin using `wezterm.plugin.require`. Ensure you have the correct plugin URL. ```lua ---@type Quick_Select local quickselect = wezterm.plugin.require("https://github.com/quantonganh/quickselect.wezterm") ``` -------------------------------- ### Import Quick Domains Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.quick-domains.txt Import the QuickDomains type annotation for use with the quick_domains.wezterm plugin. This is typically used at the beginning of a WezTerm configuration file. ```lua ---@type QuickDomains local quick_domains = wezterm.plugin.require("https://github.com/DavidRR-F/quick_domains.wezterm") ``` -------------------------------- ### Import wez-pain-control from URL Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.wez-pain-control.txt Import type annotations for wez-pain-control from its GitHub URL. Ensure you have the necessary WezTerm plugin environment set up. ```lua ---@type WezPainControl local wez_pain_control = wezterm.plugin.require("https://github.com/sei40kr/wez-pain-control") ``` -------------------------------- ### Import QuickSelect Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/quickselect.md Import the QuickSelect plugin and its type annotations for use in your WezTerm configuration. This is necessary to enable type checking and autocompletion for the plugin's functions. ```lua ---@type Quick_Select local quickselect = wezterm.plugin.require("https://github.com/quantonganh/quickselect.wezterm") ``` -------------------------------- ### Import lib.wezterm Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/lib.md Import the lib.wezterm library using wezterm.plugin.require to enable type annotations. This is useful for static analysis and improved developer experience. ```lua ---@type LibWezterm local lib = wezterm.plugin.require("https://github.com/ChrisGVE/lib.wezterm") ``` -------------------------------- ### Import Smart Workspace Switcher Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.smart-workspace-switcher.txt Import the SWS type annotation for the smart workspace switcher plugin. This allows for type checking and autocompletion. ```lua ---@type SWS local sws = wezterm.plugin.require("https://github.com/MLFlexer/smart_workspace_switcher.wezterm") ``` -------------------------------- ### Import dev.wezterm Plugin Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/dev.md Import the dev.wezterm plugin using wezterm.plugin.require. This sets up type annotations for the plugin. ```lua ---@type Dev local dev = wezterm.plugin.require("https://github.com/ChrisGVE/dev.wezterm") ``` -------------------------------- ### Generate New Plugin Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Execute a script to scaffold the necessary files and structure for adding type annotations for a new wezterm plugin. ```bash ./scripts/new-plugin.sh PLUGIN-NAME # ONLY DASHES `-` ALLOWED! ``` -------------------------------- ### Import Modal Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/modal.md Import the type annotations for the MLFlexer/modal.wezterm plugin. This is useful for static analysis and autocompletion. ```lua ---@type ModalWezterm local modal = wezterm.plugin.require("https://github.com/MLFlexer/modal.wezterm") ``` -------------------------------- ### Import ModalWezterm Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.modal.txt Import the ModalWezterm type annotations for the MLFlexer/modal.wezterm module. This is required to enable type checking and autocompletion for the modal module. ```lua ---@type ModalWezterm local modal = wezterm.plugin.require("https://github.com/MLFlexer/modal.wezterm") ``` -------------------------------- ### Import AI Commander Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/ai-commander.md Import the AI Commander plugin using `wezterm.plugin.require`. This allows for type checking and autocompletion. ```lua ---@type AICommander local ai_commander = wezterm.plugin.require("https://github.com/dimao/ai-commander.wezterm") ``` -------------------------------- ### Import StackWez Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.stack.txt Import the StackWez type annotations from the specified GitHub repository. This allows for better code completion and type checking. ```lua ---@type StackWez local stack_wez = wezterm.plugin.require("https://github.com/bad-noodles/stack.wez") ``` -------------------------------- ### Import Resurrect WezTerm Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.resurrect.txt Import the Resurrect WezTerm types for use in your configuration. This requires the wezterm.plugin.require function. ```lua ---@type Resurrect local resurrect = wezterm.plugin.require("https://github.com/MLFlexer/resurrect.wezterm") ``` -------------------------------- ### Import wezterm-quota-limit Plugin Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/quota-limit.md Import the type annotations for the wezterm-quota-limit plugin. This is the primary way to integrate the plugin's functionality into your wezterm configuration. ```lua ---@type QuotaLimit local ql = wezterm.plugin.require("https://github.com/EdenGibson/wezterm-quota-limit") ``` -------------------------------- ### Import Sessionizer Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.sessionizer.txt Import type annotations for the sessionizer.wezterm plugin. This requires the sessionizer.wezterm plugin to be available. ```lua ---@type Sessionizer local sessionizer = wezterm.plugin.require("https://github.com/mikkasendke/sessionizer.wezterm") ``` -------------------------------- ### Importing lib.wezterm Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.lib.txt Import the lib.wezterm plugin to enable type annotations. This requires the plugin to be available at the specified URL. ```lua ---@type LibWezterm local lib = wezterm.plugin.require("https://github.com/ChrisGVE/lib.wezterm") ``` -------------------------------- ### Import tabline.wez plugin types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.tabline.txt Import the tabline.wez plugin using wezterm.plugin.require to enable type checking. Ensure the TablineWez type is available for your local tabline variable. ```lua ---@type TablineWez local tabline = wezterm.plugin.require("https://github.com/michaelbrusegard/tabline.wez") ``` -------------------------------- ### Import Presentation Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/presentation.md Import the type annotations for the presentation.wez plugin. This allows for enhanced code completion and type checking within your WezTerm configuration files. ```lua ---@type PresentationWez local presentation = wezterm.plugin.require("https://github.com/xarvex/presentation.wez") ``` -------------------------------- ### Import Lantern Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/lantern.md Import the Lantern plugin using its GitHub URL. This allows WezTerm to recognize the type annotations provided by the plugin. ```lua ---@type Lantern local lantern = wezterm.plugin.require("https://github.com/sravioli/lantern.wz") ``` -------------------------------- ### Configure lazydev.nvim for wez-pain-control Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.wez-pain-control.txt Configure lazydev.nvim to recognize local wez-pain-control and wezterm-types. This is useful for development and autocompletion. ```lua { 'folke/lazydev.nvim', ft = 'lua', dependencies = { 'DrKJeff16/wezterm-types' }, opts = { library = { -- Other library configs... { path = 'wezterm-types', mods = { 'wezterm' } }, { path = 'wez-pain-control', mods = { 'wez-pain-control' } }, }, }, } ``` -------------------------------- ### Import Ribbon Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.ribbon.txt Import the Ribbon API type annotations for use in your WezTerm plugin. This requires the `wezterm.plugin.require` function. ```lua ---@type Ribbon.Api local ribbon = wezterm.plugin.require("https://github.com/sravioli/ribbon.wz") ``` -------------------------------- ### Import ToggleTerminal Plugin Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/toggle-terminal.md Import the type annotations for the zsh-sage/toggle_terminal.wez plugin. This is required to use the plugin's functionality. ```lua ---@type ToggleTerminal local toggle_terminal = wezterm.plugin.require("https://github.com/zsh-sage/toggle_terminal.wez") ``` -------------------------------- ### Import Log Plugin Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/log.md Import the Log.API type annotations for the sravioli/log.wz plugin. This allows for type checking and autocompletion within your WezTerm configuration. ```lua ---@type Log.API local log = wezterm.plugin.require("https://github.com/sravioli/log.wz") ``` -------------------------------- ### Import Presentation Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.presentation.txt Import the PresentationWez type annotation for the xarvex/presentation.wez module. This is typically done at the beginning of your WezTerm plugin script. ```lua ---@type PresentationWez local presentation = wezterm.plugin.require("https://github.com/xarvex/presentation.wez") ``` -------------------------------- ### Import Pivot Panes Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/pivot-panes.md Import the Pivot Panes plugin to enable type checking. This is useful for static analysis and autocompletion in your WezTerm configuration. ```lua ---@type Pivot local pivot = wezterm.plugin.require("https://github.com/ChrisGVE/pivot_panes.wezterm") ``` -------------------------------- ### Import wsinit.wezterm Plugin with Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.wsinit.txt Import the wsinit.wezterm plugin using wezterm.plugin.require and assign its type annotation to a local variable. This is useful for enabling Lua language server features like autocompletion and type checking. ```lua ---@type WsInit local wsinit = wezterm.plugin.require("https://github.com/JuanraCM/wsinit.wezterm") ``` -------------------------------- ### Import CmdPicker Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.cmdpicker.txt Import the CmdPicker type annotation for the wezterm-cmdpicker plugin. This allows for better type checking and autocompletion in your WezTerm configuration. ```lua ---@type CmdPicker local picker = wezterm.plugin.require("https://github.com/abidibo/wezterm-cmdpicker") ``` -------------------------------- ### Import Log Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.log.txt Import the Log.API type annotation for the sravioli/log.wz library. This requires the wezterm-types plugin to be set up. ```lua ---@type Log.API local log = wezterm.plugin.require("https://github.com/sravioli/log.wz") ``` -------------------------------- ### Import WezTerm Sessions Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/wezterm-sessions.md Import the type annotations for the wezterm-sessions plugin. This is typically the first step when using the plugin in your WezTerm configuration. ```lua ---@type WeztermSessions local sessions = wezterm.plugin.require("https://github.com/abidibo/wezterm-sessions") ``` -------------------------------- ### Import BatteryWez Type Annotation Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.battery.txt Use this snippet to import the BatteryWez type annotation for the rootest/battery.wez module. Ensure you have the wezterm plugin API available. ```lua ---@type BatteryWez local battery = wezterm.plugin.require("https://github.com/rootiest/battery.wez") ``` -------------------------------- ### Handle Require Path Not Set Event Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.dev.txt Register a callback for the 'dev.wezterm.require_path_not_set' event. This event occurs when the plugin is not found, preventing package.path from being set for dev.wezterm. ```lua ---The plugin was not found and thus `package.path` could not be set. --- ---@param event "dev.wezterm.require_path_not_set" This is for `dev.wezterm` only! ---@param callback function function Wezterm.on(event, callback) end ``` -------------------------------- ### Import QuotaLimit Type Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.quota-limit.txt Import the QuotaLimit type annotation for the wezterm-quota-limit plugin. This is useful for static analysis and autocompletion. ```lua ---@type QuotaLimit local ql = wezterm.plugin.require("https://github.com/EdenGibson/wezterm-quota-limit") ``` -------------------------------- ### Handle No Keywords Event Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.dev.txt Register a callback for the 'dev.wezterm.no_keywords' event. This event is triggered if no keywords were supplied for searching the dev.wezterm plugin. ```lua ---No keywords were provided for searching the plugin. --- ---@param event "dev.wezterm.no_keywords" This is for `dev.wezterm` only! ---@param callback function function Wezterm.on(event, callback) end ``` -------------------------------- ### Import WeztermSessions Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.wezterm-sessions.txt Import the WeztermSessions type annotation for the abidibo/wezterm-sessions plugin. This allows for better code completion and type checking. ```lua ---@type WeztermSessions local sessions = wezterm.plugin.require("https://github.com/abidibo/wezterm-sessions") ``` -------------------------------- ### Import wez-tmux from Remote URL Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.wez-tmux.txt Import the wez-tmux type annotations when using the plugin directly from its GitHub URL. ```lua ---@type WezTmux local wez_tmux = wezterm.plugin.require("https://github.com/sei40kr/wez-tmux") ``` -------------------------------- ### Import Sessionizer Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/sessionizer.md Import the sessionizer.wezterm plugin to utilize its type annotations. This is useful for static analysis and autocompletion in your WezTerm configuration. ```lua ---@type Sessionizer local sessionizer = wezterm.plugin.require("https://github.com/mikkasendke/sessionizer.wezterm") ``` -------------------------------- ### Import WorkspacePicker Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.workspace-picker.txt Import the WorkspacePicker type annotation for the workspace-picker.wezterm plugin. This allows for type checking and autocompletion. ```lua ---@type WorkspacePicker local wsp_picker = wezterm.plugin.require("https://github.com/isseii10/workspace-picker.wezterm") ``` -------------------------------- ### Import AICommander Type Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.ai-commander.txt Import the AICommander type annotation for the ai-commander wezterm plugin. This enables type checking and autocompletion. ```lua ---@type AICommander local ai_commander = wezterm.plugin.require("https://github.com/dimao/ai-commander.wezterm") ``` -------------------------------- ### Import wezterm-tabs Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.wezterm-tabs.txt Import the WeztermTabs type annotation for the wezterm-tabs plugin. This is typically used at the beginning of a WezTerm configuration file that utilizes the plugin. ```lua ---@type WeztermTabs local tabs = wezterm.plugin.require("https://github.com/yriveiro/wezterm-tabs") ``` -------------------------------- ### Import PassRelay Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/passrelay.md Import the PassRelay plugin to access its type annotations. This is useful for static analysis and autocompletion within your WezTerm configuration. ```lua ---@type PassRelay local pass_relay = wezterm.plugin.require("https://github.com/dfaerch/passrelay.wezterm") ``` -------------------------------- ### Import dev.wezterm Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.dev.txt Import type annotations for ChrisGVE/dev.wezterm using wezterm.plugin.require. This is the primary way to integrate type checking for the dev.wezterm module. ```lua ---@type Dev local dev = wezterm.plugin.require("https://github.com/ChrisGVE/dev.wezterm") ``` -------------------------------- ### Import Tabsets Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.tabsets.txt Import the type annotations for the srackham/tabsets.wezterm plugin. This is necessary to enable type checking and autocompletion for the tabsets module. ```lua ---@type Tabsets local tabsets = wezterm.plugin.require("https://github.com/srackham/tabsets.wezterm") ``` -------------------------------- ### Import Repository Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/scripts/template.md Import type annotations for a specified GitHub repository. This is useful for enabling type checking and autocompletion for WezTerm plugins. ```lua ---@type Template local template = wezterm.plugin.require("https://github.com/username/repository") ``` -------------------------------- ### Handle Plugin Not Found Event Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.dev.txt Register a callback for the 'dev.wezterm-plugin-not-found' event. This event is triggered when the dev.wezterm plugin cannot be found using the provided keywords. ```lua ---The provided keywords did not allow for the plugin to be found. --- ---@param event "dev.wezterm-plugin-not-found" This is for `dev.wezterm` only! ---@param callback function function Wezterm.on(event, callback) end ``` -------------------------------- ### WezTerm Configuration with Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/README.md Add type annotations to `wezterm` and `config` when requiring `wezterm` in your configuration file. This enables type checking and autocompletion. ```lua local wezterm = require("wezterm") ---@type Wezterm local config = wezterm.config_builder() ---@type Config config.window_decorations = "RESIZE|MACOS_FORCE_DISABLE_SHADOW" return config ``` -------------------------------- ### Import wezterm-status Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/wezterm-status.md Use this snippet to import the WeztermStatus type annotation for the wezterm-status plugin. This requires the wezterm.plugin.require function. ```lua ---@type WeztermStatus local status = wezterm.plugin.require("https://github.com/yriveiro/wezterm-status") ``` -------------------------------- ### Import Workspacesionizer Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.workspacesionizer.txt Import the Workspacesionizer plugin to access its type annotations. This is typically used at the beginning of your WezTerm configuration file. ```lua ---@type Workspacesionizer local wpr = wezterm.plugin.require("https://github.com/vieitesss/workspacesionizer.wezterm") ``` -------------------------------- ### Import Resurrect Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/resurrect.md Import the Resurrect plugin to enable type annotations. This is useful for IDEs and linters to provide better autocompletion and error checking. ```lua ---@type Resurrect local resurrect = wezterm.plugin.require("https://github.com/MLFlexer/resurrect.wezterm") ``` -------------------------------- ### Import WezPainControl from Remote Plugin Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/wez-pain-control.md Import the WezPainControl type annotation when using the plugin directly from its GitHub repository. ```lua ---@type WezPainControl local wez_pain_control = wezterm.plugin.require("https://github.com/sei40kr/wez-pain-control") ``` -------------------------------- ### Import PinnedTabs Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.pinned-tabs.txt Import the PinnedTabs type annotation for the pinned-tabs.wezterm plugin. This allows for type checking when using the plugin. ```lua ---@type PinnedTabs local pinned_tabs = wezterm.plugin.require("https://github.com/selectnull/pinned-tabs.wezterm") ``` -------------------------------- ### Import Kanagawa WezTerm Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/kanagawa.md Import the Kanagawa theme type annotations for use in your WezTerm configuration. This requires the wezterm.plugin.require function. ```lua ---@type Kanagawa local kanagawa = wezterm.plugin.require("https://github.com/sravioli/kanagawa.wz") ``` -------------------------------- ### Import Rosepine Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/rosepine.md Import the Rosepine type annotations for use with WezTerm plugins. This requires the `wezterm.plugin.require` function. ```lua ---@type RosePine local rosepine = wezterm.plugin.require("https://github.com/neapsix/wezterm") ``` -------------------------------- ### Update pre-commit Hooks Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Update pre-commit hooks to their latest versions and commit the changes to the configuration file. ```bash pre-commit autoupdate ``` -------------------------------- ### Import Chord Type Annotations in Wezterm Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.chord.txt Import the Chord type annotation for the sravioli/chord.wz module. This is useful for gaining type safety when using the chord module. ```lua ---@type Chord local chord = wezterm.plugin.require("https://github.com/sravioli/chord.wz") ``` -------------------------------- ### Import wezterm-theme-rotator Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.wezterm-theme-rotator.txt Import the ThemeRotator type annotation for the wezterm-theme-rotator plugin. This is useful for static analysis and autocompletion in your WezTerm configuration. ```lua ---@type ThemeRotator local theme_rotator = wezterm.plugin.require("https://github.com/koh-sh/wezterm-theme-rotator") ``` -------------------------------- ### Import AgentDeck Types in WezTerm Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.agent-deck.txt Import the AgentDeck type annotation for wezterm-agent-deck. This enables type checking and autocompletion for the plugin. ```lua ---@type AgentDeck local agent_deck = wezterm.plugin.require("https://github.com/Eric162/wezterm-agent-deck") ``` -------------------------------- ### Import Memo Types in WezTerm Plugin Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.memo.txt Import the Memo type annotation for the sravioli/memo.wz library. This allows for type checking and autocompletion within your WezTerm plugin. ```lua ---@type Memo local memo = wezterm.plugin.require("https://github.com/sravioli/memo.wz") ``` -------------------------------- ### Import Warp Type Annotations Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/warp.md Import the Warp type annotations for use in your WezTerm configuration. This requires the wezterm.plugin.require function. ```lua ---@type Warp local warp = wezterm.plugin.require("https://github.com/sravioli/warp.wz") ``` -------------------------------- ### Import Rosepine Types in WezTerm Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.rosepine.txt Import the Rosepine color scheme types for use in your WezTerm configuration. This requires the neapsix/wezterm plugin. ```lua ---@type RosePine local rosepine = wezterm.plugin.require("https://github.com/neapsix/wezterm") ``` -------------------------------- ### Import Lantern Types in WezTerm Plugin Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.lantern.txt Import the Lantern type annotations for use in your WezTerm Lua plugins. Ensure the plugin is correctly required. ```lua ---@type Lantern local lantern = wezterm.plugin.require("https://github.com/sravioli/lantern.wz") ``` -------------------------------- ### Import Listeners Module in WezTerm Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.listeners.txt Import the listeners module from a remote URL using wezterm.plugin.require. This is useful for integrating external listener functionalities into your WezTerm configuration. ```lua ---@type Listeners local listeners = wezterm.plugin.require("https://github.com/ChrisGVE/listeners.wezterm") ``` -------------------------------- ### Import ToggleTerminal Type Annotation Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.toggle-terminal.txt Import the ToggleTerminal type annotation for the zsh-sage/toggle_terminal.wez plugin. This allows for better code completion and type checking. ```lua ---@type ToggleTerminal local toggle_terminal = wezterm.plugin.require("https://github.com/zsh-sage/toggle_terminal.wez") ``` -------------------------------- ### Import Listeners Plugin Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/docs/listeners.md Import the listeners.wezterm plugin to utilize its type annotations. This is useful for code completion and static analysis within your WezTerm configuration. ```lua ---@type Listeners local listeners = wezterm.plugin.require("https://github.com/ChrisGVE/listeners.wezterm") ``` -------------------------------- ### Configure Git for Unix Line Endings Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Enforce Unix-style line endings in Git to maintain consistency across different operating systems. Apply globally or per-repository. ```bash git config --local core.autocrlf false # If you want to enforce this only in this repository git config --local core.eol lf git config --global core.autocrlf false # If you want to enforce this in your global settings git config --global core.eol lf ``` -------------------------------- ### Import Pivot Panes Types in WezTerm Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.pivot-panes.txt Import the Pivot type annotation for the pivot_panes.wezterm plugin. This is useful for IDEs and static analysis tools to understand the plugin's API. ```lua ---@type Pivot local pivot = wezterm.plugin.require("https://github.com/ChrisGVE/pivot_panes.wezterm") ``` -------------------------------- ### Import CmdSender Type Annotation Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.cmd-sender.txt Import the CmdSender type annotation for the wezterm-cmd-sender plugin. This is typically used at the beginning of a Lua script to enable type checking and autocompletion. ```lua ---@type CmdSender local cmd_sender = wezterm.plugin.require("https://github.com/aureolebigben/wezterm-cmd-sender") ``` -------------------------------- ### Import WeztermStatus Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.wezterm-status.txt Import the WeztermStatus type annotation for the wezterm-status plugin. This is useful for static analysis and autocompletion in your WezTerm configuration. ```lua ---@type WeztermStatus local status = wezterm.plugin.require("https://github.com/yriveiro/wezterm-status") ``` -------------------------------- ### Import Warp Types in WezTerm Plugin Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.warp.txt Import the Warp type annotations from the specified GitHub repository. This is necessary for type checking when using the Warp plugin. ```lua ---@type Warp local warp = wezterm.plugin.require("https://github.com/sravioli/warp.wz") ``` -------------------------------- ### Set Unix Line Endings in Neovim Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Configure Neovim to use Unix line endings for files. This ensures consistency with the project's requirements. ```lua -- init.lua vim.o.fileformat = 'unix' -- RECOMMENDED vim.opt.fileformat = 'unix' -- AVOID THIS ``` -------------------------------- ### Import Sigil Types in Wezterm Plugin Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.sigil.txt Import the Sigil type annotation for use in your wezterm plugin. This requires the wezterm.plugin.require function. ```lua ---@type Sigil local sigil = wezterm.plugin.require("https://github.com/sravioli/sigil.wz") ``` -------------------------------- ### Avoid Basic Type Aliases Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Refrain from creating aliases for fundamental types such as integer, boolean, or string. These aliases do not add clarity and increase unnecessary complexity. ```lua --- ---DON'T DO THIS OH GOD ---@alias MyTable table ---I've seen these types in other projects, ---way more than what my soul can handle... ---@alias Int integer ---@alias Bool boolean ---@alias Str string ``` -------------------------------- ### Create a New Feature Branch Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Create a new branch for feature development, avoiding direct commits to the main branch or fork's main branch. ```bash git checkout -b feat/PLUGIN-NAME ``` -------------------------------- ### Avoid Redundant String and Table Aliases Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Do not create aliases for basic types like string arrays or string-to-string-array dictionaries, as they are often redundant. Similarly, avoid aliasing simple object structures that can be directly represented. ```lua --- ---PLEASE DON'T DO THIS! ---WRONG ---@alias StringArr string[] ---@alias StringArrDict table ---Redundant... ---@alias Foo { foo: 'bar' } ---@alias FooList Foo[] ---... ``` -------------------------------- ### Lua Type Annotation: Correct Placement Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Use the `---@type` annotation on the same line as the variable declaration for concise type definitions. ```lua local x ---@type boolean ``` -------------------------------- ### Lua Type Annotation: Avoid Nullable Types with Question Mark Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Do not use the `?` suffix for nullable types in `---@type` annotations; prefer `|nil`. ```lua local l ---@type string? ``` -------------------------------- ### Handle Invalid Hashkey Event Source: https://github.com/drkjeff16/wezterm-types/blob/main/doc/wezterm-types-plugin.dev.txt Register a callback for the 'dev.wezterm.invalid_hashkey' event. This event is triggered when no hashkey or an invalid one is provided to the dev.wezterm plugin. ```lua ---Either no `hashkey` or an invalid one provided. --- ---@param event "dev.wezterm.invalid_hashkey" This is for `dev.wezterm` only! ---@param callback function function Wezterm.on(event, callback) end ``` -------------------------------- ### Lua Type Annotation: Avoid Placement Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Avoid placing `---@type` annotations on a separate line when the variable declaration is short. ```lua --- ---@type boolean local x ``` -------------------------------- ### Prefer Enums Over String Literal Aliases Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md When a set of string literals represents a fixed set of choices, prefer using an enum. This provides better type safety and clarity compared to a simple string alias. ```lua --- ---AVOID THIS ---@alias MyChoices ---|"0" ---|"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" ---|"29" ---|"30" ---|"31" ---|"32" ---|"33" ---CORRECT ---Replace the values for whatever you need, if at all. ---@enum (key) MyChoices local choices = { ["0"] = 1, ["1"] = 1, ["2"] = 1, ["3"] = 1, ["4"] = 1, ["5"] = 1, ["6"] = 1, ["7"] = 1, ["8"] = 1, ["9"] = 1, ["10"] = 1, ["11"] = 1, ["12"] = 1, ["13"] = 1, ["14"] = 1, ["15"] = 1, ["16"] = 1, ["17"] = 1, ["18"] = 1, ["19"] = 1, ["20"] = 1, ["21"] = 1, ["22"] = 1, ["23"] = 1, ["24"] = 1, ["25"] = 1, ["26"] = 1, ["27"] = 1, ["28"] = 1, ["29"] = 1, ["30"] = 1, ["31"] = 1, ["32"] = 1, ["33"] = 1, } ``` -------------------------------- ### Lua Type Annotation: Nullable Types Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md Use the `|nil` suffix in `---@type` annotations to denote nullable types, instead of the `?` operator. ```lua local l ---@type string|nil ``` -------------------------------- ### Lua Type Annotation: Multi-variable Declaration Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md For multi-variable declarations, place the `---@type` annotation after all variables if the line exceeds textwidth limits. Otherwise, prefer same-line annotation. ```lua --- ---@type integer, function, boolean, string, number|nil local x, y, z, foo, bar = 1, function() end, true, "bar", nil ``` -------------------------------- ### Correctly Alias Union Types with Functions Source: https://github.com/drkjeff16/wezterm-types/blob/main/CONTRIBUTING.md When creating an alias for a union type that includes a function, ensure the function type is correctly parenthesized to avoid ambiguity. A function type should be enclosed in parentheses when part of a union. ```lua --- ---Will be parsed as `fun(): (string|string[])` ---@alias ListOrFunction fun(): string|string[] ---Will be parsed as `string[]|fun(): string` --- ---The `fun(): ...` type is a bit funny (AKA a headache) ---@alias ListOrFunction (fun(): string)|string[] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.