Skip to content

How to prevent inserting a space after the type? #2786

Closed
@Eason0210

Description

@Eason0210

Discussed in #2785

Originally posted by Eason0210 March 16, 2022
I use Emacs + eglot + company + yasnippet, when I insert the name of a type( Int Double or Float), HLS will insert a space after it.
Any one known how to disable this feature?

For example: I input length' :: [Int] , and I will get length' :: [Int ]

image image

The same issue also happened on vscode

From the EGLOT event log, you can see HLS return is "Int "

 [stderr] 2022-03-16 17:40:00.516289 [ThreadId 171] INFO hls:	finish: Completion (took 0.00s)
[server-reply] (id:2) Wed Mar 16 17:40:01 2022:
(:id 2 :jsonrpc "2.0" :result
     (:isIncomplete t :items
                    [(:detail ":: Type" :documentation
                              (:kind "markdown" :value "*Imported from 'Prelude'*\n* * *\n\n")
                              :insertText "Int " :insertTextFormat 2 :kind 22 :label "Int" :sortText "00")
                     (:detail ":: Type" :documentation
                              (:kind "markdown" :value "*Imported from 'Prelude'*\n* * *\n\n")
                              :insertText "Integer " :insertTextFormat 2 :kind 22 :label "Integer" :sortText "01")
                     (:detail ":: Type -> Constraint" :documentation
                              (:kind "markdown" :value "*Imported from 'Prelude'*\n* * *\n\n")
                              :insertText "Integral ${1:Type}" :insertTextFormat 2 :kind 8 :label "Integral" :sortText "02")

# .... more ....

Emacs 29.0.50
Mac OS 12.3
HLS: 1.6.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: in discussionNot actionable, because discussion is still ongoing or there's no decision yettype: supportUser support tickets, questions, help with setup etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions