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 = [
70
70
" numpy>=2.2.2" ,
71
71
" mcp[cli]" ,
72
72
" neo4j" ,
73
- " pygls>=2.0.0a2" ,
74
- " lsprotocol==2024.0.0b1" ,
75
- " attrs>=25.1.0" ,
76
73
]
77
74
78
75
license = { text = " Apache-2.0" }
@@ -120,6 +117,7 @@ types = [
120
117
" types-requests>=2.32.0.20241016" ,
121
118
" types-toml>=0.10.8.20240310" ,
122
119
]
120
+ lsp = [" pygls>=2.0.0a2" , " lsprotocol==2024.0.0b1" , " attrs>=25.1.0" ]
123
121
[tool .uv ]
124
122
cache-keys = [{ git = { commit = true , tags = true } }]
125
123
dev-dependencies = [
@@ -162,7 +160,6 @@ dev-dependencies = [
162
160
" pytest-lsp>=1.0.0b1" ,
163
161
]
164
162
165
-
166
163
[tool .uv .workspace ]
167
164
exclude = [" codegen-examples" ]
168
165
Original file line number Diff line number Diff line change 2
2
3
3
import click
4
4
5
- from codegen . extensions . lsp . lsp import server
5
+ logger = logging . getLogger ( __name__ )
6
6
7
7
8
8
@click .command (name = "lsp" )
9
9
def 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
10
15
logging .basicConfig (level = logging .INFO )
11
16
server .start_io ()
You can’t perform that action at this time.
0 commit comments