File tree Expand file tree Collapse file tree 3 files changed +223
-203
lines changed
src/codegen/cli/commands/lsp Expand file tree Collapse file tree 3 files changed +223
-203
lines changed Original file line number Diff line number Diff line change @@ -70,9 +70,6 @@ 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" ,
7673]
7774
7875license = { text = " Apache-2.0" }
@@ -120,6 +117,7 @@ types = [
120117 " types-requests>=2.32.0.20241016" ,
121118 " types-toml>=0.10.8.20240310" ,
122119]
120+ lsp = [" pygls>=2.0.0a2" , " lsprotocol==2024.0.0b1" , " attrs>=25.1.0" ]
123121[tool .uv ]
124122cache-keys = [{ git = { commit = true , tags = true } }]
125123dev-dependencies = [
@@ -162,7 +160,6 @@ dev-dependencies = [
162160 " pytest-lsp>=1.0.0b1" ,
163161]
164162
165-
166163[tool .uv .workspace ]
167164exclude = [" codegen-examples" ]
168165
Original file line number Diff line number Diff line change 22
33import click
44
5- from codegen . extensions . lsp . lsp import server
5+ logger = logging . getLogger ( __name__ )
66
77
88@click .command (name = "lsp" )
99def lsp_command ():
10+ try :
11+ from codegen .extensions .lsp .lsp import server
12+ except ImportError :
13+ logger .exception ("LSP is not installed. Please install it with `uv tool install codegen[lsp]`" )
14+ return
1015 logging .basicConfig (level = logging .INFO )
1116 server .start_io ()
You can’t perform that action at this time.
0 commit comments