Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1461 from bubba/new-haskell-lsp-options
Browse files Browse the repository at this point in the history
Update LSP options for new haskell-lsp-0.18
  • Loading branch information
lukel97 authored Nov 19, 2019
2 parents f871712 + 81cebbe commit d78dadb
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions src/Haskell/Ide/Engine/Transport/LspStdio.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import qualified Data.ByteString.Lazy as BL
import Data.Coerce (coerce)
import Data.Default
import Data.Foldable
import Data.List.NonEmpty ( nonEmpty )
import qualified Data.Map as Map
import Data.Maybe
import Data.Semigroup (Semigroup(..), Option(..), option)
Expand Down Expand Up @@ -969,32 +968,13 @@ hieOptions commandIds =
def { Core.textDocumentSync = Just syncOptions
-- The characters that trigger completion automatically.
, Core.completionTriggerCharacters = Just ['.']

-- The list of all possible characters that commit a completion. This field can be used
-- if clients don't support individual commmit characters per completion item. See
-- `_commitCharactersSupport`.
-- , completionAllCommitCharacters :: Maybe [Char]

-- The characters that trigger signature help automatically.
-- , signatureHelpTriggerCharacters :: Maybe [Char]

-- List of characters that re-trigger signature help.
-- These trigger characters are only active when signature help is already showing. All trigger characters
-- are also counted as re-trigger characters.
-- , signatureHelpRetriggerCharacters :: Maybe [Char]

-- CodeActionKinds that this server may return.
-- The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
-- may list out every specific kind they provide.
-- , codeActionKinds :: Maybe [J.CodeActionKind]

-- The list of characters that triggers on type formatting.
-- If you set `documentOnTypeFormattingHandler`, you **must** set this.
, Core.documentOnTypeFormattingTriggerCharacters = nonEmpty []

-- The commands to be executed on the server.
-- If you set `executeCommandHandler`, you **must** set this.
, Core.executeCommandCommands = Just commandIds

This comment has been minimized.

Copy link
@alanz

alanz Nov 19, 2019

Collaborator

I put these in as a commented out values so we could have an idea of the possibilities for future updates.

I guess they are subject to rot, but maybe we should say that there are others, consult the docs?

This comment has been minimized.

Copy link
@lukel97

lukel97 Nov 19, 2019

Author Collaborator

Good point, will leave in a note

-- As of 2018-05-24, vscode needs the commands to be registered
-- otherwise they will not be available as codeActions (will be
-- silently ignored, despite UI showing to the contrary).
--
-- Hopefully the end May 2018 vscode release will stabilise
-- this, it is a major rework of the machinery anyway.
, Core.executeCommandCommands = Just commandIds
}


Expand Down

0 comments on commit d78dadb

Please sign in to comment.