fix(sshd_config): Fix match option tag

This commit is contained in:
Myzel394 2024-10-16 16:44:35 +02:00
parent 55b55ac13e
commit f690147528
No known key found for this signature in database
GPG Key ID: ED20A1D1D423AF3F
2 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,8 @@ import (
protocol "github.com/tliron/glsp/protocol_3_16" protocol "github.com/tliron/glsp/protocol_3_16"
) )
var matchOption = fields.CreateNormalizedName("Match")
func GetRootCompletions( func GetRootCompletions(
d *sshdconfig.SSHDDocument, d *sshdconfig.SSHDDocument,
parentMatchBlock *ast.SSHDMatchBlock, parentMatchBlock *ast.SSHDMatchBlock,
@ -77,7 +79,7 @@ func GetOptionCompletions(
return nil return nil
} }
if entry.Key.Key == "Match" { if entry.Key.Key == matchOption {
return getMatchCompletions( return getMatchCompletions(
d, d,
cursor, cursor,

View File

@ -5,6 +5,7 @@ import (
sshdconfig "config-lsp/handlers/sshd_config" sshdconfig "config-lsp/handlers/sshd_config"
"config-lsp/handlers/sshd_config/fields" "config-lsp/handlers/sshd_config/fields"
"config-lsp/handlers/sshd_config/match-parser" "config-lsp/handlers/sshd_config/match-parser"
protocol "github.com/tliron/glsp/protocol_3_16" protocol "github.com/tliron/glsp/protocol_3_16"
) )