Skip to content

Commit

Permalink
lsp: Add Neovim as known client identifier
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 committed Jul 30, 2024
1 parent 7bc7868 commit 8a9fe5f
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 8a9fe5f

Please sign in to comment.