Ecosyste.ms: Repos
An open API service providing repository metadata for many open source software ecosystems.
Package Usage: hackage: dhall-lsp-server
[Last Documentation]
Package maintainers
For package maintainers and hackage trustees
Candidates
The Dhall language integration consists of the following parts:
The "official" releases can be installed as follows:
Note The versions of vscode-dhall-lsp-server and dhall-lsp-server need not necessarily match: an older client version will simply not expose all commands available in the backend, while an older server might not implement all commands exposed in the UI.
vscode-dhall-lsp-server
dhall-lsp-serverÂ
For detailed instructions as well as instructions using cabal or nix, see dhall-haskell - README. To install dhall-lsp-server using stack:
DiagnosticsÂ
Every time you save a Dhall file it is parsed and typechecked, and any errors are marked. You can hover over the offending code to see the error message; to see a detailed explanation in the case of type errors, click the Explain link in the hover box.
Clickable importsÂ
As long as the file parses successfully, all (local file and remote) imports will be underlined and clickable.
Type on hoverÂ
You can hover over any part of the code and it will tell you the type of the subexpression at that point â if you highlight an identifier you see its type; if you highlight the -> in a function you will see the type of the entire function. This feature only works if the code passes the typechecker!
Code completionÂ
As you type you will be offered completions for:
This is the only feature that works even when the file does not parse (or typecheck).
Formatting and LintingÂ
Right click and select "Format Document" to run the file through the Dhall formatter. The command "Lint and Format" can be selected via the Command Palette (Ctrl+Shift+P); this will run the linter over the file, removing unused let bindings and formatting the result.
The default formatting behavior is to infer the character set used in the file (Unicode/ASCII operators).
This can be overriden by using the Dhall LSP settings. For example in VS Code's settings.json:
"vscode-dhall-lsp-server.character-set": "ascii" to always format using the ASCII character set
"vscode-dhall-lsp-server.character-set": "unicode" to always format using the Unicode character set
Annotate letsÂ
Right-click the bound identifier in a let binding and select "Annotate Let binding with its type" to do exactly that.
Freeze importsÂ
Right-click an import statement and select "Freeze (refreeze) import" to add (or update) a semantic hash annotation to the import. You can also select "Freeze (refreeze) all imports" from the Command Palette to freeze all imports at once.
Note that this feature behaves slightly differently from the dhall freeze command in that the hash annotations are inserted without re-formatting the rest of the code!
dhall-lsp-serverÂ
See dhall-haskell - README for general development instructions.
vscode-dhall-lsp-server
Integration tests
The dhall-lsp-server:tests testsuite depends on the dhall-lsp-server executable. Since stack isn't aware of this dependency, stack test dhall-lsp-server:tests may use an old executable version. Run these tests with
to ensure that the executable is up-to-date.
23 versions
Latest release: about 1 year ago
1 dependent package
8,843 downloads total
View more package details: https://packages.ecosyste.ms/registries/hackage.haskell.org/packages/dhall-lsp-server
View more repository details: https://repos.ecosyste.ms/hosts/GitHub/repositories/dhall-lang%2Fdhall-haskell
Dependent Repos 2
kindaro/cabal-prettify
- * test-data/other/dhall-lsp-server.cabal
Size: 356 KB - Last synced: 30 days ago - Pushed: about 1 month ago
nikita-volkov/dhall-haskell Fork of dhall-lang/dhall-haskell
Maintainable configuration files- * dhall-lsp-server/dhall-lsp-server.cabal
- * dhall-lsp-server/dhall-lsp-server.cabal
Size: 7.4 MB - Last synced: about 1 year ago - Pushed: over 1 year ago
zhutony/dhall-haskell Fork of dhall-lang/dhall-haskell
Maintainable configuration files- * dhall-lsp-server/dhall-lsp-server.cabal
- * dhall-lsp-server/dhall-lsp-server.cabal
Size: 8.89 MB - Last synced: 8 months ago - Pushed: over 1 year ago