neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.47k stars 956 forks source link

Haskell snippets are now broken. #1040

Closed Avi-D-coder closed 5 years ago

Avi-D-coder commented 5 years ago

Result from CocInfo

vim version: NVIM v0.4.0-1447-gfe2ada737 node version: v11.15.0 coc.nvim version: 0.0.73 term: xterm-256color platform: linux

Describe the bug

Haskell-ide-engine snippet is being pasted verbatim.

File after completion

module Main where

import Lib

main :: IO ()
main = someFunc

map ${1:a -> b} ${2:[a]}

Relevant section of log

[Trace - 11:16:16 PM] Received response 'completionItem/resolve - (4)' in 49ms.
Result: {
    "insertText": "map ${1:a -> b} ${2:[a]}",
    "kind": 3,
    "data": {
        "name_details": [
            "GHC.Base",
            "base",
            "v",
            "map"
        ],
        "hoogle_query": "map module:Prelude is:exact"
    },
    "insertTextFormat": 1,
    "documentation": {
        "kind": "markdown",
        "value": "```haskell\nmap :: (a -> b) -> [a] -> [b]\n```\n`map` `f xs` is the list obtained by applying `f`\nto each element of `xs`, i.e.,\n\n```haskell\n\nmap f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]\nmap f [x1, x2, ...] == [f x1, f x2, ...]\n```\n\n[More info](https://hackage.haskell.org/package/base/docs/Prelude.html#v:map)"
    },
    "label": "map",
    "detail": "(a -> b) -> [a] -> [b]\nPrelude"
}
Full log

