wasp/waspls
Craig McIlwrath 485f92ca13
Implement autocompletion in waspls (#681)
* Refactor diagnostics

Now stores diagnostics info in the state instead of computing when diagnostics
are being published.

* Refactor Wasp.LSP.State into multiple files

* Move all LSP type imports to qualified

More consistent and more clear where things come from

* Use new concrete parser in diagnostics

Before running full analyzer, runs CST parser to check if it parses correctly
and to collect many parse errors. The CST is always put into the state. Then, if
successful, the full analyzer gets run as before.

* Add basic autocompletion

Always suggests every declaration name in the file, with no context-sensitivity.

* Refactor some names

* Syntax tree traversal code

* Attempt at context-sensitive autocomplete

Not done, but doing some more refactoring before going back to this

* Refactor Control.Syntax.Traverse to use total functions

* Make autocompletion context sensitive

It actually works now

* Miscellaneous code clean up

* Fix incorrect type name

* Fix syntax traversal bug with back

* Remove unreadable symbols from syntax traversal

* Refactor completion code

* Refactor syntax traversal code

* Apply suggestions from code review

Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>

* Feedback from code review

* Add tests for Control.Monad.Loops.untilM

Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
2022-08-09 09:38:56 -04:00
..
exe Make basic Wasp LSP server (#611) 2022-06-24 11:23:09 -04:00
src Implement autocompletion in waspls (#681) 2022-08-09 09:38:56 -04:00
test Implement autocompletion in waspls (#681) 2022-08-09 09:38:56 -04:00
.gitignore Make basic Wasp LSP server (#611) 2022-06-24 11:23:09 -04:00
.hlint.yaml Make basic Wasp LSP server (#611) 2022-06-24 11:23:09 -04:00
cabal.project Make basic Wasp LSP server (#611) 2022-06-24 11:23:09 -04:00
CHANGELOG.md Make basic Wasp LSP server (#611) 2022-06-24 11:23:09 -04:00
hie.yaml Make basic Wasp LSP server (#611) 2022-06-24 11:23:09 -04:00
LICENSE Make basic Wasp LSP server (#611) 2022-06-24 11:23:09 -04:00
README.md Make basic Wasp LSP server (#611) 2022-06-24 11:23:09 -04:00
waspls.cabal Implement autocompletion in waspls (#681) 2022-08-09 09:38:56 -04:00
watch Implement autocompletion in waspls (#681) 2022-08-09 09:38:56 -04:00

Waspls

This directory contains source code of the wasp language server (aka waspls) and this README is aimed at the contributors to the project.

Overview

waspls is implemented in Haskell. It depends on waspc for parsing and analyzing wasp source code. Cabal is currently configured to look in ../waspc for the waspc package, so do not move waspls out of the wasp repo without adjusting this line in cabal.project.

Usage

Use in any place an LSP server can be used. Run waspls --help for usage information.