Skip to content

Commit b6ce999

Browse files
authored
feat: Add codegen lsp (#491)
1 parent 0d15c10 commit b6ce999

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ dependencies = [
7070
"numpy>=2.2.2",
7171
"mcp[cli]",
7272
"neo4j",
73+
"pygls>=2.0.0a2",
74+
"lsprotocol==2024.0.0b1",
75+
"attrs>=25.1.0",
7376
]
7477

7578
license = { text = "Apache-2.0" }
@@ -117,7 +120,6 @@ types = [
117120
"types-requests>=2.32.0.20241016",
118121
"types-toml>=0.10.8.20240310",
119122
]
120-
lsp = ["pygls>=2.0.0a2", "lsprotocol==2024.0.0b1", "attrs>=25.1.0"]
121123
[tool.uv]
122124
cache-keys = [{ git = { commit = true, tags = true } }]
123125
dev-dependencies = [

src/codegen/cli/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from codegen.cli.commands.list.main import list_command
1010
from codegen.cli.commands.login.main import login_command
1111
from codegen.cli.commands.logout.main import logout_command
12+
from codegen.cli.commands.lsp.lsp import lsp_command
1213
from codegen.cli.commands.notebook.main import notebook_command
1314
from codegen.cli.commands.profile.main import profile_command
1415
from codegen.cli.commands.reset.main import reset_command
@@ -43,7 +44,7 @@ def main():
4344
main.add_command(reset_command)
4445
main.add_command(update_command)
4546
main.add_command(config_command)
46-
47+
main.add_command(lsp_command)
4748

4849
if __name__ == "__main__":
4950
main()

src/codegen/cli/commands/lsp/lsp.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import logging
2+
3+
import click
4+
5+
from codegen.extensions.lsp.lsp import server
6+
7+
8+
@click.command(name="lsp")
9+
def lsp_command():
10+
logging.basicConfig(level=logging.INFO)
11+
server.start_io()

uv.lock

Lines changed: 6 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)