+
Skip to content

Conversation

pillzu
Copy link
Contributor

@pillzu pillzu commented Apr 23, 2025

Fixes #298

Summary

Function in Lua require : instead of . to pass self automatically.
This PR fixes it by swapping the . with : as necessary to fix the error.

See https://www.lua.org/manual/5.1/manual.html#2.5.8 for more.

A call v:name(args) is syntactic sugar for v.name(v,args), except that v is evaluated only once.

Does it work? Yes

Completions now happen successfully (prior behavior can be observed in #298)
image

@CLAassistant
Copy link

CLAassistant commented Apr 23, 2025

CLA assistant check
All committers have signed the CLA.

@pillzu pillzu changed the title BUG: Automatically pass call to check server health (virtual_text) BUG: Automatically pass self to check server health (virtual_text) Apr 23, 2025
@pillzu pillzu changed the title BUG: Automatically pass self to check server health (virtual_text) BUG: Automatically pass self for server method calls (virtual_text) Apr 23, 2025
@fortenforge
Copy link
Contributor

@aliaksandr-trush does this look good?

@aemonge
Copy link

aemonge commented Apr 24, 2025

I didn't mention in the original ticket, but did follow this thread. And I can confirm this resolves the issue.

@aliaksandr-trush
Copy link
Contributor

@aliaksandr-trush does this look good?

Solution works fine for me.

@lufffer
Copy link

lufffer commented Apr 24, 2025

Works fine for me too.

@iliadmitriev
Copy link

This also works for me. Finally I got virtual text back ☺️

Neovim v0.11.0
Astronvim v5.2.6

Copy link
Contributor

@fortenforge fortenforge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oki

@fortenforge fortenforge merged commit 6e4a661 into Exafunction:main Apr 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: attempt to index local 'self' (a nil value) when virtual_text is enabled
7 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载