HLS utilizes cabal features, in this case the definition of addition source directories. These directories must be specified as strings where the first character of a suggested module name is dropped if 'hs-source-dirs' is assigned simply as './' ('.' was expected). Fix is to canonicalise the path to always include the '/' and then trim it.
[ { "endline": 127, "file": "plugins/hls-module-name-plugin/src/Ide/Plugin/ModuleName.hs", "function": "pathModuleNames", "module": "Ide.Plugin.ModuleName", "startline": 127 }, { "endline": 136, "file": "plugins/hls-module-name-plugin/src/Ide/Plugin/ModuleName.hs", "function": "pathModuleNames", "module": "Ide.Plugin.ModuleName", "startline": 136 } ]
[ { "endline": 143, "file": "plugins/hls-module-name-plugin/src/Ide/Plugin/ModuleName.hs", "function": "pathModuleNames", "module": "Ide.Plugin.ModuleName", "startline": 143 }, { "endline": 156, "file": "plugins/hls-module-name-plugin/src/Ide/Plugin/ModuleName.hs", "function": "pathModuleNames", "module": "Ide.Plugin.ModuleName", "startline": 156 } ]