MagBad/lsp-fortran

No language server is associated with this buffer

ZedThree opened this issue · 2 comments

Hello, thanks for making this! I'm having trouble getting it working though. Maybe I am misunderstanding how to make it run. I have the following in my .emacs:

(use-package lsp-mode
  :init
  :hook
  (f90-mode . lsp-mode)
  :config
  (use-package lsp-ui
    :ensure f
    :after flycheck))
(use-package lsp-fortran
  :after lsp-mode)

But when I run lsp-capabilities, I get "No language server is associated with this buffer". I have run lsp-fortran-enable but that didn't make any difference.

toggle-debug-on-error also didn't stop on any errors, so I don't know what's going wrong. I do get messages in the log like "Error during redisplay: (eval (lsp-mode-line)) signaled (wrong-type-argument lsp--workspace nil)", but I can't seem to get more information than that.

Am I missing something?

Sorry, I just found the problem! I should use:

  (use-package lsp-mode
    :init
    :hook
-   (f90-mode . lsp-mode)
+   (f90-mode . lsp-fortran-enable)
    :config
    (use-package lsp-ui
      :ensure f
      :after flycheck))

Hi, no problem

Actually your configuration is noteworthy for the README.

Best regards

Magnus