0

I tried to use fortls language server (installed via Mason) in Lunarvim, but lvim keeps showing "LSP inactive". The Python and the lua language server are working without any problem

I've restarted it (LspResart) and uninstalled and reinstalled it via Mason. Even the older 2.12.0 version, but every time the same behavior.

I'm on Ubuntu 20.04.6 LTS.

Can anyone who uses fortls in lvim/nvim give me a hint where the problem could be?

5
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Aug 17, 2023 at 13:20
  • Please provide with contents of you lsp.log you can see path to it at lsp info window: :LspInfo command. Commented Aug 20, 2023 at 14:46
  • It seems to be empty, is there a way to switch it to "verbose"? Commented Aug 20, 2023 at 14:57
  • I'm not familiar with lunarvim, can you show LspInfo contents? Commented Aug 24, 2023 at 16:16
  • 'Language client log: /home/XXXi/.local/state/nvim/lsp.log Detected filetype: fortran 0 client(s) attached to this buffer: Other clients that match the filetype: fortran Config: fortls Refer to :h lspconfig-root-detection for help. filetypes: fortran root directory: Not found. cmd: fortls --notify_init --hover_signature --hover_language=fortran --use_signature_help cmd is executable: true autostart: true custom handlers: Configured servers list: fortls` Commented Aug 25, 2023 at 18:37

1 Answer 1

0

I assume you are using fortls (https://github.com/fortran-lang/fortls), which in that case you might want to have a look at the docs on setting fortls up for neovim

Installation

Docs: https://fortls.fortran-lang.org/quickstart.html#download

FYI: make sure that where you install fortls is in your PATH.

neovim Integration

Docs: https://fortls.fortran-lang.org/editor_integration.html#neovim


As a final note, fortls has also a Command Line Interface (CLI), so you can test it works by opening a terminal and typing something along the lines of

fortls --debug_filename your_file.f90 --debug_parser

The output should be a parsed version of your file.

Sign up to request clarification or add additional context in comments.

2 Comments

i've already installed fortls like that and using it in vscode for a while without problems. I've also thested the CLI (its --debug_filepath not --debug_filename) and its working. As mentionend in my question ive installed it via Mason (like all other LSPs i am using), which semms to install a seperate executable, which i tested via the cli too. i still get the "LSP inactive" in the bottom right corner.
Mason is not an officially supported download channel for fortls. That being said if you say that the mason-installed version of fortls works from its CLI, then it is probably something in your neovim settings. Please edit your question to provide additional information about your configuration and all relevant logs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.