Replies: 5 comments 2 replies
-
Here is a screen cast showing that it eventually loads around the 20 s mark and then goes back to not initializing correctly. Screencast.from.2025-03-04.12-22-43.webm |
Beta Was this translation helpful? Give feedback.
-
Hm I'm not sure what to make out of this. I'm not familiar with yeggapan lsp in particular so I can't really advise you for the configuration. There are some lsp configuration on the fortls docs that I tried/used to use, but yeggapan is not one of them I believe. It's definitely not an expected behaviour, fortls is able to initialise 1M lines of code on 4 cores in just a few seconds, so this is weird. I'll try and look into this but my time for support tickets is rather limited these days. The only thing that I can think of, without testing, is that maybe it's trying to index a massive workspace (i.e. directory) and recursing through all the subdirs is causing it to hang. |
Beta Was this translation helpful? Give feedback.
-
I was also worried it might be trying to go through large directory, so for the gif I moved the test program into its own (otherwise empty) folder, just under my home dir called |
Beta Was this translation helpful? Give feedback.
-
Also thanks for getting back to me. I understand it's tricky to debug and even harder to find time. Thought I would raise it in case anyone else has the same issue. |
Beta Was this translation helpful? Give feedback.
-
interestingly, I tried on another machine and eventually the LSP loads but it takes on avg. 1 minute. I am going to try switching to coc and see if anything changes |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
When I open a fortran file, the fortls server doesn't always initialize.
To Reproduce
I am using vim with the following config:
I am really struggling to identify where the issue comes from:
The reason I think it is
fortls
is because my other lsp's work fine and I have not had issues. I haven't changed my vim configuration for a while and it used to work just fine. That being said, the issue may not be fortls, but I don't know where to start debugging. I tried using yeggapan's lsp debug (:LspServer debug errors
) but there's no error messages.If someone could point me in the right direction to debug this, I would be grateful. When I test the LSP on CLI it seems to work e.g., I can run
fortls --debug_filepath simple-mpi.f90 --debug_parser
and it generates output as expected. So it's somewhere in the interface between the lsp client and vim and fortls. When I swap out fortls forfortran-language-server
(and change the options) it works fine.My config in vim for
fortls
is:Start with posting:
I think there may be a race condition or something... because sometimes the lsp initializes but 99% of the time it does not.
Here is the output from the
fortls_debug.log
:Expected behavior
I should be able to initialize the lsp and see its capabilities:
e.g.,
:LspServer show capabilities
should show the capabilities instead of an empty listSetup information (please complete the following information):
fortls-3.1.2
andfortls-3.0.0
- Code editor used VimConfiguration information (please complete the following information):
.fortlsrc
or.fortls.json
or.fortls
configuration file OR any other JSON config being used (if any)settings.json
]Additional context
Add any other context about the problem here.
Beta Was this translation helpful? Give feedback.
All reactions