Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] client: add command to restart server #172

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[IMP] client: add command to restart server
mmahrouss committed Jan 8, 2025
commit 3cd10f2bbfe742c1ab0703443325fd75ea8a586a
8 changes: 7 additions & 1 deletion vscode/client/extension.ts
Original file line number Diff line number Diff line change
@@ -711,7 +711,13 @@ async function initializeSubscriptions(context: ExtensionContext): Promise<void>
}),
commands.registerCommand(
"odoo.disablePythonLanguageServerCommand", setPythonLSNone
)
),
commands.registerCommand(
"odoo.restartServer", async () => {
if (global.LSCLIENT) {
global.LSCLIENT.restart();
}
})
);

if (context.extensionMode === ExtensionMode.Development) {
5 changes: 5 additions & 0 deletions vscode/package.json
Original file line number Diff line number Diff line change
@@ -62,6 +62,11 @@
"command": "odoo.disablePythonLanguageServerCommand",
"title": "Set Python extension LanugageServer to None (Does nothing if python extension is not active)",
"category": "Odoo"
},
{
"command": "odoo.restartServer",
"title": "Restart Language Server",
"category": "Odoo"
}
],
"views": {},