Open yaegassy opened 3 years ago
Nope, this is a bug. It has to do with the way context is searched for here: https://github.com/pappasam/nginx-language-server/blob/main/nginx_language_server/server.py#L49
We should probably not return None and instead find a way to assume the ["main"] context or something if no line is found.
Thanks reply. I'm glad I reported it.
@yaegassy just remember this was here. If you find the time to submit a PR, I'll quickly review. Otherwise, I'll get around to fixing this eventually, but it might be a while!
Description
One thing is bothering me about
nginx-language-server
.The completion doesn't seem to work unless the file has at least "one line" or a string like
a;
.Is this the intended behavior?
DEMO
https://user-images.githubusercontent.com/188642/133232734-3822c89f-f6aa-492f-abf6-ec4b9bd4ab80.mp4