mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-02 14:30:29 +00:00
wip: vscode extension
This commit is contained in:
parent
6d2ffa82de
commit
80b17dab44
2 changed files with 13 additions and 4 deletions
|
|
@ -2,6 +2,7 @@ package commands
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea/v2"
|
||||
|
|
@ -76,6 +77,10 @@ func (c *commandsComponent) View() string {
|
|||
}
|
||||
|
||||
if c.showVscode {
|
||||
ctrlKey := "ctrl"
|
||||
if runtime.GOOS == "darwin" {
|
||||
ctrlKey = "cmd"
|
||||
}
|
||||
commandsToShow = append(commandsToShow,
|
||||
// empty line
|
||||
commands.Command{
|
||||
|
|
@ -86,14 +91,14 @@ func (c *commandsComponent) View() string {
|
|||
Name: commands.CommandName(util.Ide()),
|
||||
Description: "open opencode",
|
||||
Keybindings: []commands.Keybinding{
|
||||
{Key: "cmd+esc", RequiresLeader: false},
|
||||
{Key: ctrlKey + "+esc", RequiresLeader: false},
|
||||
},
|
||||
},
|
||||
commands.Command{
|
||||
Name: commands.CommandName(util.Ide()),
|
||||
Description: "reference file",
|
||||
Keybindings: []commands.Keybinding{
|
||||
{Key: "cmd+opt+k", RequiresLeader: false},
|
||||
{Key: ctrlKey + "+opt+k", RequiresLeader: false},
|
||||
},
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue