Closed TheGreatDeadOne closed 2 years ago
This is due to the way lspconfig determines the root directory which is specified in:
~/.config/nvim/plugged/nvim-lspconfig/lua/lspconfig/fortls.lua
You have at least two options: 1) add a project configuration json file called .fortls in your project folder (see https://github.com/hansec/fortran-language-server)
or
2) add '.git' in fortls.lua, i.e., root_dir = util.root_pattern('.git', '.fortls')
Then initialise a git repo in the project folder (if not already done) with git init
After this, the root directory should be available
This is due to the way lspconfig determines the root directory which is specified in:
~/.config/nvim/plugged/nvim-lspconfig/lua/lspconfig/fortls.lua
You have at least two options:
1. add a project configuration json file called .fortls in your project folder (see https://github.com/hansec/fortran-language-server)
or
1. add '.git' in fortls.lua, i.e., root_dir = util.root_pattern('.git', '.fortls')
Then initialise a git repo in the project folder (if not already done) with git init
After this, the root directory should be available
Thanks, that was pretty simple!
Thank you very much for FLS and its support in Neovim/Vim!
I installed the server using pip, and the binary installation folder is already in the $PATH (~/.local/bin), but it looks like when the binary is run on neovim, fortls is not identifying the root_dir.
Obs: I use Fedora Silverblue, that's why var/home is linked to /home
But when I check the server and client status in :Lspinfo on Neovim, I get the following output: