hls-cabal-plugin-2.6.0.0: Cabal integration plugin with Haskell Language Server
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ide.Plugin.Cabal.Completion.Completer.Simple

Synopsis

Documentation

noopCompleter :: Completer Source #

Completer to be used when no completion suggestions are implemented for the field

errorNoopCompleter :: Log -> Completer Source #

Completer to be used when no completion suggestions are implemented for the field and a log message should be emitted.

constantCompleter :: [Text] -> Completer Source #

Completer to be used when a simple set of values can be completed for a field.

nameCompleter :: Completer Source #

Completer to be used for the field name: value.

This is almost always the name of the cabal file. However, it is not forbidden by the specification to have a different name, it is just forbidden on hackage.

weightedConstantCompleter :: [Text] -> Map Text Double -> Completer Source #

Completer to be used when a set of values with priority weights attached to some values are to be completed for a field.

The higher the weight, the higher the priority to show the value in the completion suggestion.

If the value does not occur in the weighted map its weight is defaulted to zero.

mkDefaultCompletionItem :: Text -> CompletionItem Source #

Creates a CompletionItem with the given text as the label where the completion item kind is keyword.

mkSimpleCompletionItem :: Range -> Text -> CompletionItem Source #

Returns a CompletionItem with the given starting position and text to be inserted, where the displayed text is the same as the inserted text.

mkCompletionItem :: Range -> Text -> Text -> CompletionItem Source #

Returns a completionItem with the given starting position, text to be inserted and text to be displayed in the completion suggestion.