to see how the new hover messages are displayed correctly. I am not sure if all editors have support for Markdown hover messages and at this point the changes I’ve made are not backwards compatible.
to catch any errors in parsing or make suggestions about the new syntax.
Here is a sneak peak of how standard FORD syntax will be displayed (Doxygen is pending)
@gnikit , hello!
I tried to test local build of fortls from gnikit/issue45 branch with the code of fortran stdlib project.
The result depends on documentation comment style (!! or !>) used in file:
stdlib_array.f90 – pure subroutine logicalloc hover looks OK;
stdlib_array.f90 – pure function trueloc and pure function falseloc hover just displays LOGICAL without additional info (like with fortls-2.13.0);
stdlib_stringlist_type.f90 – pure function get_string_idx_wrap the hover display info about function.
stdlib_hashmaps.f90 – function total_depth hover displays info;
stdlib_hashmaps.f90 – subroutine init_map - the scrollbar appears in the hover window, the scrolling looks working.
P.S.
I built and installed fortls via system package manager instead of using pip directly.
Thanks for taking the time @band-a-prend to test it. As you pointed out the style matters !! or !>. The problem is that FORD documentation can look a lot like Doxygen, so creating a parser that works for both is rather tricky.
I will have a look at the stdlib examples you mentioned and see what can be done.
I will also try and make the doc parser more generic.
In your opinion, would you like to see anything else in the hover window?
For completeness, could you also mention what code editor you are using?
@band-a-prend if you/stdlib change the trueloc docstring from
!> Version: experimental
!>
!> Return the positions of the true elements in array.
!> [Specification](../page/specs/stdlib_array.html#trueloc)
Into
!> Version: experimental
!!
!! Return the positions of the true elements in array.
!! [Specification](../page/specs/stdlib_array.html#trueloc)
Then I think it should work. On my phone so I can’t verify it at the moment though. For doxygen style docstring (comment before declaration) fortls expects them to start with !>. Consecutive lines in the docstring should start with !! .
For ford style docstrings (comment after declaration) then all lines should start with !! .
In your opinion, would you like to see anything else in the hover window?
The FORD math expressions support will be excellent (I don’t know is it supported now). But there is a huge problem that FORD (it actualy mainly uses MathJax style with some restriction) doesn’t support inline expressions via $ so it isn’t directly compatible with python-markdown style. Maybe it could be transfered internaly before displaying. But it’s future feature request.
For completeness, could you also mention what code editor you are using?
I used Visual Studio Code 1.72.2 editor for previewing fortls new markdown feature.
@plevold
Thank you for notice. I rechecked the FORD documentation and it should be work as default syntax. I could try it later.