mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 23:15:26 +02:00
fix(ssh_config): Improve include behavior
This commit is contained in:
parent
b4aaa2cc3a
commit
b0d8e80736
@ -26,7 +26,7 @@ func analyzeIncludeValues(
|
||||
) {
|
||||
for _, include := range ctx.document.Indexes.Includes {
|
||||
for _, value := range include.Values {
|
||||
if isImpossibleToVerify(value.Value) {
|
||||
if !canBeAnalyzed(value.Value) {
|
||||
continue
|
||||
}
|
||||
|
||||
@ -47,20 +47,20 @@ func analyzeIncludeValues(
|
||||
|
||||
// We can't evaluate environmental variables or tokens as we don't know the actual
|
||||
// values
|
||||
func isImpossibleToVerify(
|
||||
func canBeAnalyzed(
|
||||
path string,
|
||||
) bool {
|
||||
if environmtalVariablePattern.MatchString(path) {
|
||||
return true
|
||||
}
|
||||
|
||||
for _, token := range fields.AvailableTokens {
|
||||
if strings.Contains(path, token) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
for token := range fields.AvailableTokens {
|
||||
if strings.Contains(path, token) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func createIncludePaths(
|
||||
|
Loading…
x
Reference in New Issue
Block a user