Skip to content

Commit

Permalink
lsp: Add Neovim as known client identifier (#951)
Browse files Browse the repository at this point in the history
Fixes #950

Signed-off-by: Charlie Egan <charlie@styra.com>
  • Loading branch information
charlieegan3 authored Jul 30, 2024
1 parent 8a8b8ad commit 29f74d9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/lsp/clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ const (
IdentifierVSCode
IdentifierGoTest
IdentifierZed
IdentifierNeovim
)

// DetermineClientIdentifier is used to determine the Regal client identifier
// based on the client name.
// Clients with identifiers here should be featured on the 'Editor Support'
// page in the documentation (https://docs.styra.com/regal/editor-support).
func DetermineClientIdentifier(clientName string) Identifier {
switch clientName {
case "go test":
Expand All @@ -19,6 +24,10 @@ func DetermineClientIdentifier(clientName string) Identifier {
return IdentifierVSCode
case "Zed":
return IdentifierZed
case "Neovim":
// 'Neovim' is sent as the client identifier when using the
// nvim-lspconfig plugin.
return IdentifierNeovim
}

return IdentifierGeneric
Expand Down

0 comments on commit 29f74d9

Please sign in to comment.