mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 23:15:26 +02:00
fix(aliases): Fix values
This commit is contained in:
parent
3538a37203
commit
77cf960559
@ -177,7 +177,7 @@ func (s *aliasesParserListener) EnterEmail(ctx *parser.EmailContext) {
|
||||
rawEntry, _ := s.Parser.Aliases.Get(location.Start.Line)
|
||||
entry := rawEntry.(*AliasEntry)
|
||||
|
||||
entry.Values.Values = append(entry.Values.Values, &email)
|
||||
entry.Values.Values = append(entry.Values.Values, email)
|
||||
}
|
||||
|
||||
func (s *aliasesParserListener) EnterError(ctx *parser.ErrorContext) {
|
||||
|
@ -20,11 +20,11 @@ func GetValueAtCursor(
|
||||
value := entry.GetAliasValue()
|
||||
|
||||
if pos > value.Location.End.Character {
|
||||
return 1
|
||||
return -1
|
||||
}
|
||||
|
||||
if pos < value.Location.Start.Character {
|
||||
return -1
|
||||
return 1
|
||||
}
|
||||
|
||||
return 0
|
||||
|
@ -95,6 +95,7 @@ func GetAliasValueHoverInfo(
|
||||
func GetAliasValueTypeInfo(
|
||||
value ast.AliasValueInterface,
|
||||
) []string {
|
||||
println(fmt.Sprintf("value: %v, value type: %T", value, value))
|
||||
switch value.(type) {
|
||||
case ast.AliasValueUser:
|
||||
return []string{
|
||||
|
Loading…
x
Reference in New Issue
Block a user