fortran-lang / fortls

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

feat: Product icon for submodules #413

Closed han190 closed 5 months ago

han190 commented 5 months ago

Is there an existing request for this?

I have tried the Pre-Release of the extension.

Feature Request

I just realized that the product icon for submodules in the outline uses the default "symbol-file" icon (a full list of product icons can be found here). My suggestion is we could just use "symbol-module". image

gnikit commented 5 months ago

Are you using fortls? Normally fortls takes care of symbols and the extension has a fallback implementation (essentially deprecated) that needs to be manually turned on

han190 commented 5 months ago

Yes, I use fortls. When you say deprecated do you mean the feature won't be supported in the future version?

gnikit commented 5 months ago

Okay, then that means that fortls is not recognising submodule_interface as an interface (LSP type). That's how the icons in the symbols table are determined, we don't manually set them. Could you post a MWE and your version of vscode, fortls, any relevant settings, and type of OS?

As for the fallback feature in the vscode extension, I don't think I will remove it, but I also don't think improving it is a good use of my time. It exists there as an alternative for folks that don't/can't use fortls, but it's capability is limited since it doesn't use a real Fortran parser.

han190 commented 5 months ago

Sure. Here are the versions of software I am using: VSCode: 1.90.1 OS: Fedora 40 (WSL) fortls: 3.1.1

The MWE is as follows

module module_parent
implicit none
end module module_parent

submodule (module_parent) submodule_child
end submodule submodule_child

and what is shown on my vscode is image notice that the submodule product icon is the default icon.

gnikit commented 5 months ago

Cool, I just confirmed locally. This is a bug in fortls. I will move the issue there.