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

Add option to enable language server proxy (#32) #36

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CodeiumVS/LanguageServer/LanguageServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ await _package.LogAsync(

_process.StartInfo.Arguments =
$"--api_server_url {apiUrl} --manager_dir \"{managerDir}\" --database_dir \"{databaseDir}\"" +
" --enable_chat_web_server --enable_chat_client --detect_proxy=false";
$" --enable_chat_web_server --enable_chat_client --detect_proxy={_package.SettingsPage.EnableLanguageServerProxy}";

if (_package.SettingsPage.EnterpriseMode)
_process.StartInfo.Arguments +=
Expand Down
15 changes: 15 additions & 0 deletions CodeiumVS/SettingsPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class SettingsPage : DialogPage
private string portalUrl = "";
private string apiUrl = "";
private bool enableCommentCompletion = true;
private bool enableLanguageServerProxy = false;

[Category("Codeium")]
[DisplayName("Enterprise Mode")]
Expand Down Expand Up @@ -63,4 +64,18 @@ public bool EnableCommentCompletion
enableCommentCompletion = value;
}
}

[Category("Codeium")]
[DisplayName("Enable language server proxy")]
[Description(
"If you're experiencing network issues with the language server, we recommend enabling this option and using a VPN to resolve the issue. Requires restart.")]
public bool EnableLanguageServerProxy
{
get {
return enableLanguageServerProxy;
}
set {
enableLanguageServerProxy = value;
}
}
}
Loading