Search code examples
visual-studio-codefortrancommentsdocumentationintellisense

Use FORD documentation parser with Fortran Language Server


I am recreating a new Fortran90 environment using vscode with extensions (formatter, modern fortran, fortls & FORD documentation generator). I would like to use fortls features fully and easily document my code using FORD style. In the Fortran Language Server Github, the following feature is specified :

Documentation parsing (Doxygen and FORD styles)

FORD is installed and working well independently but I dont see any interaction with fortls and its vscode extension. I tried to write some FORD comments but I don't see anything special:

subroutine example(i)
    !! This is a subroutine description
    !!
    !! I created this subroutine to test ford documentation parsing by fortls
    implicit none
    integer, intent(in) :: i
    !! Integer to be printed
    print*, i
    !! Prints i
  end subroutine example

Does anyone know what this feature really does and how to use it properly?
What I mean is what does this feature bring to the basic operation of FORD?


Solution

  • As I mentioned in my comment, what that statement means is that the language server is able to parse and display the FORD documentation of functions, subroutines, module procedures and variables while hovering, completing argument lists of functions, subroutines and methods and while using autocompletions. This is inline with the language servers for other programming languages (C, C++, Python, Javascript, Typescript, etc.).

    It does not mean that you are able to run FORD or Doxygen through the language server