From f69014752800c120ee085088c46f2911bc4e7c73 Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:44:35 +0200 Subject: [PATCH] fix(sshd_config): Fix match option tag --- server/handlers/sshd_config/handlers/completions.go | 4 +++- server/handlers/sshd_config/handlers/completions_match.go | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/server/handlers/sshd_config/handlers/completions.go b/server/handlers/sshd_config/handlers/completions.go index 9854e43..f533daf 100644 --- a/server/handlers/sshd_config/handlers/completions.go +++ b/server/handlers/sshd_config/handlers/completions.go @@ -11,6 +11,8 @@ import ( protocol "github.com/tliron/glsp/protocol_3_16" ) +var matchOption = fields.CreateNormalizedName("Match") + func GetRootCompletions( d *sshdconfig.SSHDDocument, parentMatchBlock *ast.SSHDMatchBlock, @@ -77,7 +79,7 @@ func GetOptionCompletions( return nil } - if entry.Key.Key == "Match" { + if entry.Key.Key == matchOption { return getMatchCompletions( d, cursor, diff --git a/server/handlers/sshd_config/handlers/completions_match.go b/server/handlers/sshd_config/handlers/completions_match.go index e716f34..e860f7e 100644 --- a/server/handlers/sshd_config/handlers/completions_match.go +++ b/server/handlers/sshd_config/handlers/completions_match.go @@ -5,6 +5,7 @@ import ( sshdconfig "config-lsp/handlers/sshd_config" "config-lsp/handlers/sshd_config/fields" "config-lsp/handlers/sshd_config/match-parser" + protocol "github.com/tliron/glsp/protocol_3_16" )