You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried several times and always failed to get (any) LSP working with neovim, and I just figured it out specifically for fortls. I am documenting here the exact steps before I forget. We can later move this into fortls documentation.
The setup below does not destroy your current neovim setup. It makes it completely optional. You can use the NVIM_APPNAME environment variable to choose between setups.
First install lazyvim:
# check that ~/.config/lazyvim does not exist. If it does, archive it, or change the directory below
git clone https://github.com/LazyVim/starter ~/.config/lazyvim
export NVIM_APPNAME=lazyvim
nvim some_file.f90
The first time you start neovim with this setup, it will load all plugins and install itself. The subsequent time will be quite fast (although not as fast as vanilla neovim unfortunately and there are other issues, such as flicker at startup, sometimes the cursor movement is lagging; so I do not have lazyvim on by default due to these issues).
Just saw this @certik (sorry...). I use the native LSP implementation of neovim, to configure fortls and don't pass it through lazyvim since the language server will not activate unless a Fortran file is opened.
I add only a little stub to my init.lua
I tried several times and always failed to get (any) LSP working with
neovim
, and I just figured it out specifically for fortls. I am documenting here the exact steps before I forget. We can later move this into fortls documentation.The setup below does not destroy your current
neovim
setup. It makes it completely optional. You can use theNVIM_APPNAME
environment variable to choose between setups.The first time you start
neovim
with this setup, it will load all plugins and install itself. The subsequent time will be quite fast (although not as fast as vanillaneovim
unfortunately and there are other issues, such as flicker at startup, sometimes the cursor movement is lagging; so I do not have lazyvim on by default due to these issues).Install
conda
: Use https://github.com/conda-forge/miniforge and follow the instructions there.Install
fortls
:Check that
fortls
is loaded using:checkhealth lsp
. Now you can use the commands listed at https://dev.to/vonheikemen/getting-started-with-neovims-native-lsp-client-in-the-year-of-2022-the-easy-way-bp3. I found that the following three commands work:K
,gd
,gr
. Here is an example ofK
:Also TAB completion works in insert mode:
The text was updated successfully, but these errors were encountered: