mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-19 07:25:27 +02:00
fix: Fix openssh
This commit is contained in:
parent
a8e896c6ef
commit
3abfb9430a
@ -307,7 +307,7 @@ See PATTERNS in ssh_config(5) for more information on patterns. This keyword may
|
|||||||
ssh-ed25519-cert-v01@openssh.com, ecdsa-sha2-nistp256-cert-v01@openssh.com, ecdsa-sha2-nistp384-cert-v01@openssh.com, ecdsa-sha2-nistp521-cert-v01@openssh.com, sk-ssh-ed25519-cert-v01@openssh.com, sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, rsa-sha2-512-cert-v01@openssh.com, rsa-sha2-256-cert-v01@openssh.com, ssh-ed25519, ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, sk-ssh-ed25519@openssh.com, sk-ecdsa-sha2-nistp256@openssh.com, rsa-sha2-512,rsa-sha2-256
|
ssh-ed25519-cert-v01@openssh.com, ecdsa-sha2-nistp256-cert-v01@openssh.com, ecdsa-sha2-nistp384-cert-v01@openssh.com, ecdsa-sha2-nistp521-cert-v01@openssh.com, sk-ssh-ed25519-cert-v01@openssh.com, sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, rsa-sha2-512-cert-v01@openssh.com, rsa-sha2-256-cert-v01@openssh.com, ssh-ed25519, ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, sk-ssh-ed25519@openssh.com, sk-ecdsa-sha2-nistp256@openssh.com, rsa-sha2-512,rsa-sha2-256
|
||||||
The list of available signature algorithms may also be obtained using "ssh -Q HostbasedAcceptedAlgorithms". This was formerly named HostbasedAcceptedKeyTypes.`,
|
The list of available signature algorithms may also be obtained using "ssh -Q HostbasedAcceptedAlgorithms". This was formerly named HostbasedAcceptedKeyTypes.`,
|
||||||
docvalues.CustomValue{
|
docvalues.CustomValue{
|
||||||
FetchValue: func() docvalues.Value {
|
FetchValue: func(_ docvalues.CustomValueContext) docvalues.Value {
|
||||||
options, err := QueryOpenSSHOptions("HostbasedAcceptedAlgorithms")
|
options, err := QueryOpenSSHOptions("HostbasedAcceptedAlgorithms")
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -354,7 +354,7 @@ See PATTERNS in ssh_config(5) for more information on patterns. This keyword may
|
|||||||
ssh-ed25519-cert-v01@openssh.com, ecdsa-sha2-nistp256-cert-v01@openssh.com, ecdsa-sha2-nistp384-cert-v01@openssh.com, ecdsa-sha2-nistp521-cert-v01@openssh.com, sk-ssh-ed25519-cert-v01@openssh.com, sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, rsa-sha2-512-cert-v01@openssh.com, rsa-sha2-256-cert-v01@openssh.com, ssh-ed25519, ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, sk-ssh-ed25519@openssh.com, sk-ecdsa-sha2-nistp256@openssh.com, rsa-sha2-512,rsa-sha2-256
|
ssh-ed25519-cert-v01@openssh.com, ecdsa-sha2-nistp256-cert-v01@openssh.com, ecdsa-sha2-nistp384-cert-v01@openssh.com, ecdsa-sha2-nistp521-cert-v01@openssh.com, sk-ssh-ed25519-cert-v01@openssh.com, sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, rsa-sha2-512-cert-v01@openssh.com, rsa-sha2-256-cert-v01@openssh.com, ssh-ed25519, ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, sk-ssh-ed25519@openssh.com, sk-ecdsa-sha2-nistp256@openssh.com, rsa-sha2-512,rsa-sha2-256
|
||||||
The list of available signature algorithms may also be obtained using "ssh -Q HostKeyAlgorithms".`,
|
The list of available signature algorithms may also be obtained using "ssh -Q HostKeyAlgorithms".`,
|
||||||
docvalues.CustomValue{
|
docvalues.CustomValue{
|
||||||
FetchValue: func() docvalues.Value {
|
FetchValue: func(_ docvalues.CustomValueContext) docvalues.Value {
|
||||||
options, _ := QueryOpenSSHOptions("HostKeyAlgorithms")
|
options, _ := QueryOpenSSHOptions("HostKeyAlgorithms")
|
||||||
|
|
||||||
return PrefixPlusMinusCaret(options)
|
return PrefixPlusMinusCaret(options)
|
||||||
@ -736,7 +736,7 @@ See PATTERNS in ssh_config(5) for more information on patterns. This keyword may
|
|||||||
ssh-ed25519-cert-v01@openssh.com, ecdsa-sha2-nistp256-cert-v01@openssh.com, ecdsa-sha2-nistp384-cert-v01@openssh.com, ecdsa-sha2-nistp521-cert-v01@openssh.com, sk-ssh-ed25519-cert-v01@openssh.com, sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, rsa-sha2-512-cert-v01@openssh.com, rsa-sha2-256-cert-v01@openssh.com, ssh-ed25519, ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, sk-ssh-ed25519@openssh.com, sk-ecdsa-sha2-nistp256@openssh.com, rsa-sha2-512,rsa-sha2-256
|
ssh-ed25519-cert-v01@openssh.com, ecdsa-sha2-nistp256-cert-v01@openssh.com, ecdsa-sha2-nistp384-cert-v01@openssh.com, ecdsa-sha2-nistp521-cert-v01@openssh.com, sk-ssh-ed25519-cert-v01@openssh.com, sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, rsa-sha2-512-cert-v01@openssh.com, rsa-sha2-256-cert-v01@openssh.com, ssh-ed25519, ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, sk-ssh-ed25519@openssh.com, sk-ecdsa-sha2-nistp256@openssh.com, rsa-sha2-512,rsa-sha2-256
|
||||||
The list of available signature algorithms may also be obtained using "ssh -Q PubkeyAcceptedAlgorithms".`,
|
The list of available signature algorithms may also be obtained using "ssh -Q PubkeyAcceptedAlgorithms".`,
|
||||||
docvalues.CustomValue{
|
docvalues.CustomValue{
|
||||||
FetchValue: func() docvalues.Value {
|
FetchValue: func(_ docvalues.CustomValueContext) docvalues.Value {
|
||||||
options, _ := QueryOpenSSHOptions("PubkeyAcceptedAlgorithms")
|
options, _ := QueryOpenSSHOptions("PubkeyAcceptedAlgorithms")
|
||||||
|
|
||||||
return PrefixPlusMinusCaret(options)
|
return PrefixPlusMinusCaret(options)
|
||||||
|
@ -23,9 +23,15 @@ func (v DataAmountValue) GetTypeDescription() []string {
|
|||||||
return []string{"Data amount"}
|
return []string{"Data amount"}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v DataAmountValue) CheckIsValid(value string) error {
|
func (v DataAmountValue) CheckIsValid(value string) []*docvalues.InvalidValue {
|
||||||
if !dataAmountCheckPattern.MatchString(value) {
|
if !dataAmountCheckPattern.MatchString(value) {
|
||||||
return InvalidDataAmountError{}
|
return []*docvalues.InvalidValue{
|
||||||
|
{
|
||||||
|
Err: InvalidDataAmountError{},
|
||||||
|
Start: 0,
|
||||||
|
End: uint32(len(value)),
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@ -85,3 +91,7 @@ func (v DataAmountValue) FetchCompletions(line string, cursor uint32) []protocol
|
|||||||
|
|
||||||
return completions
|
return completions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (v DataAmountValue) FetchHoverInfo(line string, cursor uint32) []string {
|
||||||
|
return []string{}
|
||||||
|
}
|
||||||
|
@ -25,9 +25,15 @@ func (v TimeFormatValue) GetTypeDescription() []string {
|
|||||||
return []string{"Time value"}
|
return []string{"Time value"}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v TimeFormatValue) CheckIsValid(value string) error {
|
func (v TimeFormatValue) CheckIsValid(value string) []*docvalues.InvalidValue {
|
||||||
if !timeFormatCheckPattern.MatchString(value) {
|
if !timeFormatCheckPattern.MatchString(value) {
|
||||||
return InvalidTimeFormatError{}
|
return []*docvalues.InvalidValue{
|
||||||
|
{
|
||||||
|
Err: InvalidTimeFormatError{},
|
||||||
|
Start: 0,
|
||||||
|
End: uint32(len(value)),
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@ -99,3 +105,7 @@ func (v TimeFormatValue) FetchCompletions(line string, cursor uint32) []protocol
|
|||||||
|
|
||||||
return completions
|
return completions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (v TimeFormatValue) FetchHoverInfo(line string, cursor uint32) []string {
|
||||||
|
return []string{}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user