hansec / fortran-language-server

Fortran Language Server for the Language Server Protocol
MIT License
294 stars 57 forks source link

Fuzzy search for symbols #195

Open edditler opened 3 years ago

edditler commented 3 years ago

In Sublime Text the goto symbol feature allows for fuzzy searching. So if I'm looking for subroutine this_amazing_routine the following search terms will all find it:

In VSCode - as I understand it - this would be supported if the language server does (https://github.com/Microsoft/vscode/issues/33746). This appears to already be implemented in the python-language-server (https://github.com/microsoft/python-language-server/issues/697) so I hope this shouldn't be too difficult to implement.

Would this be an appreciated feature? I don't have any experience with the LSP but would be willing to look into it unless someone else already has this on their roadmap.

JHenneberg commented 3 years ago

So you mean as an auto complete feature when you are not sure about the routines name? Sounds pretty good for me. For now I am using the VSC symbol search or overall search but this would be different level of convenience.

edditler commented 3 years ago

One case is when I'm unsure or when I make a typo. The most annoying for me personally is underscores in the routine names. It would be quicker to skip those in the search.

Just to make sure that I'm not missing something (I'm using ST keybinding. Not sure if those are VSC defaults too)

The last one is provided by fortran-language-server, right?

edditler commented 3 years ago

I just realized: the autocomplete is already fine in this regard. It seems like only the global Go to symbol would be affected.

JHenneberg commented 3 years ago

The functions you mentioned are provided by VCS itself correct and supporting fuzzy search. I thought you were talking about autocompletion while programming. For example you are using a module and you are not sure about the implemented and public available functions. In this case autocompletion has no fuzzy search and is provided by the language-server or extension I think. This would be definetly a big improvement.