💄 more prominent tooltip
This commit is contained in:
parent
e0bd1fe89d
commit
a0c07d98cf
2 changed files with 5 additions and 7 deletions
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
|
@ -3,7 +3,6 @@
|
|||
"rust-analyzer.linkedProjects": ["./server/Cargo.toml"],
|
||||
"python.analysis.extraPaths": [],
|
||||
"python.autoComplete.extraPaths": [],
|
||||
"continue.showInlineTip": false,
|
||||
"python.testing.pytestArgs": ["server"],
|
||||
"python.testing.unittestEnabled": false,
|
||||
"python.testing.pytestEnabled": true
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@ import { getMetaKeyLabel } from "../util/util";
|
|||
const inlineTipDecoration = vscode.window.createTextEditorDecorationType({
|
||||
after: {
|
||||
contentText: `${getMetaKeyLabel()} M to select code, ${getMetaKeyLabel()} ⇧ L to edit`,
|
||||
color: "#c0c0c060",
|
||||
color: "#888",
|
||||
margin: "0 0 0 6em",
|
||||
fontWeight: "bold",
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -22,9 +23,7 @@ function handleSelectionChange(e: vscode.TextEditorSelectionChangeEvent) {
|
|||
return;
|
||||
}
|
||||
|
||||
const startLine = selection.start.line;
|
||||
|
||||
let lineToShow = startLine > 0 ? startLine - 1 : startLine + 1;
|
||||
const anchorLine = selection.anchor.line;
|
||||
|
||||
const hoverMarkdown = new vscode.MarkdownString(
|
||||
`Use ${getMetaKeyLabel()} M to select code, or ${getMetaKeyLabel()} ⇧ L to edit highlighted code. Click [here](command:continue.hideInlineTip) if you don't want to see these inline suggestions.`
|
||||
|
|
@ -34,8 +33,8 @@ function handleSelectionChange(e: vscode.TextEditorSelectionChangeEvent) {
|
|||
editor.setDecorations(inlineTipDecoration, [
|
||||
{
|
||||
range: new vscode.Range(
|
||||
new vscode.Position(lineToShow, Number.MAX_VALUE),
|
||||
new vscode.Position(lineToShow, Number.MAX_VALUE)
|
||||
new vscode.Position(anchorLine, Number.MAX_VALUE),
|
||||
new vscode.Position(anchorLine, Number.MAX_VALUE)
|
||||
),
|
||||
hoverMessage: [hoverMarkdown],
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue