hansec / vscode-fortran-ls

Fortran IntelliSense for Visual Studio Code
MIT License
37 stars 7 forks source link

Remove docstring prefix in hover #14

Closed letmaik closed 5 years ago

letmaik commented 5 years ago

When a variable is annotated with !! description then the hover also shows !! including any whitespace between end of variable name and start of docstring. Why not cut this off and just display description?

hansec commented 5 years ago

Unfortunately, I am unable to reproduce this with my codebases. Can you provide an example? Any whitespace between the variable name and the docstring should be stripped (see below) so if it is not that is a bug in the LS.

For this code

INTEGER :: var_w_trailing_wspace                 !! description

I get the following hover. Note, that the single leading space before !! is a formatting choice for consistency with subroutine/function hovers.

INTEGER
 !! description
letmaik commented 5 years ago

You actually reproduced it! :) Maybe it's by-design then. I found it weird that !! is included in the hover, that's all.

hansec commented 5 years ago

Got it. Yeah, that is just to distinguish the docstring using syntax highlighting in the hover.