Skip to content

Commit aff1541

Browse files
committed
update docs
1 parent 68e3fd4 commit aff1541

1 file changed

Lines changed: 51 additions & 21 deletions

File tree

README.md

Lines changed: 51 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ Since Neovim is a terminal based application it has to be run through something,
3333

3434
These are the terminal supported by default (when you just switch the launcher type to "terminal")
3535

36-
- [ghostty](https://ghostty.org/)
37-
- [kitty](https://sw.kovidgoyal.net/kitty/)
3836
- [alacritty](https://alacritty.org/)
3937
- [foot](https://codeberg.org/dnkl/foot)
38+
- [ghostty](https://ghostty.org/)
39+
- [kitty](https://sw.kovidgoyal.net/kitty/)
4040
- [st](https://st.suckless.org/)
41+
- [wezterm](https://wezterm.org/)
4142

4243
You can use any other terminal by changing the launcher options to the following:
4344

@@ -154,6 +155,54 @@ local defold = require "defold"
154155
defold.setup(config)
155156
```
156157

158+
### Terminal
159+
160+
If you only have one of the supported terminals installed you don't really have to do anything as defold.nvim will use the
161+
first one it finds, however assuming you want to use a specific one you gotta specify which one like this:
162+
163+
```lua
164+
{
165+
"atomicptr/defold.nvim",
166+
-- redacted for brevity...
167+
opts = {
168+
-- lets use kitty
169+
launcher = {
170+
type = "terminal",
171+
executable = "kitty",
172+
},
173+
},
174+
}
175+
```
176+
177+
### Custom terminal
178+
179+
In order to use a custom terminal you have to configure the `launcher` section of the settings:
180+
181+
```lua
182+
{
183+
"atomicptr/defold.nvim",
184+
-- ...
185+
opts = {
186+
-- this time we'll add `wezterm` via absolute path
187+
launcher = {
188+
type = "terminal",
189+
executable = "/run/current-system/sw/bin/wezterm",
190+
arguments = { "start", "--class={CLASSNAME}", "--", "{NVIM}" },
191+
},
192+
},
193+
}
194+
```
195+
196+
Consider adding support for the custom terminal to [`crates/bridge/src/terminals.rs`](./crates/bridge/src/terminals.rs).
197+
198+
### Variables
199+
200+
defold.nvim is replacing these variables in the arguments list
201+
202+
- **{CLASSNAME}** - (Linux only) The class name we'll use for the terminal window
203+
- **{ADDR}** - The address (netsock) or path to the socket (fsock)
204+
- **{NVIM}** - Path to the Neovim executable
205+
157206
## Setup
158207

159208
### Setup Neovim
@@ -184,25 +233,6 @@ local defold = require "defold"
184233
local root = defold.plugin_root()
185234
```
186235

187-
### Custom terminal
188-
189-
In order to use a custom terminal you have to configure the `launcher` section of the settings:
190-
191-
```lua
192-
{
193-
"atomicptr/defold.nvim",
194-
-- redacted for brevity...
195-
opts = {
196-
-- in this example we configure `wezterm`
197-
launcher = {
198-
type = "terminal",
199-
executable = "/run/current-system/sw/bin/wezterm",
200-
arguments = { "start", "--class={CLASSNAME}", "--", "{NVIM}" },
201-
},
202-
},
203-
}
204-
```
205-
206236
## Available Commands
207237

208238
Here's how you can interact with Defold directly from Neovim:

0 commit comments

Comments
 (0)