Skip to content

Commit

Permalink
feat: Add codegen lsp (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
bagel897 authored Feb 13, 2025
1 parent 0d15c10 commit b6ce999
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ dependencies = [
"numpy>=2.2.2",
"mcp[cli]",
"neo4j",
"pygls>=2.0.0a2",
"lsprotocol==2024.0.0b1",
"attrs>=25.1.0",
]

license = { text = "Apache-2.0" }
Expand Down Expand Up @@ -117,7 +120,6 @@ types = [
"types-requests>=2.32.0.20241016",
"types-toml>=0.10.8.20240310",
]
lsp = ["pygls>=2.0.0a2", "lsprotocol==2024.0.0b1", "attrs>=25.1.0"]
[tool.uv]
cache-keys = [{ git = { commit = true, tags = true } }]
dev-dependencies = [
Expand Down
3 changes: 2 additions & 1 deletion src/codegen/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from codegen.cli.commands.list.main import list_command
from codegen.cli.commands.login.main import login_command
from codegen.cli.commands.logout.main import logout_command
from codegen.cli.commands.lsp.lsp import lsp_command
from codegen.cli.commands.notebook.main import notebook_command
from codegen.cli.commands.profile.main import profile_command
from codegen.cli.commands.reset.main import reset_command
Expand Down Expand Up @@ -43,7 +44,7 @@ def main():
main.add_command(reset_command)
main.add_command(update_command)
main.add_command(config_command)

main.add_command(lsp_command)

if __name__ == "__main__":
main()
11 changes: 11 additions & 0 deletions src/codegen/cli/commands/lsp/lsp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import logging

import click

from codegen.extensions.lsp.lsp import server


@click.command(name="lsp")
def lsp_command():
logging.basicConfig(level=logging.INFO)
server.start_io()
14 changes: 6 additions & 8 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b6ce999

Please sign in to comment.