Skip to content

Commit

Permalink
Merge pull request #91 from mrjones2014/bot/vimdoc/master
Browse files Browse the repository at this point in the history
chore: generated vimdoc
  • Loading branch information
mrjones2014 committed Apr 19, 2023
2 parents 98dd9e1 + da39004 commit 31589a9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
31 changes: 30 additions & 1 deletion doc/smart-splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Multiplexer Integrations ............. |smart-splits-multiplexer-integrations|
Tmux ..................................................... |smart-splits-tmux|
Wezterm ............................................... |smart-splits-wezterm|
Kitty ................................................... |smart-splits-kitty|
Multiplexer Lua API ....................... |smart-splits-multiplexer-lua-api|

==============================================================================
🧠 `SMART-SPLITS.NVIM` *smart-splits-🧠-`smart-splits.nvim*
Expand All @@ -29,7 +30,8 @@ demo
- Install <#install>
- Configuration <#configuration> - Hooks <#hooks> - Examples: <#examples>
- Usage <#usage> - Multiplexer Integrations <#multiplexer-integrations> - Tmux
<#tmux> - Wezterm <#wezterm> - Kitty <#kitty> - Credits <#credits>
<#tmux> - Wezterm <#wezterm> - Kitty <#kitty> - Credits <#credits> -
Multiplexer Lua API <#multiplexer-lua-api>

------------------------------------------------------------------------------
INSTALL *smart-splits-install*
Expand Down Expand Up @@ -104,6 +106,7 @@ Defaults are shown below:
-- current_pane_at_edge(direction:'left'|'right'|'up'|'down'):boolean
-- next_pane(direction:'left'|'right'|'up'|'down'):boolean
-- resize_pane(direction:'left'|'right'|'up'|'down'):boolean
-- split_pane(direction:'left'|'right'|'up'|'down',size:number|nil):boolean
-- },
-- direction = 'left'|'right'|'up'|'down',
-- split(), -- utility function to split current Neovim pane in the current direction
Expand Down Expand Up @@ -502,4 +505,30 @@ Thanks to @chancez for the relative resize Python kitten
<https://github.com/chancez/dotfiles/blob/badc69d3895a6a942285126b8c372a55d77533e1/kitty/.config/kitty/relative_resize.py>.



MULTIPLEXER LUA API *smart-splits-multiplexer-lua-api*

You can directly access the multiplexer API for scripting purposes as well. To
get a handle to the current multiplexer backend, you can do:

>lua
local mux = require('smart-splits.mux').get()
<
This returns the currently enabled multiplexer backend, or `nil` if none is
currently in use. The API offers the following methods:

>lua
local mux = require('smart-splits.mux').get()
-- mux matches the following type annotations
---@class SmartSplitsMultiplexer
---@field current_pane_id fun():number|nil
---@field current_pane_at_edge fun(direction:'left'|'right'|'up'|'down'):boolean
---@field is_in_session fun():boolean
---@field current_pane_is_zoomed fun():boolean
---@field next_pane fun(direction:'left'|'right'|'up'|'down'):boolean
---@field resize_pane fun(direction:'left'|'right'|'up'|'down', amount:number):boolean
---@field split_pane fun(direction:'left'|'right'|'up'|'down',size:number|nil):boolean
---@field type 'tmux'|'wezterm'|'kitty'
<

vim:tw=78:ts=8:ft=help:norl:
1 change: 1 addition & 0 deletions doc/tags
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ smart-splits-key-mappings smart-splits.txt /*smart-splits-key-mappings*
smart-splits-kitty smart-splits.txt /*smart-splits-kitty*
smart-splits-lua-api smart-splits.txt /*smart-splits-lua-api*
smart-splits-multiplexer-integrations smart-splits.txt /*smart-splits-multiplexer-integrations*
smart-splits-multiplexer-lua-api smart-splits.txt /*smart-splits-multiplexer-lua-api*
smart-splits-table-of-contents smart-splits.txt /*smart-splits-table-of-contents*
smart-splits-tmux smart-splits.txt /*smart-splits-tmux*
smart-splits-usage smart-splits.txt /*smart-splits-usage*
Expand Down

0 comments on commit 31589a9

Please sign in to comment.