``` [Trace - 11:16:07 PM] Sending request 'initialize - (0)'. Params: { "processId": 4011, "rootPath": "/home/host/playground/haskell-test", "rootUri": "file:///home/host/playground/haskell-test", "capabilities": { "workspace": { "applyEdit": true, "workspaceEdit": { "documentChanges": true, "resourceOperations": [ "create", "rename", "delete" ], "failureHandling": "textOnlyTransactional" }, "didChangeConfiguration": { "dynamicRegistration": true }, "didChangeWatchedFiles": { "dynamicRegistration": true }, "symbol": { "dynamicRegistration": true, "symbolKind": { "valueSet": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 ] } }, "executeCommand": { "dynamicRegistration": true }, "configuration": true, "workspaceFolders": true }, "textDocument": { "publishDiagnostics": { "relatedInformation": true }, "synchronization": { "dynamicRegistration": true, "willSave": true, "willSaveWaitUntil": true, "didSave": true }, "completion": { "dynamicRegistration": true, "contextSupport": true, "completionItem": { "snippetSupport": true, "commitCharactersSupport": true, "documentationFormat": [ "markdown", "plaintext" ], "deprecatedSupport": true, "preselectSupport": true }, "completionItemKind": { "valueSet": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ] } }, "hover": { "dynamicRegistration": true, "contentFormat": [ "markdown", "plaintext" ] }, "signatureHelp": { "dynamicRegistration": true, "signatureInformation": { "documentationFormat": [ "markdown", "plaintext" ], "parameterInformation": { "labelOffsetSupport": true } } }, "definition": { "dynamicRegistration": true }, "references": { "dynamicRegistration": true }, "documentHighlight": { "dynamicRegistration": true }, "documentSymbol": { "dynamicRegistration": true, "symbolKind": { "valueSet": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 ] } }, "codeAction": { "dynamicRegistration": true, "codeActionLiteralSupport": { "codeActionKind": { "valueSet": [ "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" ] } } }, "codeLens": { "dynamicRegistration": true }, "formatting": { "dynamicRegistration": true }, "rangeFormatting": { "dynamicRegistration": true }, "onTypeFormatting": { "dynamicRegistration": true }, "rename": { "dynamicRegistration": true, "prepareSupport": true }, "documentLink": { "dynamicRegistration": true }, "typeDefinition": { "dynamicRegistration": true }, "implementation": { "dynamicRegistration": true }, "declaration": { "dynamicRegistration": true }, "colorProvider": { "dynamicRegistration": true }, "foldingRange": { "dynamicRegistration": true, "rangeLimit": 5000, "lineFoldingOnly": true } } }, "initializationOptions": { "languageServerHaskell": { "hlintOn": true, "maxNumberOfProblems": 10, "completionSnippetsOn": true } }, "trace": "verbose", "workspaceFolders": [ { "uri": "file:///home/host/playground/haskell-test", "name": "haskell-test" } ] } 2019-07-29 23:16:07.278744285 [ThreadId 4] - run entered for hie-wrapp er(hie-wrapper) Version 0.11.0.0, Git revision cbc49f876baeec1e5e0bdfa2d 853bd705e82233c (dirty) (2946 commits) x86_64 ghc-8.6.5 2019-07-29 23: 16:07.292538849 [ThreadId 4] - Current directory:/home/host/playground/ haskell-test 2019-0 7-29 23:16:07.791349407 [ThreadId 4] - Cradle directory:/home/host/pla yground /haskell-test 2019 -07-29 23:16:07.791903 889 [ThreadId 4] - Using stack GHC version 2019-07-29 23:16:08.05970405 [ThreadId 4] - Project GHC version:8.6. 5 2019-07-29 23:16:08.0600019 [ ThreadId 4] - hie e xe candidates :["h ie-8.6.5","hie-8. 6","hie"] 2019-07-29 23:16:08 .060493136 [ThreadId 4] - found hie ex e at:/home/host/.local/b in/hie-8.6.5 2019-07-29 23:16: 08.060772465 [Th readId 4] - args:[ ] 2019-07-2 9 23:16:08.0609 35151 [ThreadId 4] - launching .... 2019 -07-29 23:16: 08.06345 8776 [ThreadId 4] - Using stack GHC version 2019- 07-29 23:16:08.317276702 [ThreadId 4] - Run entered f or HIE(hie-8.6.5) Versio n 0.11.0.0, Git revi sion cbc49f876ba eec1e5e0bdfa2d853bd 705e82233c (dirt y) (2946 comm its) x86_64 ghc-8.6.5 2019-07- 29 23:16:08 .318308998 [ThreadI d 4] - Current dir ectory:/home/host/ playground/haskell -test [Trace - 11:16:08 PM] Received response 'initialize - (0)' in 1064ms. Result: { "capabilities": { "typeDefinitionProvider": true, "textDocumentSync": { "openClose": true, "change": 2, "willSave": false, "willSaveWaitUntil": false, "save": { "includeText": false } }, "workspace": {}, "documentRangeFormattingProvider": true, "documentHighlightProvider": true, "executeCommandProvider": { "commands": [ "4072:applyrefact:applyOne", "4072:applyrefact:applyAll", "4072:applyrefact:lint", "4072:base:version", "4072:base:plugins", "4072:base:commands", "4072:base:commandDetail", "4072:build:prepare", "4072:build:isConfigured", "4072:build:configure", "4072:build:listTargets", "4072:build:listFlags", "4072:build:buildDirectory", "4072:build:buildTarget", "4072:ghcmod:check", "4072:ghcmod:type", "4072:ghcmod:casesplit", "4072:hare:demote", "4072:hare:dupdef", "4072:hare:iftocase", "4072:hare:liftonelevel", "4072:hare:lifttotoplevel", "4072:hare:rename", "4072:hare:deletedef", "4072:hare:genapplicative", "4072:hare:casesplit", "4072:hoogle:info", "4072:hoogle:lookup", "4072:hsimport:import", "4072:liquid:sayHello", "4072:liquid:sayHelloTo", "4072:package:add", "4072:pragmas:addPragma" ] }, "renameProvider": true, "definitionProvider": true, "hoverProvider": true, "codeActionProvider": true, "completionProvider": { "triggerCharacters": [ "." ], "resolveProvider": true }, "documentSymbolProvider": true, "documentFormattingProvider": true, "referencesProvider": true } } [Trace - 11:16:08 PM] Sending notification 'initialized'. Params: {} [Trace - 11:16:08 PM] Sending notification 'textDocument/didOpen'. Params: { "textDocument": { "uri": "file:///home/host/playground/haskell-test/app/Main.hs", "languageId": "haskell", "version": 1, "text": "module Main where\n\nimport Lib\n\nmain :: IO ()\nmain = someFunc\n" } } 2019-07-29 23:16:08.34809165 [ThreadId 10] - Using stack GHC version [Trace - 11:16:08 PM] Received notification 'window/logMessage'. Params: { "type": 4, "message": "Using hie version: Version 0.11.0.0, Git revision cbc49f876baeec1e5e0bdfa2d853bd705e82233c (dirty) (2946 commits) x86_64 ghc-8.6.5" } Using hie version: Version 0.11.0.0, Git revision cbc49f876baeec1e5e0bdfa2d853bd705e82233c (dirty) (2946 commits) x86_64 ghc-8.6.5 [Trace - 11:16:08 PM] Received notification 'window/logMessage'. Params: { "type": 4, "message": "Using hoogle db at: /home/host/.hoogle/default-haskell-5.0.17.hoo" } Using hoogle db at: /home/host/.hoogle/default-haskell-5.0.17.hoo [Trace - 11:16:08 PM] Sending request 'textDocument/documentHighlight - (1)'. Params: { "textDocument": { "uri": "file:///home/host/playground/haskell-test/app/Main.hs" }, "position": { "line": 5, "character": 0 } } [Trace - 11:16:09 PM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///home/host/playground/haskell-test/app/Main.hs", "diagnostics": [] } [Trace - 11:16:09 PM] Sending notification 'textDocument/didChange'. Params: { "bufnr": 1, "original": "", "textDocument": { "version": 2, "uri": "file:///home/host/playground/haskell-test/app/Main.hs" }, "contentChanges": [ { "range": { "start": { "line": 6, "character": 0 }, "end": { "line": 6, "character": 0 } }, "rangeLength": 0, "text": "\n" } ] } [Trace - 11:16:09 PM] Received response 'textDocument/documentHighlight - (1)' in 1014ms. Result: [ { "kind": 3, "range": { "start": { "line": 5, "character": 0 }, "end": { "line": 5, "character": 4 } } }, { "kind": 3, "range": { "start": { "line": 5, "character": 0 }, "end": { "line": 5, "character": 4 } } }, { "kind": 2, "range": { "start": { "line": 4, "character": 0 }, "end": { "line": 4, "character": 4 } } }, { "kind": 3, "range": { "start": { "line": 5, "character": 0 }, "end": { "line": 5, "character": 4 } } }, { "kind": 3, "range": { "start": { "line": 5, "character": 0 }, "end": { "line": 5, "character": 4 } } }, { "kind": 2, "range": { "start": { "line": 4, "character": 0 }, "end": { "line": 4, "character": 4 } } } ] [Trace - 11:16:09 PM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///home/host/playground/haskell-test/app/Main.hs", "diagnostics": [] } [Trace - 11:16:10 PM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///home/host/playground/haskell-test/app/Main.hs", "diagnostics": [] } [Trace - 11:16:10 PM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///home/host/playground/haskell-test/app/Main.hs", "diagnostics": [] } [Trace - 11:16:15 PM] Sending notification 'textDocument/didChange'. Params: { "bufnr": 1, "original": "", "textDocument": { "version": 3, "uri": "file:///home/host/playground/haskell-test/app/Main.hs" }, "contentChanges": [ { "range": { "start": { "line": 6, "character": 0 }, "end": { "line": 6, "character": 0 } }, "rangeLength": 0, "text": "\n" } ] } [Trace - 11:16:15 PM] Sending notification 'textDocument/didChange'. Params: { "bufnr": 1, "original": "", "textDocument": { "version": 4, "uri": "file:///home/host/playground/haskell-test/app/Main.hs" }, "contentChanges": [ { "range": { "start": { "line": 7, "character": 0 }, "end": { "line": 7, "character": 0 } }, "rangeLength": 0, "text": "m" } ] } [Trace - 11:16:16 PM] Sending request 'textDocument/completion - (2)'. Params: { "textDocument": { "uri": "file:///home/host/playground/haskell-test/app/Main.hs" }, "position": { "line": 7, "character": 1 }, "context": { "triggerKind": 1 } } [Trace - 11:16:16 PM] Received response 'textDocument/completion - (2)' in 5ms. Result: [ { "insertText": "main ", "kind": 3, "data": { "name_details": null, "hoogle_query": "main module:Main is:exact" }, "insertTextFormat": 2, "label": "main", "detail": "IO ()\nMain" }, { "insertText": "someFunc", "kind": 3, "data": { "name_details": [ "Lib", "haskell-test-0.1.0.0-3bpKUHesj1b3ndimbTaC1R", "v", "someFunc" ], "hoogle_query": "someFunc module:Lib is:exact" }, "insertTextFormat": 2, "label": "someFunc", "detail": "Lib" }, { "insertText": "concatMap", "kind": 3, "data": { "name_details": [ "Data.Foldable", "base", "v", "concatMap" ], "hoogle_query": "concatMap module:Prelude is:exact" }, "insertTextFormat": 2, "label": "concatMap", "detail": "Prelude" }, { "insertText": "elem", "kind": 3, "data": { "name_details": [ "Data.Foldable", "base", "v", "elem" ], "hoogle_query": "elem module:Prelude is:exact" }, "insertTextFormat": 2, "label": "elem", "detail": "Prelude" }, { "insertText": "foldMap", "kind": 3, "data": { "name_details": [ "Data.Foldable", "base", "v", "foldMap" ], "hoogle_query": "foldMap module:Prelude is:exact" }, "insertTextFormat": 2, "label": "foldMap", "detail": "Prelude" }, { "insertText": "mapM_", "kind": 3, "data": { "name_details": [ "Data.Foldable", "base", "v", "mapM_" ], "hoogle_query": "mapM_ module:Prelude is:exact" }, "insertTextFormat": 2, "label": "mapM_", "detail": "Prelude" }, { "insertText": "maximum", "kind": 3, "data": { "name_details": [ "Data.Foldable", "base", "v", "maximum" ], "hoogle_query": "maximum module:Prelude is:exact" }, "insertTextFormat": 2, "label": "maximum", "detail": "Prelude" }, { "insertText": "minimum", "kind": 3, "data": { "name_details": [ "Data.Foldable", "base", "v", "minimum" ], "hoogle_query": "minimum module:Prelude is:exact" }, "insertTextFormat": 2, "label": "minimum", "detail": "Prelude" }, { "insertText": "notElem", "kind": 3, "data": { "name_details": [ "Data.Foldable", "base", "v", "notElem" ], "hoogle_query": "notElem module:Prelude is:exact" }, "insertTextFormat": 2, "label": "notElem", "detail": "Prelude" }, { "insertText": "sum", "kind": 3, "data": { "name_details": [ "Data.Foldable", "base", "v", "sum" ], "hoogle_query": "sum module:Prelude is:exact" }, "insertTextFormat": 2, "label": "sum", "detail": "Prelude" }, { "insertText": "maybe", "kind": 3, "data": { "name_details": [ "Data.Maybe", "base", "v", "maybe" ], "hoogle_query": "maybe module:Prelude is:exact" }, "insertTextFormat": 2, "label": "maybe", "detail": "Prelude" }, { "insertText": "mapM", "kind": 3, "data": { "name_details": [ "Data.Traversable", "base", "v", "mapM" ], "hoogle_query": "mapM module:Prelude is:exact" }, "insertTextFormat": 2, "label": "mapM", "detail": "Prelude" }, { "insertText": "fmap", "kind": 3, "data": { "name_details": [ "GHC.Base", "base", "v", "fmap" ], "hoogle_query": "fmap module:Prelude is:exact" }, "insertTextFormat": 2, "label": "fmap", "detail": "Prelude" }, { "insertText": "map", "kind": 3, "data": { "name_details": [ "GHC.Base", "base", "v", "map" ], "hoogle_query": "map module:Prelude is:exact" }, "insertTextFormat": 2, "label": "map", "detail": "Prelude" }, { "insertText": "mappend", "kind": 3, "data": { "name_details": [ "GHC.Base", "base", "v", "mappend" ], "hoogle_query": "mappend module:Prelude is:exact" }, "insertTextFormat": 2, "label": "mappend", "detail": "Prelude" }, { "insertText": "mconcat", "kind": 3, "data": { "name_details": [ "GHC.Base", "base", "v", "mconcat" ], "hoogle_query": "mconcat module:Prelude is:exact" }, "insertTextFormat": 2, "label": "mconcat", "detail": "Prelude" }, { "insertText": "mempty", "kind": 3, "data": { "name_details": [ "GHC.Base", "base", "v", "mempty" ], "hoogle_query": "mempty module:Prelude is:exact" }, "insertTextFormat": 2, "label": "mempty", "detail": "Prelude" }, { "insertText": "enumFrom", "kind": 3, "data": { "name_details": [ "GHC.Enum", "base", "v", "enumFrom" ], "hoogle_query": "enumFrom module:Prelude is:exact" }, "insertTextFormat": 2, "label": "enumFrom", "detail": "Prelude" }, { "insertText": "enumFromThen", "kind": 3, "data": { "name_details": [ "GHC.Enum", "base", "v", "enumFromThen" ], "hoogle_query": "enumFromThen module:Prelude is:exact" }, "insertTextFormat": 2, "label": "enumFromThen", "detail": "Prelude" }, { "insertText": "enumFromThenTo", "kind": 3, "data": { "name_details": [ "GHC.Enum", "base", "v", "enumFromThenTo" ], "hoogle_query": "enumFromThenTo module:Prelude is:exact" }, "insertTextFormat": 2, "label": "enumFromThenTo", "detail": "Prelude" }, { "insertText": "enumFromTo", "kind": 3, "data": { "name_details": [ "GHC.Enum", "base", "v", "enumFromTo" ], "hoogle_query": "enumFromTo module:Prelude is:exact" }, "insertTextFormat": 2, "label": "enumFromTo", "detail": "Prelude" }, { "insertText": "fromEnum", "kind": 3, "data": { "name_details": [ "GHC.Enum", "base", "v", "fromEnum" ], "hoogle_query": "fromEnum module:Prelude is:exact" }, "insertTextFormat": 2, "label": "fromEnum", "detail": "Prelude" }, { "insertText": "maxBound", "kind": 3, "data": { "name_details": [ "GHC.Enum", "base", "v", "maxBound" ], "hoogle_query": "maxBound module:Prelude is:exact" }, "insertTextFormat": 2, "label": "maxBound", "detail": "Prelude" }, { "insertText": "minBound", "kind": 3, "data": { "name_details": [ "GHC.Enum", "base", "v", "minBound" ], "hoogle_query": "minBound module:Prelude is:exact" }, "insertTextFormat": 2, "label": "minBound", "detail": "Prelude" }, { "insertText": "toEnum", "kind": 3, "data": { "name_details": [ "GHC.Enum", "base", "v", "toEnum" ], "hoogle_query": "toEnum module:Prelude is:exact" }, "insertTextFormat": 2, "label": "toEnum", "detail": "Prelude" }, { "insertText": "isDenormalized", "kind": 3, "data": { "name_details": [ "GHC.Float", "base", "v", "isDenormalized" ], "hoogle_query": "isDenormalized module:Prelude is:exact" }, "insertTextFormat": 2, "label": "isDenormalized", "detail": "Prelude" }, { "insertText": "fromInteger", "kind": 3, "data": { "name_details": [ "GHC.Num", "base", "v", "fromInteger" ], "hoogle_query": "fromInteger module:Prelude is:exact" }, "insertTextFormat": 2, "label": "fromInteger", "detail": "Prelude" }, { "insertText": "signum", "kind": 3, "data": { "name_details": [ "GHC.Num", "base", "v", "signum" ], "hoogle_query": "signum module:Prelude is:exact" }, "insertTextFormat": 2, "label": "signum", "detail": "Prelude" }, { "insertText": "divMod", "kind": 3, "data": { "name_details": [ "GHC.Real", "base", "v", "divMod" ], "hoogle_query": "divMod module:Prelude is:exact" }, "insertTextFormat": 2, "label": "divMod", "detail": "Prelude" }, { "insertText": "fromIntegral", "kind": 3, "data": { "name_details": [ "GHC.Real", "base", "v", "fromIntegral" ], "hoogle_query": "fromIntegral module:Prelude is:exact" }, "insertTextFormat": 2, "label": "fromIntegral", "detail": "Prelude" }, { "insertText": "fromRational", "kind": 3, "data": { "name_details": [ "GHC.Real", "base", "v", "fromRational" ], "hoogle_query": "fromRational module:Prelude is:exact" }, "insertTextFormat": 2, "label": "fromRational", "detail": "Prelude" }, { "insertText": "lcm", "kind": 3, "data": { "name_details": [ "GHC.Real", "base", "v", "lcm" ], "hoogle_query": "lcm module:Prelude is:exact" }, "insertTextFormat": 2, "label": "lcm", "detail": "Prelude" }, { "insertText": "mod", "kind": 3, "data": { "name_details": [ "GHC.Real", "base", "v", "mod" ], "hoogle_query": "mod module:Prelude is:exact" }, "insertTextFormat": 2, "label": "mod", "detail": "Prelude" }, { "insertText": "quotRem", "kind": 3, "data": { "name_details": [ "GHC.Real", "base", "v", "quotRem" ], "hoogle_query": "quotRem module:Prelude is:exact" }, "insertTextFormat": 2, "label": "quotRem", "detail": "Prelude" }, { "insertText": "rem", "kind": 3, "data": { "name_details": [ "GHC.Real", "base", "v", "rem" ], "hoogle_query": "rem module:Prelude is:exact" }, "insertTextFormat": 2, "label": "rem", "detail": "Prelude" }, { "insertText": "compare", "kind": 3, "data": { "name_details": [ "GHC.Classes", "ghc-prim", "v", "compare" ], "hoogle_query": "compare module:Prelude is:exact" }, "insertTextFormat": 2, "label": "compare", "detail": "Prelude" }, { "insertText": "max", "kind": 3, "data": { "name_details": [ "GHC.Classes", "ghc-prim", "v", "max" ], "hoogle_query": "max module:Prelude is:exact" }, "insertTextFormat": 2, "label": "max", "detail": "Prelude" }, { "insertText": "min", "kind": 3, "data": { "name_details": [ "GHC.Classes", "ghc-prim", "v", "min" ], "hoogle_query": "min module:Prelude is:exact" }, "insertTextFormat": 2, "label": "min", "detail": "Prelude" } ] [Trace - 11:16:16 PM] Sending request 'completionItem/resolve - (3)'. Params: { "insertText": "main ", "kind": 3, "data": { "name_details": null, "hoogle_query": "main module:Main is:exact" }, "insertTextFormat": 1, "label": "main", "detail": "IO ()\nMain" } [Trace - 11:16:16 PM] Received response 'completionItem/resolve - (3)' in 34ms. Result: { "kind": 3, "data": { "name_details": null, "hoogle_query": "main module:Main is:exact" }, "insertTextFormat": 1, "documentation": { "kind": "markdown", "value": "```haskell\nmain :: IO ()\n```\nEntry point for the `dhall` executable\n\n[More info](https://hackage.haskell.org/package/dhall/docs/Dhall-Main.html#v:main)" }, "label": "main", "detail": "IO ()\nMain" } [Trace - 11:16:16 PM] Sending notification '$/cancelRequest'. Params: { "id": 3 } [Trace - 11:16:16 PM] Sending request 'completionItem/resolve - (4)'. Params: { "insertText": "map", "kind": 3, "data": { "name_details": [ "GHC.Base", "base", "v", "map" ], "hoogle_query": "map module:Prelude is:exact" }, "insertTextFormat": 1, "label": "map", "detail": "Prelude" } [Trace - 11:16:16 PM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///home/host/playground/haskell-test/app/Main.hs", "diagnostics": [] } [Trace - 11:16:16 PM] Received response 'completionItem/resolve - (4)' in 49ms. Result: { "insertText": "map ${1:a -> b} ${2:[a]}", "kind": 3, "data": { "name_details": [ "GHC.Base", "base", "v", "map" ], "hoogle_query": "map module:Prelude is:exact" }, "insertTextFormat": 1, "documentation": { "kind": "markdown", "value": "```haskell\nmap :: (a -> b) -> [a] -> [b]\n```\n`map` `f xs` is the list obtained by applying `f`\nto each element of `xs`, i.e.,\n\n```haskell\n\nmap f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]\nmap f [x1, x2, ...] == [f x1, f x2, ...]\n```\n\n[More info](https://hackage.haskell.org/package/base/docs/Prelude.html#v:map)" }, "label": "map", "detail": "(a -> b) -> [a] -> [b]\nPrelude" } [Trace - 11:16:17 PM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///home/host/playground/haskell-test/app/Main.hs", "diagnostics": [ { "severity": 1, "range": { "start": { "line": 7, "character": 0 }, "end": { "line": 7, "character": 1 } }, "source": "ghcmod", "message": "Parse error: module header, import declaration\nor top-level declaration expected." } ] } [Trace - 11:16:17 PM] Sending notification 'textDocument/didChange'. Params: { "bufnr": 1, "original": "", "textDocument": { "version": 5, "uri": "file:///home/host/playground/haskell-test/app/Main.hs" }, "contentChanges": [ { "range": { "start": { "line": 7, "character": 1 }, "end": { "line": 7, "character": 1 } }, "rangeLength": 0, "text": "ap ${1:a -> b} ${2:[a]}" } ] } [Trace - 11:16:17 PM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///home/host/playground/haskell-test/app/Main.hs", "diagnostics": [ { "severity": 1, "range": { "start": { "line": 7, "character": 0 }, "end": { "line": 7, "character": 1 } }, "source": "ghcmod", "message": "Parse error: module header, import declaration\nor top-level declaration expected." }, { "severity": 3, "range": { "start": { "line": 7, "character": 5 }, "end": { "line": 7, "character": 100000 } }, "code": "parser", "source": "hlint", "message": "/tmp/ghc-mod4073/Main4072-4.hs:8:6: error: parse error on input `{'\n main = someFunc\n \n> map ${1:a -> b} ${2:[a]}\n\n" } ] } [Trace - 11:16:18 PM] Received notification 'textDocument/publishDiagnostics'. Params: { "uri": "file:///home/host/playground/haskell-test/app/Main.hs", "diagnostics": [ { "severity": 1, "range": { "start": { "line": 0, "character": 0 }, "end": { "line": 1, "character": 0 } }, "source": "ghcmod", "message": "" }, { "severity": 1, "range": { "start": { "line": 7, "character": 5 }, "end": { "line": 7, "character": 6 } }, "source": "ghcmod", "message": "parse error on input ‘{’" } ] } ```

Avi-D-coder commented 5 years ago

This is not a Coc issue insertTextFormat should be 2