Skip to content

Commit

Permalink
base pr
Browse files Browse the repository at this point in the history
  • Loading branch information
go-wyvern committed Feb 11, 2022
1 parent e04eb10 commit 32a6ffc
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 12 deletions.
20 changes: 20 additions & 0 deletions media/goplus-logo-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions media/goplus-logo-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 22 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "go",
"name": "gop",
"displayName": "Go",
"version": "0.32.0-dev",
"version": "0.1.0-devv",
"preview": true,
"publisher": "golang",
"publisher": "goplus",
"description": "Rich Go language support for Visual Studio Code",
"author": {
"name": "Go Team at Google"
"name": "Goplus Team"
},
"license": "MIT",
"icon": "media/go-logo-blue.png",
Expand All @@ -25,10 +25,10 @@
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/golang/vscode-go"
"url": "https://github.com/goplus/vscode-gop"
},
"bugs": {
"url": "https://github.com/golang/vscode-go/issues"
"url": "https://github.com/goplus/vscode-gop/issues"
},
"keywords": [
"multi-root ready"
Expand Down Expand Up @@ -92,16 +92,21 @@
},
"activationEvents": [
"onLanguage:go",
"onLanguage:gop",
"workspaceContains:*.go",
"workspaceContains:*/*.go",
"workspaceContains:*/*/*.go",
"workspaceContains:*.gop",
"workspaceContains:*/*.gop",
"workspaceContains:*/*/*.gop",
"onCommand:go.gopath",
"onCommand:go.tools.install",
"onCommand:go.locate.tools",
"onCommand:go.show.commands",
"onCommand:go.run.modinit",
"onDebugInitialConfigurations",
"onDebugResolve:go",
"onDebugResolve:gop",
"onWebviewPanel:welcomeGo",
"onView:go.test.profile"
],
Expand Down Expand Up @@ -131,6 +136,17 @@
"Go"
]
},
{
"id": "gop",
"extensions": [
".gop",
".gox",
".spx"
],
"aliases": [
"Goplus"
]
},
{
"id": "go.mod",
"filenames": [
Expand Down
2 changes: 1 addition & 1 deletion src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
// For example, we replace this file with the version in the build/nightly.
// Make sure to reflect any changes in this file to build/nightly/const.ts.

export const extensionId = 'golang.go';
export const extensionId = 'goplus.gop';
8 changes: 4 additions & 4 deletions src/goLanguageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1022,14 +1022,14 @@ export function getLanguageServerToolPath(): string {
return;
}
// Get the path to gopls (getBinPath checks for alternate tools).
const goplsBinaryPath = getBinPath('gopls');
const goplsBinaryPath = getBinPath('goplsp');
if (path.isAbsolute(goplsBinaryPath)) {
return goplsBinaryPath;
}
const alternateTools = goConfig['alternateTools'];
if (alternateTools) {
// The user's alternate language server was not found.
const goplsAlternate = alternateTools['gopls'];
const goplsAlternate = alternateTools['goplsp'];
if (goplsAlternate) {
vscode.window.showErrorMessage(
`Cannot find the alternate tool ${goplsAlternate} configured for gopls.
Expand All @@ -1039,8 +1039,8 @@ Please install it and reload this VS Code window.`
}
}

// Prompt the user to install gopls.
promptForMissingTool('gopls');
// Prompt the user to install goplsp.
promptForMissingTool('goplsp');
}

function allFoldersHaveSameGopath(): boolean {
Expand Down
2 changes: 1 addition & 1 deletion src/goTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function getConfiguredTools(
// Even though we arranged this to run after the first attempt to start gopls
// this is still useful if we've fail to start gopls.
if (useLanguageServer) {
maybeAddTool('gopls');
maybeAddTool('goplsp');
}

if (goLiveErrorsEnabled()) {
Expand Down
14 changes: 14 additions & 0 deletions src/goToolsInformation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,20 @@ export const allToolsInformation: { [key: string]: Tool } = {
latestPrereleaseVersion: semver.parse('v0.7.5'),
latestPrereleaseVersionTimestamp: moment('2022-01-18', 'YYYY-MM-DD')
},
'goplsp': {
name: 'goplsp',
importPath: 'github.com/goplus/tools/goplsp',
modulePath: 'github.com/goplus/tools/goplsp',
replacedByGopls: false, // lol
isImportant: true,
description: 'Language Server from Goplus',
usePrereleaseInPreviewMode: true,
minimumGoVersion: semver.coerce('1.13'),
latestVersion: semver.parse('v0.1.3'),
latestVersionTimestamp: moment('2022-01-18', 'YYYY-MM-DD'),
latestPrereleaseVersion: semver.parse('v0.1.3'),
latestPrereleaseVersionTimestamp: moment('2022-01-18', 'YYYY-MM-DD')
},
'dlv': {
name: 'dlv',
importPath: 'github.com/go-delve/delve/cmd/dlv',
Expand Down

0 comments on commit 32a6ffc

Please sign in to comment.