From b0107d5787b3178b0f3b733a13d5d99df5c62aa7 Mon Sep 17 00:00:00 2001 From: Charlie Egan Date: Tue, 30 Jul 2024 10:05:38 +0100 Subject: [PATCH] lsp: Add Neovim as known client identifier Fixes https://github.com/StyraInc/regal/issues/950 Signed-off-by: Charlie Egan --- internal/lsp/clients/clients.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/lsp/clients/clients.go b/internal/lsp/clients/clients.go index 4e314dac..22a0cbf4 100644 --- a/internal/lsp/clients/clients.go +++ b/internal/lsp/clients/clients.go @@ -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": @@ -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