fortran-lang / fortls

fortls - Fortran Language Server
https://fortls.fortran-lang.org/
MIT License
257 stars 41 forks source link

bug (autocompletion): subroutines are shown as functions, and only the name is autocompleted, without the argument list. #354

Closed aerosayan closed 9 months ago

aerosayan commented 9 months ago

Describe the bug Autocomplete doesn't seem to work correctly all of a sudden, for some reason. Subroutines are shown as functions, and only the name is autocompleted. The subroutine/function argument list is not displayed at all.

To Reproduce I have no idea how to reproduce this. Either something went wrong in my configuration, or it's an internal bug in fortls. Anyways, I'm just reporting this, in case others also face similar issues, then you'll know something internal in fortls has gone wrong.

Screenshots & Animations bug-1 bug-2 bug-3

Setup information (please complete the following information):

Configuration information (please complete the following information): Neovim starts fortls with command: fortls --notify_init --hover_signature --hover_language=fortran --use_signature_help

My fortls configuration is:

{
   "nthreads": 4,
   "notify_init": true,
   "incremental_sync": false,
   "sort_keywords": false,
   "disable_autoupdate": false,
   "debug_log": false,

   "source_dirs": ["./src/**"],
   "incl_suffixes": [],
   "excl_suffixes": [],
   "excl_paths": [],

   "autocomplete_no_prefix": false,
   "autocomplete_no_snippets": false,
   "autocomplete_name_only": false,
   "lowercase_intrinsics": true,
   "use_signature_help": true,

   "hover_signature": false,
   "hover_language": "fortran90",

   "max_line_length": -1,
   "max_comment_line_length": -1,
   "disable_diagnostics": false,

   "pp_suffixes": [],
   "include_dirs": [],
   "pp_defs": {},

   "symbol_skip_mem": false,

   "enable_code_actions": false
}
gnikit commented 9 months ago

Can you post a MWE of the code that demonstrates it. What is the output of:

fortls --debug_filepath your-file-name --debug_completion --debug_line your-lin-num --debug_char your_column_num
aerosayan commented 9 months ago

Well, the LSP autocompletion is working correctly again after I restarted my terminal.

No idea what caused the bug, or what fixed it.

result

gnikit commented 9 months ago

I am closing this issue. In the future please try and narrow down the scope of the problem and form a MWE before opening a bug report.