Skip to content

Commit b38c366

Browse files
committed
Document hl groups in README
1 parent db1c244 commit b38c366

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,13 @@ https://github.com/user-attachments/assets/19822d92-5173-4441-8cec-6a59f9eb41b9
8282
This plugin aims to provide a sensible workflow to work with Python REPL.
8383

8484
Main goals of this project:
85+
8586
- Ability to send code from buffer to REPL;
8687
- Ability to display images in Neovim directly;
8788
- Balance code complexity with sensible features for a REPL workflow.
8889

8990
What features `pyrepl.nvim` currently provides:
91+
9092
- Convert notebook files from and to python with `jupytext`;
9193
- Install all runtime deps required with a command (no need to install kernel globally with default settings);
9294
- Use `jupyter-console` TUI for the REPL;
@@ -210,6 +212,12 @@ Commands:
210212
- `:PyreplConvert` - prompt to convert current notebook buffer to python (`jupytext` should be installed);
211213
- `:PyreplInstall {tool}` - install pyrepl runtime packages into the configured Python (`tool`: `pip` or `uv`).
212214

215+
Highlight groups:
216+
217+
- `PyreplImageBorder` (link to `FloatBorder` by default);
218+
- `PyreplImageTitle` (link to `FloatTitle` by default);
219+
- `PyreplImageNormal` (link to `NormalFloat` by default).
220+
213221
Lua API:
214222

215223
```lua

doc/pyrepl.txt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -377,16 +377,9 @@ While focused in the image window:
377377
HIGHLIGHTS *pyrepl-highlights*
378378

379379
pyrepl.nvim defines these highlight groups:
380-
PyreplImageBorder
381-
PyreplImageTitle
382-
PyreplImageNormal
383-
384-
Default links:
385-
>
386-
vim.api.nvim_set_hl(0, "PyreplImageBorder", { link = "FloatBorder" })
387-
vim.api.nvim_set_hl(0, "PyreplImageTitle", { link = "FloatTitle" })
388-
vim.api.nvim_set_hl(0, "PyreplImageNormal", { link = "NormalFloat" })
389-
<
380+
`PyreplImageBorder` (link to |FloatBorder| by default)
381+
`PyreplImageTitle` (link to |FloatTitle| by default)
382+
`PyreplImageNormal` (link to |NormalFloat| by default)
390383

391384
==============================================================================
392385
TROUBLESHOOTING *pyrepl-troubleshooting*

lua/pyrepl/image.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ local function open_image_win(buf)
4747
local normal_hl = "PyreplImageNormal"
4848

4949
if vim.tbl_isempty(vim.api.nvim_get_hl(0, { name = border_hl })) then
50-
vim.api.nvim_set_hl(0, border_hl, { link = "Special" })
50+
vim.api.nvim_set_hl(0, border_hl, { link = "FloatBorder" })
5151
end
5252

5353
if vim.tbl_isempty(vim.api.nvim_get_hl(0, { name = title_hl })) then

0 commit comments

Comments
 (0)