Bug 465253 - Haskell Language Server on Kate Can Not Handle Spaces in File Path
Summary: Haskell Language Server on Kate Can Not Handle Spaces in File Path
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 21.12.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-04 05:34 UTC by pirateclip
Modified: 2023-02-06 06:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 23.04
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pirateclip 2023-02-04 05:34:08 UTC
SUMMARY
When I try to use HLS (Haskell Language Server) on a .hs whose file path contains a space somewhere,
the language server does not work.

STEPS TO REPRODUCE
1. Create two blank .hs files, one with a space (ex ample.hs) and one without a space (example.hs)
2. Create an empty folder with a space in its name (fold er) and put a .hs file into it: fold\ er/example.hs
3. Open up all three files in Kate

OBSERVED RESULT
In the first one, HLS works as expected.
In the other two I get several errors like this:
[21:29:36  LSP Server Log] haskell@/home/testuser
2023-02-04T04:29:36.242234Z | Warning | No plugin enabled for STextDocumentDidOpen
2023-02-04T04:29:36.242743Z | Warning | No plugin enabled for STextDocumentDocumentSymbol

and the language server does not function at all. (no syntax highlighting or anything)
EXPECTED RESULT
HLS works on all three files.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed 20230202
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
HLS: 1.9.0.0
GHC: 9.2.5

ADDITIONAL INFORMATION
I used GHCup to install my GHC and HLS.
My User Server Settings for Haskell is:
"haskell": {
            "command": ["haskell-language-server-wrapper", "--lsp"],
            "path": ["%{ENV:HOME}/.ghcup/hls/1.9.0.0/bin"],
            "rootIndicationFileNames": ["*.cabal", "stack.yaml", "cabal.project", "package.yaml"],
            "url": "https://github.com/haskell/haskell-language-server",
            "highlightingModeRegex": "^Haskell$"
        },
I don't think the problem is on HLS' end because when I use their server on the command-line like so:
haskell-language-server-wrapper

It can process all three files without problem.
Comment 1 pirateclip 2023-02-04 05:55:02 UTC
I have also tried to default server settings:
"haskell": {
            "command": ["haskell-language-server-wrapper", "--lsp"],
            "rootIndicationFileNames": ["*.cabal", "stack.yaml", "cabal.project", "package.yaml"],
            "url": "https://github.com/haskell/haskell-language-server",
            "highlightingModeRegex": "^Haskell$"
        },
and got the same results
Comment 2 Waqar Ahmed 2023-02-06 06:43:53 UTC
Fixed with https://invent.kde.org/utilities/kate/-/merge_requests/1093