mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 15:05:28 +02:00
chore: Make openssh its own package
This commit is contained in:
parent
cf2b01b08f
commit
014d9ebe94
0
handlers/index.go
Normal file
0
handlers/index.go
Normal file
@ -1,4 +1,4 @@
|
|||||||
package handlers
|
package openssh
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package handlers
|
package openssh
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"config-lsp/common"
|
"config-lsp/common"
|
||||||
@ -380,13 +380,16 @@ See PATTERNS in ssh_config(5) for more information on patterns. This keyword may
|
|||||||
),
|
),
|
||||||
|
|
||||||
"IPQoS": common.NewOption(`Specifies the IPv4 type-of-service or DSCP class for the connection. Accepted values are af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, ef, le, lowdelay, throughput, reliability, a numeric value, or none to use the operating system default. This option may take one or two arguments, separated by whitespace. If one argument is specified, it is used as the packet class unconditionally. If two values are specified, the first is automatically selected for interactive sessions and the second for non-interactive sessions. The default is af21 (Low-Latency Data) for interactive sessions and cs1 (Lower Effort) for non-interactive sessions.`,
|
"IPQoS": common.NewOption(`Specifies the IPv4 type-of-service or DSCP class for the connection. Accepted values are af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, ef, le, lowdelay, throughput, reliability, a numeric value, or none to use the operating system default. This option may take one or two arguments, separated by whitespace. If one argument is specified, it is used as the packet class unconditionally. If two values are specified, the first is automatically selected for interactive sessions and the second for non-interactive sessions. The default is af21 (Low-Latency Data) for interactive sessions and cs1 (Lower Effort) for non-interactive sessions.`,
|
||||||
common.ArrayValue{
|
common.OrValue{
|
||||||
AllowDuplicates: true,
|
|
||||||
Separator: " ",
|
|
||||||
SubValue: common.OrValue{
|
|
||||||
Values: []common.Value{
|
Values: []common.Value{
|
||||||
common.PositiveNumberValue{},
|
common.PositiveNumberValue{},
|
||||||
common.EnumValue{
|
common.EnumValue{
|
||||||
|
Values: []string{"none"},
|
||||||
|
},
|
||||||
|
common.ArrayValue{
|
||||||
|
AllowDuplicates: true,
|
||||||
|
Separator: " ",
|
||||||
|
SubValue: common.EnumValue{
|
||||||
EnforceValues: true,
|
EnforceValues: true,
|
||||||
Values: []string{
|
Values: []string{
|
||||||
"af11", "af12", "af13",
|
"af11", "af12", "af13",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package handlers
|
package openssh
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"config-lsp/common"
|
"config-lsp/common"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package handlers
|
package openssh
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"config-lsp/common"
|
"config-lsp/common"
|
||||||
@ -37,12 +37,15 @@ func getRootCompletions() []protocol.CompletionItem {
|
|||||||
insertText := label + " " + "${1:value}"
|
insertText := label + " " + "${1:value}"
|
||||||
|
|
||||||
format := protocol.InsertTextFormatSnippet
|
format := protocol.InsertTextFormatSnippet
|
||||||
|
kind := protocol.CompletionItemKindField
|
||||||
|
|
||||||
|
|
||||||
completions[index] = protocol.CompletionItem{
|
completions[index] = protocol.CompletionItem{
|
||||||
Label: label,
|
Label: label,
|
||||||
Documentation: common.GetDocumentation(&option),
|
Documentation: common.GetDocumentation(&option),
|
||||||
InsertText: &insertText,
|
InsertText: &insertText,
|
||||||
InsertTextFormat: &format,
|
InsertTextFormat: &format,
|
||||||
|
Kind: &kind,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,10 +60,12 @@ func getCompletionsFromValue(value common.Value) []protocol.CompletionItem {
|
|||||||
|
|
||||||
for index, value := range enumValue.Values {
|
for index, value := range enumValue.Values {
|
||||||
textFormat := protocol.InsertTextFormatPlainText
|
textFormat := protocol.InsertTextFormatPlainText
|
||||||
|
kind := protocol.CompletionItemKindEnum
|
||||||
|
|
||||||
completions[index] = protocol.CompletionItem{
|
completions[index] = protocol.CompletionItem{
|
||||||
Label: value,
|
Label: value,
|
||||||
InsertTextFormat: &textFormat,
|
InsertTextFormat: &textFormat,
|
||||||
|
Kind: &kind,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package handlers
|
package openssh
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"config-lsp/common"
|
"config-lsp/common"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package handlers
|
package openssh
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"config-lsp/common"
|
"config-lsp/common"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user