Skip to content

Commit

Permalink
Fix imports of language_server module
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Feb 26, 2025
1 parent d8c47d7 commit 80d7a53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion edb/tools/ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

from edb import buildmeta
from edb.tools.edb import edbcommands
from edb.language_server import main as ls_main


@edbcommands.command("ls")
Expand All @@ -34,6 +33,10 @@
help="Use stdio for LSP. This is currently the only transport.",
)
def main(*, version: bool, stdio: bool):
# import language_server only if we are using this command
# otherwise this breaks when pygls is not installed
from edb.language_server import main as ls_main

if version:
print(f"gel-ls, version {buildmeta.get_version()}")
sys.exit(0)
Expand Down

0 comments on commit 80d7a53

Please sign in to comment.