Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
benlubas committed Mar 3, 2024
1 parent 12fc198 commit 8fa8395
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ variable, their values, and a brief description.
| `g:molten_image_provider` | (`"none"`) \| `"image.nvim"` | How images are displayed |
| `g:molten_open_cmd` | (`nil`) \| Any command | Defaults to `xdg-open` on Linux, `open` on Darwin, and `start` on Windows. But you can override it to whatever you want. The command is called like: `subprocess.run([open_cmd, filepath])` |
| `g:molten_output_crop_border` | (`true`) \| `false` | 'crops' the bottom border of the output window when it would otherwise just sit at the bottom of the screen |
| `g:molten_output_show_exec_time` | (`true`) \| `false` | Shows the current amount of time since the cell has begun execution |
| `g:molten_output_show_more` | `true` \| (`false`) | When the window can't display the entire contents of the output buffer, shows the number of extra lines in the window footer (requires nvim 10.0+ and a window border) |
| `g:molten_output_virt_lines` | `true` \| (`false`) | Pad the main buffer with virtual lines so the floating window doesn't cover anything while it's open |
| `g:molten_output_win_border` | (`{ "", "━", "", "" }`) \| any value for `border` in `:h nvim_open_win()`| Some border features will not work if you don't specify your border as a table. see border option of `:h nvim_open_win()` |
Expand All @@ -196,7 +197,6 @@ variable, their values, and a brief description.
| `g:molten_virt_text_output` | `true` \| (`false`) | When true, show output as virtual text below the cell, virtual text stays after leaving the cell. When true, output window doesn't open automatically on run. Effected by `virt_lines_off_by_1` |
| `g:molten_virt_text_max_lines` | (`12`) \| `int` | Max height of the virtual text |
| `g:molten_wrap_output` | `true` \| (`false`) | Wrap output text |
| `g:molten_output_show_exec_time` | (`true`) \| `false` | Shows the current amount of time since the cell has begun execution. May cause performance issues.
| [DEBUG] `g:molten_show_mimetype_debug` | `true` \| (`false`) | Before any non-iostream output chunk, the mime-type for that output chunk is shown. Meant for debugging/plugin devlopment |

### Status Line
Expand Down
3 changes: 2 additions & 1 deletion rplugin/python3/molten/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class MoltenOptions:
limit_output_chars: int
open_cmd: Optional[str]
output_crop_border: bool
output_show_exec_time: bool
output_show_more: bool
output_virt_lines: bool
output_win_border: Union[str, List[str]]
Expand Down Expand Up @@ -78,6 +79,7 @@ def __init__(self, nvim: Nvim):
("molten_image_provider", "none"),
("molten_open_cmd", None),
("molten_output_crop_border", True),
("molten_output_show_exec_time", True),
("molten_output_show_more", False),
("molten_output_virt_lines", False),
("molten_output_win_border", [ "", "━", "", "" ]),
Expand All @@ -95,7 +97,6 @@ def __init__(self, nvim: Nvim):
("molten_virt_text_max_lines", 12),
("molten_virt_text_output", False),
("molten_wrap_output", False),
("molten_output_show_exec_time", True),
]
# fmt: on

Expand Down
2 changes: 1 addition & 1 deletion rplugin/python3/molten/outputbuffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _get_header_text(self, output: Output) -> str:
else:
time = ""

return f"{old}Out[{execution_count}]: {status} {time}"
return f"{old}Out[{execution_count}]: {status} {time}".rstrip()

def enter(self, anchor: Position) -> bool:
entered = False
Expand Down

0 comments on commit 8fa8395

Please sign in to comment.