def start_server(server_binary_args, working_dir, env):
debug("starting " + str(server_binary_args))
si = None
if os.name == "nt":
si = subprocess.STARTUPINFO() # type: ignore
si.dwFlags |= subprocess.SW_HIDE | subprocess.STARTF_USESHOWWINDOW # type: ignore
try:
process = subprocess.Popen(
server_binary_args,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=working_dir,
env=env,
startupinfo=si)
return Client(process, working_dir)
except Exception as err:
sublime.status_message("Failed to start LSP server {}".format(str(server_binary_args)))
exception_log("Failed to start server", err)
评论列表
文章目录