This repository has been archived by the owner on Mar 18, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hover source code intel tooltips (#423)
* dummy * add code intelligence source alerts to the code intel extensions * make code intelligence source alerts language aware * improve structure * style fixes * bump sg version * bump extension-api-stubs * yarn deduplicate * yarn update-graphql-schema * hover text -> hover data
- Loading branch information
Showing
11 changed files
with
243 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import * as sourcegraph from 'sourcegraph' | ||
|
||
export const lsif: sourcegraph.Badged<sourcegraph.HoverAlert>[] = [ | ||
{ | ||
summary: { | ||
kind: sourcegraph.MarkupKind.Markdown, | ||
value: 'Semantic result. [Learn more.](https://docs.sourcegraph.com/user/code_intelligence/lsif)', | ||
}, | ||
badge: { | ||
kind: 'info', | ||
hoverMessage: | ||
"This hover data comes from a pre-computed semantic index of this project's source. Click to learn how to add this capability to all of your projects!", | ||
linkURL: 'https://docs.sourcegraph.com/user/code_intelligence/lsif', | ||
}, | ||
type: 'LSIFAvailableNoCaveat', | ||
}, | ||
] | ||
|
||
export const lsp: sourcegraph.Badged<sourcegraph.HoverAlert>[] = [ | ||
{ | ||
summary: { | ||
kind: sourcegraph.MarkupKind.Markdown, | ||
value: 'Language server result. [Get LSIF.](https://docs.sourcegraph.com/user/code_intelligence/lsif)', | ||
}, | ||
badge: { | ||
kind: 'info', | ||
hoverMessage: | ||
'This hover data comes from a language server running in the cloud. Click to learn how to improve the reliability of this result by enabling semantic indexing.', | ||
linkURL: 'https://docs.sourcegraph.com/user/code_intelligence/lsif', | ||
}, | ||
}, | ||
] | ||
|
||
export const searchLSIFSupportRobust: sourcegraph.Badged<sourcegraph.HoverAlert>[] = [ | ||
{ | ||
summary: { | ||
kind: sourcegraph.MarkupKind.Markdown, | ||
value: 'Search-based result. [Get semantics.](https://docs.sourcegraph.com/user/code_intelligence/lsif)', | ||
}, | ||
badge: { | ||
kind: 'info', | ||
hoverMessage: | ||
'This hover data is generated by a heuristic text-based search. Click to learn how to make these results precise by enabling semantic indexing for this project.', | ||
linkURL: 'https://docs.sourcegraph.com/user/code_intelligence/lsif', | ||
}, | ||
}, | ||
] | ||
|
||
export const searchLSIFSupportExperimental: sourcegraph.Badged<sourcegraph.HoverAlert>[] = [ | ||
{ | ||
summary: { | ||
kind: sourcegraph.MarkupKind.Markdown, | ||
value: 'Search-based result. [Learn more.](https://docs.sourcegraph.com/user/code_intelligence/lsif)', | ||
}, | ||
badge: { | ||
kind: 'info', | ||
hoverMessage: | ||
"This hover data is generated by a heuristic text-based search. Existing semantic indexers for this language aren't totally robust yet, but you can click here to learn how to give them a try.", | ||
linkURL: 'https://docs.sourcegraph.com/user/code_intelligence/lsif', | ||
}, | ||
type: 'SearchResultExperimentalLSIFSupport', | ||
}, | ||
] | ||
|
||
export const searchLSIFSupportNone: sourcegraph.Badged<sourcegraph.HoverAlert>[] = [ | ||
{ | ||
summary: { | ||
kind: sourcegraph.MarkupKind.Markdown, | ||
value: 'Search-based result. [Learn more.](https://docs.sourcegraph.com/user/code_intelligence/lsif)', | ||
}, | ||
type: 'SearchResultNoLSIFSupport', | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.