Skip to content

Commit

Permalink
lsp: Identify Zed editor client (StyraInc#742)
Browse files Browse the repository at this point in the history
Signed-off-by: Charlie Egan <charlie@styra.com>
  • Loading branch information
charlieegan3 authored and srenatus committed Oct 1, 2024
1 parent e932e1b commit ecebc53
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/lsp/clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ const (
IdentifierGeneric Identifier = iota
IdentifierVSCode
IdentifierGoTest
IdentifierZed
)

func DetermineClientIdentifier(clientName string) Identifier {
if clientName == "go test" {
switch clientName {
case "go test":
return IdentifierGoTest
}

if clientName == "Visual Studio Code" {
case "Visual Studio Code":
return IdentifierVSCode
case "Zed":
return IdentifierZed
}

return IdentifierGeneric
Expand Down

0 comments on commit ecebc53

Please sign in to comment.