DanielGavin / ols

Language server for Odin
MIT License
479 stars 71 forks source link

DOC on hover not working for core lib #499

Closed jpx40 closed 2 months ago

jpx40 commented 2 months ago

Hey, i use neovim i noticed that the doc on hover for core libs doesn't work. For other imports it works fine.

DanielGavin commented 2 months ago

Not sure what you mean. Are you talking about hovering on symbols in the actual files in core? Some of those can't be hovered since the parser won't run in those files. Can't fix that on my end.

You need to give an example.

jpx40 commented 2 months ago

Not sure what you mean. Are you talking about hovering on symbols in the actual files in core? Some of those can't be hovered since the parser won't run in those files. Can't fix that on my end.

You need to give an example.

so, the doc files are the only files u are not parsing? this would explain why they won't show the docs.

jpx40 commented 2 months ago

Not sure what you mean. Are you talking about hovering on symbols in the actual files in core? Some of those can't be hovered since the parser won't run in those files. Can't fix that on my end.

You need to give an example.

the parsed doc comments wouldn't show up

jpx40 commented 2 months ago

could u bundle the std lib with your binary and parse them then like the rest?

jpx40 commented 2 months ago

u could use this function

foo := #load("path/to/file")
bar := #load("path/to/file", string)
fmt.println(bar)

// If a file's size is not a multiple of the `size_of(type)`, then any remainder is ignored.
baz := #load("path/to/file", []f32)

http://odin-lang.org/docs/overview/#loadstring-path-or-loadstring-path-type

DanielGavin commented 2 months ago

Please give an example. I don't understand what you mean with parsed doc comments wouldn't show up.

You might as well say: nothing works as an issue, it's just as helpful.

Doc comments work: billede

A doc comment is a comment that is right over the function. That clearly works. If there is a bug in a specific file/package then please refer to that.

As I mentioned there are issue with editing inside the core in certain files where the parser is disabled, and that can't be fixed until it is fixed in core:odin/parser.

jpx40 commented 2 months ago

i can see any docs for functions of core when i use the over feature in neovim

jpx40 commented 2 months ago

fixed it with setting ODIN_ROOT

DanielGavin commented 2 months ago

Surprised you had any completion then without it being to find odin root. But glad that it now works for you.

jpx40 commented 2 months ago

Surprised you had any completion then without it being to find odin root. But glad that it now works for you.

i disabled completion i just needed the doc feature xd