phpactor / language-server-phpactor-extensions

MIT License
0 stars 4 forks source link

Allow hover template override #36

Closed BladeMF closed 3 years ago

BladeMF commented 3 years ago

Add a config setting language_server_hover.template_paths that allows the user to add more paths (other than __DIR__ . '/../../templates/markdown') that are searched for twig templates for the hover content.

dantleech commented 3 years ago

Instead of allowing this, can we also / instead fix the broken offset hover template? or what is the issue with the current templates before merding this?

BladeMF commented 3 years ago

Instead of allowing this, can we also / instead fix the broken offset hover template? or what is the issue with the current templates before merding this?

The formatting wasn't OK - missing newlines, the source code view wasn't colourised after the first line, etc. I suppose VS Code interprets markdown a bit different. So wasn't just the frames.

Also, why not allow customisation? This seems like one of those personal things where everyone likes it different. I played with them quite a bit and ended up simplifying them.

dantleech commented 3 years ago

Not against it, just wondering if it was only f.e. to fix the ugly "offset" hover, or if there are other issues

dantleech commented 3 years ago

Anyway, build it failing with some new hell. You probably need to copy the project_config configuration from one of the other container builders in another extensions.

BladeMF commented 3 years ago

I'll try and give examples:

1) No colouring beyond the first line: image 2) Missing new lines in frames: image

3) Not terribly fond of that format: image

4) Also, the missing links for the built-in PHP functions was the first thing that made me go and look. Since I couldn't find a parsed Doc block object, I just put it as a string. It's not pretty, but I have my links (they are present as @link element in the phpstorm stubs)

BladeMF commented 3 years ago

Anyway, build it failing with some new hell. You probably need to copy the project_config configuration from one of the other container builders in another extensions.

Okay. Will try tomorrow or something.

dantleech commented 3 years ago

thanks!