fortran-language-server & lsp-mode

Emacs configuration

(use-package lsp-mode
  :ensure t
  :mode (("\\.F90\\'"  . f90-mode)
         ("\\.f03\\'"  . f90-mode)
         ("\\.fpp\\'"  . f90-mode)
         ("\\.pf\\'"  . f90-mode)
         ("\\.F\\'"  . f90-mode)
         ("\\.f\\'"  . f90-mode)
         ("\\.inc\\'"  . f90-mode))
  :hook ((python-mode . lsp)
         (f90-mode . lsp)
         (lsp-mode . lsp-enable-which-key-integration))
  :commands lsp
  :custom (
           (lsp-headerline-breadcrumb-enable t)
           (lsp-modeline-code-actions-enable nil))
)

.fortls is located at the project root.

{
  "source_dirs": ["src"],
  "excl_paths": ["build"],
  "pp_suffixes": [".F"],
  "pp_defs": {"SOME_MACRO": ""},
  "debug_log": true
}