Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haskell support is thwarted by vscode-haskell #12

Open
jamesohortle opened this issue Sep 9, 2020 · 1 comment
Open

Haskell support is thwarted by vscode-haskell #12

jamesohortle opened this issue Sep 9, 2020 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@jamesohortle
Copy link
Owner

Haskell support is being implemented in branch haskell.

As with other languages, a language support extension that interacts with a language server is required for parsing of source files. In this case, vscode-haskell and haskell-language-server are needed.

Unfortunately, the language extension's hovers appear to blocking ours.

Consider the following test file (src/test/test.hs):

module Main where

import Lib ()

main :: IO ()
{-
 - U+0000 -> Null.
 - U+0020 ->  Space.
 - U+1234 -> ሴ Ethiopic Syllable See.
 - U+0B87 -> இ Tamil Letter I.
 - U+0FDA -> ࿚ Tibetan Mark Trailing Mchan Rtags.
 - U+50B7 -> 傷 Ideograph wound, injury; fall ill from CJK.
 - U+1F639 -> 😹 Cat Face with Tears of Joy.
 - \0000
-}

main =
  putStrLn "\0000"

In Output, under Haskell (UnicodeHover) we can see the below when we hover over putStrLn's argument.

2020-09-09 22:13:09.250435 [ThreadId 207] - Hover request at position 18:15 in file: /Users/jim/UnicodeHover/src/test/test.hs
2020-09-09 22:13:12.031032 [ThreadId 195] - finish: CodeAction (took 0.00s)
2020-09-09 22:13:12.03127 [ThreadId 195] - finish: CodeAction:PackageExports (took 0.00s)
2020-09-09 22:13:17.739479 [ThreadId 213] - DocumentHighlight request at position 14:9 in file: /Users/jim/UnicodeHover/src/test/test.hs
2020-09-09 22:13:17.977093 [ThreadId 195] - finish: CodeAction (took 0.00s)
2020-09-09 22:13:17.97733 [ThreadId 195] - finish: CodeAction:PackageExports (took 0.00s)
2020-09-09 22:18:04.452604 [ThreadId 219] - GhcIde.hover entered (ideLogger)
2020-09-09 22:18:04.452924 [ThreadId 219] - Hover request at position 18:14 in file: /Users/jim/UnicodeHover/src/test/test.hs

The first and last lines of the log above indicate that vscode-haskell is indeed parsing the files correctly, but appears to be blocking UnicodeHover from adding a hover panel.

The output looks like this:
Screen Shot 2020-09-09 at 10 24 13 pm

If we hover over the comment, the UnicodeHover panels do appear, but they are displaced all the way above the start of the comment.
Screen Shot 2020-09-09 at 10 22 07 pm

We should get in touch with the vscode-haskell team to figure out how to fix this.

@jamesohortle jamesohortle added bug Something isn't working enhancement New feature or request labels Sep 9, 2020
@jamesohortle jamesohortle self-assigned this Sep 9, 2020
@jamesohortle
Copy link
Owner Author

The first issue is resolved in commit ecb82cc (glass houses...).

But the second issue remains.

For now, let's implement single character escapes, ASCII control code abbreviations and control-with-character escapes. See here for tables, or the test.hs file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant