dhall-haskell/dhall-lsp-server
Frederik Ramcke 2cd4ed948f dhall-lsp-server: Improve type-on-hover behaviour over binders (#1062)
* Improve type-on-hover behaviour over binders

Dhall's parser does not generate `Src` annotations for the names in
binders, which means that it's not quite as straight-forward to check
whether the user meant to hover over it and see its type as one would
hope. As a result, the current "naive" implementation sometimes behaves
slightly unintuitively and returns the type of the entire expression,
rather than the type of the bound variable. E.g.
  let x = 2 in "text"
      ~
would result in the type `Text` being displayed, rather than `Natural`
as one would expect. Since the language server also marks the expression
whose type is being displayed, the behaviour isn't quite that bad in
practice (we aren't falsely led to believe that `x` has type `Text`).

This change recovers the `Src` information describing the bound variable
names and handles those cases in a way that should be more in line with
the expectations of the user.

* Fix exprAt not handling multi-lets correctly

* Fix merge left-overs
2019-07-06 23:17:52 +00:00
..
app Simplify dhall-lsp-server and reorganise its modules (#992) 2019-06-07 07:47:07 +00:00
src/Dhall/LSP dhall-lsp-server: Improve type-on-hover behaviour over binders (#1062) 2019-07-06 23:17:52 +00:00
test Simplify dhall-lsp-server and reorganise its modules (#992) 2019-06-07 07:47:07 +00:00
ChangeLog.md LSP. Fix import errors location. Minor clean-up. Add tests for backend/diagnostics. (#868) 2019-03-26 13:20:25 +00:00
default.nix Add dhall-lsp-server (#843) 2019-03-06 21:41:38 -08:00
dhall-lsp-server.cabal dhall-lsp-server: Implement caching (#1040) 2019-07-01 17:30:32 +00:00
LICENSE Add dhall-lsp-server (#843) 2019-03-06 21:41:38 -08:00
README.md LSP. Fix import errors location. Minor clean-up. Add tests for backend/diagnostics. (#868) 2019-03-26 13:20:25 +00:00
Setup.hs Add dhall-lsp-server (#843) 2019-03-06 21:41:38 -08:00
shell.nix Add Nix support for dhall-lsp-server project (#849) 2019-03-10 09:43:44 -07:00

dhall-lsp-server

This is a Language Server Protocol server implementation for the Dhall programming language.

For installation or development instructions, see: