Skip to content

Commit

Permalink
fix local editor flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mikew committed Oct 6, 2024
1 parent dbf73d3 commit 8926153
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ var CliClientOpenCommand = cli.Command{
&cli.StringSliceFlag{
Name: "local-editor",
Usage: "Local editor to use. `{{SOCKET_PATH}}` will be replaced with the socket path",
Value: cli.NewStringSlice("nvim", "--server", "{{SOCKET_PATH}}", "--remote-ui"),
},
},

Expand All @@ -51,7 +52,7 @@ var CliClientOpenCommand = cli.Command{
server := c.Args().Get(0)
directory := c.Args().Get(1)
serverEnvPairs := c.StringSlice("server-env")
localEditor := c.StringSlice("server-env")
localEditor := c.StringSlice("local-editor")

if server == "" {
return fmt.Errorf("<server> is required")
Expand Down Expand Up @@ -126,10 +127,6 @@ func startLocalEditor(socketPath string, args []string) {
replacedArgs[i] = strings.Replace(arg, "{{SOCKET_PATH}}", socketPath, -1)
}

if len(replacedArgs) == 0 {
replacedArgs = []string{"nvim", "--server", socketPath, "--remote-ui"}
}

log.Printf("Starting local editor: %v", replacedArgs)

// editorCommand := exec.Command("nvim-qt", "--server", socketPath)
Expand Down

0 comments on commit 8926153

Please sign in to comment.