euporie 2.8.1__py3-none-any.whl → 2.8.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- euporie/console/_commands.py +143 -0
- euporie/console/_settings.py +58 -0
- euporie/console/app.py +25 -71
- euporie/console/tabs/console.py +267 -147
- euporie/core/__init__.py +1 -9
- euporie/core/__main__.py +31 -5
- euporie/core/_settings.py +104 -0
- euporie/core/app/__init__.py +3 -0
- euporie/core/app/_commands.py +70 -0
- euporie/core/app/_settings.py +427 -0
- euporie/core/{app.py → app/app.py} +214 -572
- euporie/core/app/base.py +51 -0
- euporie/core/{current.py → app/current.py} +13 -4
- euporie/core/app/cursor.py +35 -0
- euporie/core/app/dummy.py +12 -0
- euporie/core/app/launch.py +28 -0
- euporie/core/bars/__init__.py +11 -0
- euporie/core/bars/command.py +182 -0
- euporie/core/bars/menu.py +258 -0
- euporie/core/{widgets → bars}/search.py +154 -57
- euporie/core/{widgets → bars}/status.py +9 -26
- euporie/core/clipboard.py +19 -80
- euporie/core/comm/base.py +8 -6
- euporie/core/comm/ipywidgets.py +21 -12
- euporie/core/comm/registry.py +2 -1
- euporie/core/commands.py +11 -5
- euporie/core/completion.py +3 -2
- euporie/core/config.py +368 -341
- euporie/core/convert/__init__.py +0 -30
- euporie/core/convert/datum.py +131 -60
- euporie/core/convert/formats/__init__.py +31 -0
- euporie/core/convert/formats/ansi.py +46 -30
- euporie/core/convert/formats/common.py +11 -23
- euporie/core/convert/formats/html.py +45 -40
- euporie/core/convert/formats/pil.py +1 -1
- euporie/core/convert/formats/png.py +3 -5
- euporie/core/convert/formats/sixel.py +3 -3
- euporie/core/convert/registry.py +11 -8
- euporie/core/convert/utils.py +50 -23
- euporie/core/diagnostics.py +2 -2
- euporie/core/filters.py +72 -82
- euporie/core/format.py +13 -2
- euporie/core/ft/ansi.py +1 -1
- euporie/core/ft/html.py +36 -36
- euporie/core/ft/table.py +1 -3
- euporie/core/ft/utils.py +4 -1
- euporie/core/graphics.py +216 -124
- euporie/core/history.py +2 -2
- euporie/core/inspection.py +3 -2
- euporie/core/io.py +207 -28
- euporie/core/kernel/__init__.py +1 -0
- euporie/core/{kernel.py → kernel/client.py} +100 -139
- euporie/core/kernel/manager.py +114 -0
- euporie/core/key_binding/bindings/__init__.py +2 -8
- euporie/core/key_binding/bindings/basic.py +47 -7
- euporie/core/key_binding/bindings/completion.py +3 -8
- euporie/core/key_binding/bindings/micro.py +5 -7
- euporie/core/key_binding/bindings/mouse.py +26 -24
- euporie/core/key_binding/bindings/terminal.py +193 -0
- euporie/core/key_binding/bindings/vi.py +46 -0
- euporie/core/key_binding/key_processor.py +43 -2
- euporie/core/key_binding/registry.py +2 -0
- euporie/core/key_binding/utils.py +22 -2
- euporie/core/keys.py +7156 -93
- euporie/core/layout/cache.py +35 -25
- euporie/core/layout/containers.py +280 -74
- euporie/core/layout/decor.py +5 -5
- euporie/core/layout/mouse.py +1 -1
- euporie/core/layout/print.py +16 -3
- euporie/core/layout/scroll.py +26 -28
- euporie/core/log.py +75 -60
- euporie/core/lsp.py +118 -24
- euporie/core/margins.py +60 -31
- euporie/core/path.py +2 -1
- euporie/core/renderer.py +58 -17
- euporie/core/style.py +60 -40
- euporie/core/suggest.py +103 -85
- euporie/core/tabs/__init__.py +34 -0
- euporie/core/tabs/_settings.py +113 -0
- euporie/core/tabs/base.py +11 -435
- euporie/core/tabs/kernel.py +420 -0
- euporie/core/tabs/notebook.py +20 -54
- euporie/core/utils.py +98 -6
- euporie/core/validation.py +1 -1
- euporie/core/widgets/_settings.py +188 -0
- euporie/core/widgets/cell.py +90 -158
- euporie/core/widgets/cell_outputs.py +25 -36
- euporie/core/widgets/decor.py +11 -41
- euporie/core/widgets/dialog.py +55 -44
- euporie/core/widgets/display.py +27 -24
- euporie/core/widgets/file_browser.py +5 -26
- euporie/core/widgets/forms.py +16 -12
- euporie/core/widgets/inputs.py +37 -81
- euporie/core/widgets/layout.py +7 -6
- euporie/core/widgets/logo.py +49 -0
- euporie/core/widgets/menu.py +13 -11
- euporie/core/widgets/pager.py +8 -11
- euporie/core/widgets/palette.py +6 -6
- euporie/hub/app.py +52 -31
- euporie/notebook/_commands.py +24 -0
- euporie/notebook/_settings.py +107 -0
- euporie/notebook/app.py +109 -210
- euporie/notebook/filters.py +1 -1
- euporie/notebook/tabs/__init__.py +46 -7
- euporie/notebook/tabs/_commands.py +714 -0
- euporie/notebook/tabs/_settings.py +32 -0
- euporie/notebook/tabs/display.py +2 -2
- euporie/notebook/tabs/edit.py +12 -7
- euporie/notebook/tabs/json.py +3 -3
- euporie/notebook/tabs/log.py +1 -18
- euporie/notebook/tabs/notebook.py +21 -674
- euporie/notebook/widgets/_commands.py +11 -0
- euporie/notebook/widgets/_settings.py +19 -0
- euporie/notebook/widgets/side_bar.py +14 -34
- euporie/preview/_settings.py +104 -0
- euporie/preview/app.py +8 -30
- euporie/preview/tabs/notebook.py +15 -86
- euporie/web/tabs/web.py +4 -6
- euporie/web/widgets/webview.py +5 -12
- {euporie-2.8.1.dist-info → euporie-2.8.5.dist-info}/METADATA +11 -15
- euporie-2.8.5.dist-info/RECORD +172 -0
- {euporie-2.8.1.dist-info → euporie-2.8.5.dist-info}/WHEEL +1 -1
- {euporie-2.8.1.dist-info → euporie-2.8.5.dist-info}/entry_points.txt +2 -2
- {euporie-2.8.1.dist-info → euporie-2.8.5.dist-info}/licenses/LICENSE +1 -1
- euporie/core/launch.py +0 -59
- euporie/core/terminal.py +0 -527
- euporie-2.8.1.dist-info/RECORD +0 -146
- {euporie-2.8.1.data → euporie-2.8.5.data}/data/share/applications/euporie-console.desktop +0 -0
- {euporie-2.8.1.data → euporie-2.8.5.data}/data/share/applications/euporie-notebook.desktop +0 -0
@@ -0,0 +1,104 @@
|
|
1
|
+
"""Defines core settings."""
|
2
|
+
|
3
|
+
from euporie.core import __version__
|
4
|
+
from euporie.core.config import add_setting
|
5
|
+
|
6
|
+
# euporie.core.config
|
7
|
+
|
8
|
+
add_setting(
|
9
|
+
name="version",
|
10
|
+
group="euporie.core.config",
|
11
|
+
default=False,
|
12
|
+
flags=["--version", "-V"],
|
13
|
+
action="version",
|
14
|
+
hidden=True,
|
15
|
+
version=f"%(prog)s {__version__}",
|
16
|
+
help_="Show the version number and exit",
|
17
|
+
description="""
|
18
|
+
If set, euporie will print the current version number of the application and exit.
|
19
|
+
All other configuration options will be ignored.
|
20
|
+
|
21
|
+
.. note::
|
22
|
+
|
23
|
+
This cannot be set in the configuration file or via an environment variable
|
24
|
+
""",
|
25
|
+
)
|
26
|
+
|
27
|
+
# euporie.core.log
|
28
|
+
|
29
|
+
add_setting(
|
30
|
+
name="log_file",
|
31
|
+
group="euporie.core.log",
|
32
|
+
flags=["--log-file"],
|
33
|
+
nargs="?",
|
34
|
+
default="",
|
35
|
+
type_=str,
|
36
|
+
title="the log file path",
|
37
|
+
help_="File path for logs",
|
38
|
+
description="""
|
39
|
+
When set to a file path, the log output will be written to the given path.
|
40
|
+
If no value is given output will be sent to the standard output.
|
41
|
+
""",
|
42
|
+
)
|
43
|
+
|
44
|
+
add_setting(
|
45
|
+
name="log_level",
|
46
|
+
group="euporie.core.log",
|
47
|
+
type_=str,
|
48
|
+
default="warning",
|
49
|
+
title="the log level",
|
50
|
+
help_="Set the log level",
|
51
|
+
choices=["debug", "info", "warning", "error", "critical"],
|
52
|
+
description="""
|
53
|
+
When set, logging events at the given level are emitted.
|
54
|
+
""",
|
55
|
+
)
|
56
|
+
|
57
|
+
|
58
|
+
add_setting(
|
59
|
+
name="log_level_stdout",
|
60
|
+
group="euporie.core.log",
|
61
|
+
hidden=True,
|
62
|
+
type_=str,
|
63
|
+
default="critical",
|
64
|
+
title="the log level at which to log to standard output",
|
65
|
+
help_="Set the log level printed to standard out",
|
66
|
+
choices=["debug", "info", "warning", "error", "critical"],
|
67
|
+
description="""
|
68
|
+
When set, logging events at the given level are printed to the standard output.
|
69
|
+
""",
|
70
|
+
)
|
71
|
+
|
72
|
+
add_setting(
|
73
|
+
name="log_config",
|
74
|
+
group="euporie.core.log",
|
75
|
+
flags=["--log-config"],
|
76
|
+
type_=str,
|
77
|
+
default="{}",
|
78
|
+
title="additional logging configuration",
|
79
|
+
help_="Additional logging configuration",
|
80
|
+
description="""
|
81
|
+
A JSON string specifying additional logging configuration.
|
82
|
+
""",
|
83
|
+
)
|
84
|
+
|
85
|
+
# euporie.core.clipboard
|
86
|
+
|
87
|
+
add_setting(
|
88
|
+
name="clipboard",
|
89
|
+
group="euporie.core.clipboard",
|
90
|
+
flags=["--clipboard"],
|
91
|
+
choices=["external", "internal", "terminal"],
|
92
|
+
type_=str,
|
93
|
+
default="external",
|
94
|
+
help_="The preferred clipboard access method",
|
95
|
+
description="""
|
96
|
+
The clipboard access method to use.
|
97
|
+
- ``external``: Data is saved to the system clipboard using OS native tooling.
|
98
|
+
- ``internal``: Clipboard data is only stored and usable inside euporie - it is
|
99
|
+
not saved to the system clipboard.
|
100
|
+
- ``terminal``: uses OSC52 escape sequences to retrieve and set the clipboard
|
101
|
+
contents. Requires your terminal emulator to support OSC52. Works over SSH.
|
102
|
+
|
103
|
+
""",
|
104
|
+
)
|
@@ -0,0 +1,70 @@
|
|
1
|
+
"""Contains commands common to all euporie applications."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import TYPE_CHECKING
|
6
|
+
|
7
|
+
from prompt_toolkit.filters import buffer_has_focus
|
8
|
+
|
9
|
+
from euporie.core.app.current import get_app
|
10
|
+
from euporie.core.commands import add_cmd
|
11
|
+
from euporie.core.filters import tab_has_focus
|
12
|
+
|
13
|
+
if TYPE_CHECKING:
|
14
|
+
from prompt_toolkit.key_binding.key_processor import KeyPressEvent
|
15
|
+
|
16
|
+
|
17
|
+
@add_cmd(aliases=["q"])
|
18
|
+
def _quit() -> None:
|
19
|
+
"""Quit euporie."""
|
20
|
+
get_app().exit()
|
21
|
+
|
22
|
+
|
23
|
+
@add_cmd(aliases=["wq", "x"])
|
24
|
+
def _save_and_quit(event: KeyPressEvent) -> None:
|
25
|
+
"""Save the current tab then quits euporie."""
|
26
|
+
from upath import UPath
|
27
|
+
|
28
|
+
app = get_app()
|
29
|
+
if (tab := get_app().tab) is not None:
|
30
|
+
try:
|
31
|
+
tab._save(UPath(event._arg) if event._arg else None)
|
32
|
+
except NotImplementedError:
|
33
|
+
pass
|
34
|
+
app.exit()
|
35
|
+
|
36
|
+
|
37
|
+
@add_cmd(aliases=["bc"], filter=tab_has_focus, menu_title="Close File")
|
38
|
+
def _close_tab() -> None:
|
39
|
+
"""Close the current tab."""
|
40
|
+
get_app().close_tab()
|
41
|
+
|
42
|
+
|
43
|
+
@add_cmd(aliases=["bn"], filter=tab_has_focus)
|
44
|
+
def _next_tab() -> None:
|
45
|
+
"""Switch to the next tab."""
|
46
|
+
get_app().tab_idx += 1
|
47
|
+
|
48
|
+
|
49
|
+
@add_cmd(aliases=["bp"], filter=tab_has_focus)
|
50
|
+
def _previous_tab() -> None:
|
51
|
+
"""Switch to the previous tab."""
|
52
|
+
get_app().tab_idx -= 1
|
53
|
+
|
54
|
+
|
55
|
+
@add_cmd(filter=~buffer_has_focus)
|
56
|
+
def _focus_next() -> None:
|
57
|
+
"""Focus the next control."""
|
58
|
+
get_app().layout.focus_next()
|
59
|
+
|
60
|
+
|
61
|
+
@add_cmd(filter=~buffer_has_focus)
|
62
|
+
def _focus_previous() -> None:
|
63
|
+
"""Focus the previous control."""
|
64
|
+
get_app().layout.focus_previous()
|
65
|
+
|
66
|
+
|
67
|
+
@add_cmd()
|
68
|
+
def _clear_screen() -> None:
|
69
|
+
"""Clear the screen."""
|
70
|
+
get_app().renderer.clear()
|
@@ -0,0 +1,427 @@
|
|
1
|
+
"""Defines application settings."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import json
|
6
|
+
|
7
|
+
from pygments.styles import STYLE_MAP as pygments_styles
|
8
|
+
from upath import UPath
|
9
|
+
|
10
|
+
from euporie.core.config import add_setting
|
11
|
+
from euporie.core.filters import in_mplex
|
12
|
+
|
13
|
+
# euporie.core.app.launch
|
14
|
+
|
15
|
+
|
16
|
+
def _euporie_core_launch_app_choices() -> list[str]:
|
17
|
+
"""List known euporie-apps and their aliases."""
|
18
|
+
from euporie.core.__main__ import available_apps
|
19
|
+
from euporie.core.app import APP_ALIASES
|
20
|
+
|
21
|
+
return sorted(
|
22
|
+
{entry.name for entry in available_apps().values()} - {"launch"}
|
23
|
+
| APP_ALIASES.keys()
|
24
|
+
)
|
25
|
+
|
26
|
+
|
27
|
+
add_setting(
|
28
|
+
name="app",
|
29
|
+
group="euporie.core.app.launch",
|
30
|
+
flags=["app"],
|
31
|
+
type_=str,
|
32
|
+
help_="The application to launch",
|
33
|
+
choices=_euporie_core_launch_app_choices,
|
34
|
+
description="""
|
35
|
+
The name of the application to launch.
|
36
|
+
""",
|
37
|
+
)
|
38
|
+
|
39
|
+
# euporie.core.app
|
40
|
+
|
41
|
+
add_setting(
|
42
|
+
name="files",
|
43
|
+
group="euporie.core.app.app",
|
44
|
+
default=[],
|
45
|
+
flags=["files"],
|
46
|
+
nargs="*",
|
47
|
+
type_=UPath,
|
48
|
+
help_="List of file names to open",
|
49
|
+
schema={
|
50
|
+
"type": "array",
|
51
|
+
"items": {
|
52
|
+
"description": "File path",
|
53
|
+
"type": "string",
|
54
|
+
},
|
55
|
+
},
|
56
|
+
description="""
|
57
|
+
A list of file paths to open when euporie is launched.
|
58
|
+
""",
|
59
|
+
)
|
60
|
+
|
61
|
+
add_setting(
|
62
|
+
name="edit_mode",
|
63
|
+
group="euporie.core.app.app",
|
64
|
+
flags=["--edit-mode"],
|
65
|
+
type_=str,
|
66
|
+
choices=["micro", "emacs", "vi"],
|
67
|
+
title="Editor key bindings",
|
68
|
+
help_="Key-binding mode for text editing",
|
69
|
+
default="micro",
|
70
|
+
description="""
|
71
|
+
Key binding style to use when editing cells.
|
72
|
+
""",
|
73
|
+
)
|
74
|
+
|
75
|
+
add_setting(
|
76
|
+
name="tab_size",
|
77
|
+
group="euporie.core.app.app",
|
78
|
+
flags=["--tab-size"],
|
79
|
+
type_=int,
|
80
|
+
help_="Spaces per indentation level",
|
81
|
+
default=4,
|
82
|
+
schema={
|
83
|
+
"minimum": 1,
|
84
|
+
},
|
85
|
+
description="""
|
86
|
+
The number of spaces to use per indentation level. Should be set to 4.
|
87
|
+
""",
|
88
|
+
)
|
89
|
+
|
90
|
+
add_setting(
|
91
|
+
name="terminal_polling_interval",
|
92
|
+
group="euporie.core.app.app",
|
93
|
+
flags=["--terminal-polling-interval"],
|
94
|
+
type_=float,
|
95
|
+
help_="Time between terminal colour queries",
|
96
|
+
default=0.0,
|
97
|
+
schema={
|
98
|
+
"min": 0.0,
|
99
|
+
},
|
100
|
+
description="""
|
101
|
+
Determine how frequently the terminal should be polled for changes to the
|
102
|
+
background / foreground colours. Set to zero to disable terminal polling.
|
103
|
+
""",
|
104
|
+
)
|
105
|
+
|
106
|
+
add_setting(
|
107
|
+
name="formatters",
|
108
|
+
group="euporie.core.app.app",
|
109
|
+
flags=["--formatters"],
|
110
|
+
type_=json.loads,
|
111
|
+
help_="List of external code formatters",
|
112
|
+
default=[
|
113
|
+
# {"command": ["ruff", "format", "-"], "languages": ["python"]},
|
114
|
+
# {"command": ["black", "-"], "languages": ["python"]},
|
115
|
+
# {"command": ["isort", "-"], "languages": ["python"]},
|
116
|
+
],
|
117
|
+
action="append",
|
118
|
+
schema={
|
119
|
+
"type": "array",
|
120
|
+
"items": {
|
121
|
+
"type": "object",
|
122
|
+
"properties": {
|
123
|
+
"command": {
|
124
|
+
"type": "array",
|
125
|
+
"items": [{"type": "string"}],
|
126
|
+
},
|
127
|
+
"languages": {
|
128
|
+
"type": "array",
|
129
|
+
"items": [{"type": "string", "unique": True}],
|
130
|
+
},
|
131
|
+
},
|
132
|
+
"required": ["command", "languages"],
|
133
|
+
},
|
134
|
+
},
|
135
|
+
description="""
|
136
|
+
An array listing languages and commands of formatters to use for
|
137
|
+
reformatting code cells. The command is an array of the command any any
|
138
|
+
arguments. Code to be formatted is pass in via the standard input, and
|
139
|
+
replaced with the standard output.
|
140
|
+
|
141
|
+
e.g.
|
142
|
+
|
143
|
+
[
|
144
|
+
{"command": ["ruff", "format", "-"], "languages": ["python"]},
|
145
|
+
{"command": ["black", "-"], "languages": ["python"]},
|
146
|
+
{"command": ["isort", "-"], "languages": ["python"]}
|
147
|
+
]
|
148
|
+
""",
|
149
|
+
)
|
150
|
+
|
151
|
+
add_setting(
|
152
|
+
name="syntax_highlighting",
|
153
|
+
group="euporie.core.app.base",
|
154
|
+
flags=["--syntax-highlighting"],
|
155
|
+
type_=bool,
|
156
|
+
help_="Syntax highlighting",
|
157
|
+
default=True,
|
158
|
+
description="""
|
159
|
+
Enable or disable syntax highlighting in code input fields.
|
160
|
+
""",
|
161
|
+
)
|
162
|
+
|
163
|
+
add_setting(
|
164
|
+
name="syntax_theme",
|
165
|
+
group="euporie.core.app.base",
|
166
|
+
flags=["--syntax-theme"],
|
167
|
+
type_=str,
|
168
|
+
help_="Syntax highlighting theme",
|
169
|
+
default="euporie",
|
170
|
+
schema={
|
171
|
+
# Do not want to print all theme names in `--help` screen as it looks messy
|
172
|
+
# so we only add them in the scheme, not as setting choices
|
173
|
+
"enum": ["euporie", *pygments_styles.keys()],
|
174
|
+
},
|
175
|
+
description="""
|
176
|
+
The name of the pygments style to use for syntax highlighting.
|
177
|
+
""",
|
178
|
+
)
|
179
|
+
|
180
|
+
add_setting(
|
181
|
+
name="color_depth",
|
182
|
+
group="euporie.core.app.app",
|
183
|
+
flags=["--color-depth"],
|
184
|
+
type_=int,
|
185
|
+
choices=[1, 4, 8, 24],
|
186
|
+
default=None,
|
187
|
+
help_="The color depth to use",
|
188
|
+
description="""
|
189
|
+
The number of bits to use to represent colors displayable on the screen.
|
190
|
+
If set to None, the supported color depth of the terminal will be detected
|
191
|
+
automatically.
|
192
|
+
""",
|
193
|
+
)
|
194
|
+
|
195
|
+
add_setting(
|
196
|
+
name="multiplexer_passthrough",
|
197
|
+
group="euporie.core.app.app",
|
198
|
+
flags=["--multiplexer-passthrough"],
|
199
|
+
type_=bool,
|
200
|
+
help_="Use passthrough from within terminal multiplexers",
|
201
|
+
default=False,
|
202
|
+
hidden=~in_mplex,
|
203
|
+
description="""
|
204
|
+
If set and euporie is running inside a terminal multiplexer
|
205
|
+
(:program:`screen` or :program:`tmux`), then certain escape sequences
|
206
|
+
will be passed-through the multiplexer directly to the terminal.
|
207
|
+
|
208
|
+
This affects things such as terminal color detection and graphics display.
|
209
|
+
|
210
|
+
for tmux, you will also need to ensure that ``allow-passthrough`` is set to
|
211
|
+
``on`` in your :program:`tmux` configuration.
|
212
|
+
|
213
|
+
.. warning::
|
214
|
+
|
215
|
+
Terminal graphics in :program:`tmux` is experimental, and is not
|
216
|
+
guaranteed to work. Use at your own risk!
|
217
|
+
|
218
|
+
.. note::
|
219
|
+
As of version :command:`tmux` version ``3.4`` sixel graphics are
|
220
|
+
supported, which may result in better terminal graphics then using
|
221
|
+
multiplexer passthrough.
|
222
|
+
""",
|
223
|
+
)
|
224
|
+
|
225
|
+
add_setting(
|
226
|
+
name="color_scheme",
|
227
|
+
group="euporie.core.app.app",
|
228
|
+
flags=["--color-scheme"],
|
229
|
+
type_=str,
|
230
|
+
choices=["default", "inverse", "light", "dark", "black", "white", "custom"],
|
231
|
+
help_="The color scheme to use",
|
232
|
+
default="default",
|
233
|
+
description="""
|
234
|
+
The color scheme to use: `auto` means euporie will try to use your
|
235
|
+
terminal's color scheme, `light` means black text on a white background,
|
236
|
+
and `dark` means white text on a black background.
|
237
|
+
""",
|
238
|
+
)
|
239
|
+
|
240
|
+
add_setting(
|
241
|
+
name="custom_background_color",
|
242
|
+
group="euporie.core.app.app",
|
243
|
+
flags=["--custom-background-color", "--custom-bg-color", "--bg"],
|
244
|
+
type_=str,
|
245
|
+
help_='Background color for "Custom" color theme',
|
246
|
+
default="#073642",
|
247
|
+
schema={
|
248
|
+
"maxLength": 7,
|
249
|
+
},
|
250
|
+
description="""
|
251
|
+
The hex code of the color to use for the background in the "Custom" color
|
252
|
+
scheme.
|
253
|
+
""",
|
254
|
+
)
|
255
|
+
|
256
|
+
add_setting(
|
257
|
+
name="custom_foreground_color",
|
258
|
+
group="euporie.core.app.app",
|
259
|
+
flags=["--custom-foreground-color", "--custom-fg-color", "--fg"],
|
260
|
+
type_=str,
|
261
|
+
help_='Foreground color for "Custom" color theme',
|
262
|
+
default="#839496",
|
263
|
+
schema={
|
264
|
+
"maxLength": 7,
|
265
|
+
},
|
266
|
+
description="""
|
267
|
+
The hex code of the color to use for the foreground in the "Custom" color
|
268
|
+
scheme.
|
269
|
+
""",
|
270
|
+
)
|
271
|
+
|
272
|
+
add_setting(
|
273
|
+
name="accent_color",
|
274
|
+
group="euporie.core.app.app",
|
275
|
+
flags=["--accent-color"],
|
276
|
+
type_=str,
|
277
|
+
help_="Accent color to use in the app",
|
278
|
+
default="ansiblue",
|
279
|
+
description="""
|
280
|
+
The hex code of a color to use for the accent color in the application.
|
281
|
+
""",
|
282
|
+
)
|
283
|
+
|
284
|
+
add_setting(
|
285
|
+
name="key_bindings",
|
286
|
+
group="euporie.core.app.app",
|
287
|
+
flags=["--key-bindings"],
|
288
|
+
type_=json.loads,
|
289
|
+
help_="Additional key binding definitions",
|
290
|
+
default={},
|
291
|
+
description="""
|
292
|
+
A mapping of component names to mappings of command name to key-binding lists.
|
293
|
+
""",
|
294
|
+
schema={
|
295
|
+
"type": "object",
|
296
|
+
},
|
297
|
+
)
|
298
|
+
|
299
|
+
add_setting(
|
300
|
+
name="graphics",
|
301
|
+
group="euporie.core.app.app",
|
302
|
+
flags=["--graphics"],
|
303
|
+
choices=["none", "sixel", "kitty", "iterm"],
|
304
|
+
type_=str,
|
305
|
+
default=None,
|
306
|
+
help_="The preferred graphics protocol",
|
307
|
+
description="""
|
308
|
+
The graphics protocol to use, if supported by the terminal.
|
309
|
+
If set to "none", terminal graphics will not be used.
|
310
|
+
""",
|
311
|
+
)
|
312
|
+
|
313
|
+
add_setting(
|
314
|
+
name="force_graphics",
|
315
|
+
group="euporie.core.app.app",
|
316
|
+
flags=["--force-graphics"],
|
317
|
+
type_=bool,
|
318
|
+
default=False,
|
319
|
+
help_="Force use of specified graphics protocol",
|
320
|
+
description="""
|
321
|
+
When set to :py:const:`True`, the graphics protocol specified by the
|
322
|
+
:option:`graphics` configuration option will be used even if the terminal
|
323
|
+
does not support it.
|
324
|
+
|
325
|
+
This is also useful if you want to use graphics in :command:`euporie-hub`.
|
326
|
+
""",
|
327
|
+
)
|
328
|
+
|
329
|
+
add_setting(
|
330
|
+
name="enable_language_servers",
|
331
|
+
group="euporie.core.app.app",
|
332
|
+
flags=["--enable-language-servers", "--lsp"],
|
333
|
+
menu_title="Language servers",
|
334
|
+
type_=bool,
|
335
|
+
default=False,
|
336
|
+
help_="Enable language server support",
|
337
|
+
description="""
|
338
|
+
When set to :py:const:`True`, language servers will be used for liniting,
|
339
|
+
code inspection, and code formatting.
|
340
|
+
|
341
|
+
Additional language servers can be added using the
|
342
|
+
:option:`language-servers` option.
|
343
|
+
""",
|
344
|
+
)
|
345
|
+
|
346
|
+
add_setting(
|
347
|
+
name="language_servers",
|
348
|
+
group="euporie.core.app.app",
|
349
|
+
flags=["--language-servers"],
|
350
|
+
type_=json.loads,
|
351
|
+
help_="Language server configurations",
|
352
|
+
default={},
|
353
|
+
schema={
|
354
|
+
"type": "object",
|
355
|
+
"items": {
|
356
|
+
"type": "object",
|
357
|
+
"patternProperties": {
|
358
|
+
"^[0-9]+$": {
|
359
|
+
"type": "object",
|
360
|
+
"properties": {
|
361
|
+
"command": {
|
362
|
+
"type": "array",
|
363
|
+
"items": [{"type": "string"}],
|
364
|
+
},
|
365
|
+
"language": {
|
366
|
+
"type": "array",
|
367
|
+
"items": [{"type": "string", "unique": True}],
|
368
|
+
},
|
369
|
+
},
|
370
|
+
"required": ["command"],
|
371
|
+
}
|
372
|
+
},
|
373
|
+
},
|
374
|
+
},
|
375
|
+
description="""
|
376
|
+
Additional language servers can be defined here, e.g.:
|
377
|
+
|
378
|
+
{
|
379
|
+
"ruff": {"command": ["ruff-lsp"], "languages": ["python"]},
|
380
|
+
"pylsp": {"command": ["pylsp"], "languages": ["python"]},
|
381
|
+
"typos": {"command": ["typos-lsp"], "languages": []}
|
382
|
+
}
|
383
|
+
|
384
|
+
The following properties are required:
|
385
|
+
- The name to be given to the the language server, must be unique
|
386
|
+
- The command list consists of the process to launch, followed by any
|
387
|
+
command line arguments
|
388
|
+
- A list of language the language server supports. If no languages are
|
389
|
+
given, the language server will be used for documents of any language.
|
390
|
+
|
391
|
+
To disable one of the default language servers, its name can be set to an
|
392
|
+
empty dictionary. For example, the following would disable the awk language
|
393
|
+
server:
|
394
|
+
|
395
|
+
{
|
396
|
+
"awk-language-server": {},
|
397
|
+
}
|
398
|
+
""",
|
399
|
+
)
|
400
|
+
|
401
|
+
# euporie.core.app.cursor
|
402
|
+
|
403
|
+
add_setting(
|
404
|
+
name="set_cursor_shape",
|
405
|
+
group="euporie.core.app.cursor",
|
406
|
+
flags=["--set-cursor-shape"],
|
407
|
+
type_=bool,
|
408
|
+
default=True,
|
409
|
+
menu_title="Change cursor shape",
|
410
|
+
help_="Whether to set the shape of the cursor depending on the editing mode",
|
411
|
+
description="""
|
412
|
+
When set to True, the euporie will set the shape of the terminal's cursor
|
413
|
+
to a beam in insert mode and and underline in replace mode when editing.
|
414
|
+
""",
|
415
|
+
)
|
416
|
+
|
417
|
+
add_setting(
|
418
|
+
name="cursor_blink",
|
419
|
+
group="euporie.core.app.cursor",
|
420
|
+
flags=["--cursor-blink"],
|
421
|
+
type_=bool,
|
422
|
+
default=False,
|
423
|
+
help_="Whether to blink the cursor",
|
424
|
+
description="""
|
425
|
+
When set to True, the cursor will blink.
|
426
|
+
""",
|
427
|
+
)
|