-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exact instructions how to setup fortls with neovim #426
Comments
I think I figured out how to make it work without lazyvim.
Add this into
(or just the middle line into Only Yes, colors are not the best, but I am sure that can be fixed.
Tab completion does not work (maybe I don't know how to use it). |
Just saw this @certik (sorry...). I use the native LSP implementation of neovim, to configure require'lspconfig'.fortls.setup{
cmd = {
'fortls',
'--lowercase_intrisics',
'--hover_signature',
'--hover_language=fortran',
'--use_signature_help'
}
} I added it to the docs when I switched from vim to neovim. I will try and setup it up on my new mac and update the instructions if they are out of date. |
@brucechan1123 you are on Windows directly. Here is one way how to find the problem:
I haven't tried this in Windows directly yet. |
Thanks a lot for offering advice! I'm not so good at Operation systems, that I'm not sure the 'WSL' denotes windows subsystem linux or something. However, accidently I tried to call Mason to uninstall forlts and re-install it, and the problem was just solved. And Thank you anyway for offering advice! |
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: