-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.toml
More file actions
89 lines (74 loc) · 3 KB
/
config.toml
File metadata and controls
89 lines (74 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Configuration for integrating md_agent.py with an editor+LSP
theme = "default"
[editor]
line-number = "relative"
mouse = true
bufferline = "always"
[editor.statusline]
left = ["mode", "spinner"]
center = ["file-name"]
right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"]
[editor.lsp]
display-messages = true
auto-signature-help = true
display-inlay-hints = true
# Custom keybindings for md_agent integration
[keys.normal]
# Agent-specific commands
"space" = { a = ":lsp-code-action", e = ":md-extract", i = ":md-inline", x = ":md-execute" }
# Language-specific configuration for Markdown
[[language]]
name = "markdown"
scope = "source.md"
injection-regex = "md|markdown"
file-types = ["md", "markdown", "PULLREQ_EDITMSG", "gitcommit", "COMMIT_EDITMSG"]
roots = [".git", ".hg"]
language-id = "markdown"
# LSP configuration for markdown with iwe
[language-server.iwe]
command = "iwe"
args = ["lsp"]
environment = { "RUST_LOG" = "info" }
# Custom code actions for md_agent
[[language.markdown.code_actions]]
trigger = "extract"
command = "python3"
args = ["/path/to/md_agent.py", "extract"]
description = "Extract markdown section with embedded Python agent"
[[language.markdown.code_actions]]
trigger = "inline"
command = "python3"
args = ["/path/to/md_agent.py", "inline"]
description = "Inline previously extracted section"
[[language.markdown.code_actions]]
trigger = "execute"
command = "python3"
args = ["/path/to/md_agent.py", "execute"]
description = "Execute embedded Python agent"
# Custom commands for the md_agent
[commands]
md-extract = { command = "sh", args = ["-c", "python3 /path/to/md_agent.py extract \"$1\" \"$2\" \"$3\""], description = "Extract markdown section" }
md-inline = { command = "sh", args = ["-c", "python3 /path/to/md_agent.py inline \"$1\" \"$2\""], description = "Inline extracted section" }
md-execute = { command = "sh", args = ["-c", "python3 /path/to/md_agent.py execute \"$1\" \"$2\""], description = "Execute Python agent" }
md-list = { command = "sh", args = ["-c", "python3 /path/to/md_agent.py list"], description = "List all extracted notes" }
# Python language configuration (for generated agents)
[[language]]
name = "python"
scope = "source.python"
injection-regex = "python"
file-types = ["py", "pyi", "py3", "pyw", "ptl", "rpy", "cpy", "ipy", "pyt", "bzl", "build", "bazel", "ws", "star", "SConstruct", "SConscript", "snakefile", "smk", "Snakefile", "Pipfile"]
shebangs = ["python", "python3", "python2", "python3.10", "python3.11"]
roots = ["pyproject.toml", "setup.py", "poetry.lock", "requirements.txt", ".git"]
comment-token = "#"
language-id = "python"
indent = { tab-width = 4, unit = " " }
[language-server.pylsp]
command = "pylsp"
config = {}
[[language]]
name = "python"
language-servers = [ "pylsp" ]
[[language]]
name = "python"
file-types = ["py", "pyi", "py3", "pyw", "ptl", "rpy", "cpy", "ipy", "pyt", "bzl", "build", "bazel", "ws", "star", "SConstruct", "SConscript", "snakefile", "smk", "Snakefile", "Pipfile", "ontology"]
comment-token = "#"