mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-19 07:25:27 +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)
|
rawEntry, _ := s.Parser.Aliases.Get(location.Start.Line)
|
||||||
entry := rawEntry.(*AliasEntry)
|
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) {
|
func (s *aliasesParserListener) EnterError(ctx *parser.ErrorContext) {
|
||||||
|
@ -20,11 +20,11 @@ func GetValueAtCursor(
|
|||||||
value := entry.GetAliasValue()
|
value := entry.GetAliasValue()
|
||||||
|
|
||||||
if pos > value.Location.End.Character {
|
if pos > value.Location.End.Character {
|
||||||
return 1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if pos < value.Location.Start.Character {
|
if pos < value.Location.Start.Character {
|
||||||
return -1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
@ -95,6 +95,7 @@ func GetAliasValueHoverInfo(
|
|||||||
func GetAliasValueTypeInfo(
|
func GetAliasValueTypeInfo(
|
||||||
value ast.AliasValueInterface,
|
value ast.AliasValueInterface,
|
||||||
) []string {
|
) []string {
|
||||||
|
println(fmt.Sprintf("value: %v, value type: %T", value, value))
|
||||||
switch value.(type) {
|
switch value.(type) {
|
||||||
case ast.AliasValueUser:
|
case ast.AliasValueUser:
|
||||||
return []string{
|
return []string{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user