docs: fixed many small issues in Lua docs pages (#7124)

* lua: fixed markdown lists not rendering correctly in webpage
* unicode_version: fixed typo in markdown file
* visual_bell: fixed typo in documentation
* load_base16_scheme: added comma for redaction, etc.
* truncate_right: corrected improper punctuation
* mux: improved Lua snippet in `rename_workspace`
* wezterm.color.save_scheme: improved docs
* wezterm.plugin: improved every function's docs
* visual_bell: added missing code enclosures

---------

Signed-off-by: Guennadi Maximov C <g.maxc.fox@protonmail.com>
This commit is contained in:
Guennadi Maximov C authored and GitHub committed 2026-11-20 04:31:22 +01:00
1 parent a0d411761d
commit bf0747f4af
11 files changed
+34 -23

No files matched your search

+1
View File
@@ -11,6 +11,7 @@ You should not normally need to configure this setting; the defaults should
be sufficient in most cases.
There are three fields supported:
* `pid_file` - specify the location of the pid and lock file. The default location is `$XDG_RUNTIME_DIR/wezterm/pid` on X11/Wayland systems, or `$HOME/.local/share/wezterm/pid`
* `stdout` - specifies where a log of the stdout stream from the daemon will be placed. The default is `$XDG_RUNTIME_DIR/wezterm/stdout` on X11/Wayland systems, or `$HOME/.local/share/wezterm/stdout`.
* `stderr` - specifies where a log of the stderr stream from the daemon will be placed. The default is `$XDG_RUNTIME_DIR/wezterm/stderr` on X11/Wayland systems, or `$HOME/.local/share/wezterm/stderr`.
+1 -1
View File
@@ -17,7 +17,7 @@ For example, there were a number of unicode code points that had their width
changed between Unicode version 8 and version 9. This wouldn't be an issue
if all software was simultaneously aware of the change, but the reality is
that there is a lot of older software out there, and that even if your local
system is fully up to date, you might connect to a remote system vis SSH
system is fully up to date, you might connect to a remote system via SSH
that is running applications that use a different version of unicode than
your local system.
+2 -2
View File
@@ -9,10 +9,10 @@ tags:
When the BEL ascii sequence is sent to a pane, the bell is "rung" in that pane.
You may choose to configure the `visual_bell` option so show a visible representation of the bell event,
You may choose to configure the `visual_bell` option to show a visible representation of the bell event,
by having the background color of the pane briefly change color.
There are four fields to the visual_bell config option:
There are four fields to the `visual_bell` config option:
* `fade_in_duration_ms` - how long it should take for the bell color to fade in, in milliseconds. The default is 0.
* `fade_out_duration_ms` - how long it should take for the bell color to fade out, in milliseconds. The default is 0.
@@ -2,18 +2,18 @@
{{since('20220807-113146-c2fee766')}}
Loads a yaml file in [base16](https://github.com/chriskempson/base16) format
Loads a YAML file in [base16](https://github.com/chriskempson/base16) format
and returns it as a wezterm color scheme.
Note that wezterm ships with the base16 color schemes that were referenced via
[base16-schemes-source](https://github.com/chriskempson/base16-schemes-source)
when the release was prepared so this function is primarily useful if you want
when the release was prepared, so this function is primarily useful if you want
to import a base16 color scheme that either isn't listed from the main list, or
that was created after your version of wezterm was built.
This function returns a tuple of the color definitions and the metadata.
For example, given a yaml file with these contents:
For example, given a YAML file with these contents:
```yaml
scheme: "Cupcake"
+12 -6
View File
@@ -3,8 +3,10 @@
{{since('20220807-113146-c2fee766')}}
Saves a color scheme as a wezterm TOML file.
This is useful when sharing your custom color scheme with others.
While you could share the lua representation of the scheme, the
While you could share the Lua representation of the scheme, the
TOML file is recommended for sharing as it is purely declarative:
no executable logic is present in the TOML color scheme which makes
it safe to consume "random" schemes from the internet.
@@ -12,9 +14,10 @@ it safe to consume "random" schemes from the internet.
This example demonstrates importing a base16 scheme and exporting
it as a wezterm scheme.
Given a yaml file with these contents:
Given a YAML file with these contents:
```yaml
# /tmp/cupcake.yaml
scheme: "Cupcake"
author: "Chris Kempson (http://chriskempson.com)"
base00: "fbf1f2"
@@ -37,14 +40,17 @@ base0F: "BAA58C"
Then:
```
> colors, metadata = wezterm.color.load_base16_scheme("/tmp/cupcake.yaml")
> wezterm.color.save_scheme(colors, metadata, "/tmp/cupcacke.toml")
```lua
local wezterm = require 'wezterm'
local colors, metadata = wezterm.color.load_base16_scheme("/tmp/cupcake.yaml")
wezterm.color.save_scheme(colors, metadata, "/tmp/cupcacke.toml")
```
produces a toml file with these contents:
produces a TOML file with these contents:
```toml
# /tmp/cupcacke.toml
[colors]
ansi = [
'#fbf1f2',
@@ -5,8 +5,8 @@
Renames the workspace *old* to *new*.
```lua
wezterm.mux.rename_workspace(
wezterm.mux.get_active_workspace(),
'something different'
)
local wezterm = require 'wezterm'
local active = wezterm.mux.get_active_workspace()
wezterm.mux.rename_workspace(active, 'something different')
```
+2 -2
View File
@@ -1,8 +1,8 @@
# list function
# `wezterm.plugin.list()`
{{since('20230320-124340-559cb7b0')}}
Will return a table array listing all the plugin repos in the plugin directory
Will return a table array listing all the plugin repos in the plugin directory.
Each entry has three fields:
+4 -2
View File
@@ -1,4 +1,4 @@
# Function require
# `wezterm.plugin.require(url)`
{{since('20230320-124340-559cb7b0')}}
@@ -7,11 +7,13 @@ exist and store it in the runtime dir under `plugins/NAME` where
`NAME` is derived from the repo URL. Once cloned, the repo is
NOT automatically updated when `require` is called again.
The function takes a single string parameter, the Git repo URL
The function takes a single string parameter, the Git repo URL.
Only HTTP(S) or local filesystem repos are allowed for the git URL.
```lua
local wezterm = require 'wezterm'
local remote_plugin = wezterm.plugin.require 'https://github.com/owner/repo'
local local_plugin =
wezterm.plugin.require 'file:///Users/developer/projects/my.Plugin'
+3 -2
View File
@@ -1,8 +1,9 @@
# update_all function
# `wezterm.plugin.update_all()`
{{since('20230320-124340-559cb7b0')}}
Attempt to fast-forward or `pull --rebase` each of the repos in the plugin directory.
Attempt to _fast-forward_ or run `gih pull --rebase` for each of the repos
in the plugin directory.
!!! Note
+1
View File
@@ -20,6 +20,7 @@ is emitted, each of the registered callbacks is called in the order that
they were registered.
The callback will receive the following parameters:
- a [`window` object](../window/index.md) that represents the active gui window.
- a [`pane` object](../pane/index.md) that represents the active pane.
+1 -1
View File
@@ -14,6 +14,6 @@ Returns a copy of `string` that is no longer than `max_width` columns
Truncation occurs by reemoving excess characters from the right end
of the string.
For example, `wezterm.truncate_right("hello", 3)` returns `"hel"`,
For example, `wezterm.truncate_right("hello", 3)` returns `"hel"`.
See also: [wezterm.truncate_left](truncate_left.md), [wezterm.pad_left](pad_left.md).