Update to use the `lsp-2.4` API. Closes#1350.
Initially I hoped that any `lsp-2.x` would work. However, the `SeverDefinition` record changed in `2.2` so I initially set that as a lower bound. But then it turns out that `2.4` changed which module it is importing `Rope` from; since we work with ropes in the `Hover` module it matters since we have to import the matching module. Updating to the new `Rope` type also required some changes as the API provided by the new `Rope.Mixed` module is a bit different than the old module, so we would not even be able to easily put in CPP to conditionally depend on the right rope module depending on the `lsp` version. Finally, this means dropping support for GHC 9.0 since `lsp-2.4` does not support it.
Along the way I also fixed a minor issue related to showing type information returned by the LSP server, so that it uses `prettyTypeLine` to display the type on a single line (in my editor, when the type does not use a single line it gets cut off). For comparison see also #1610.
This refactoring was a big pain because a lot of things (names of types and constructors, locations of exports, etc...) changed from 1.x to 2.x, but there was not much in the way of documenting what had changed. =( I am pretty sure that all functionality has been preserved but I would appreciate independent confirmation.
This is also a prerequisite for updating other dependencies such as the `base` version (I will open a follow-up PR soon) since the old `lsp-1.x` versions do not allow many newer versions of various dependencies.
* move the VSCode extension under "swarm-game" organisation
* add Open VSX Registry to "Deploy Extension" GitHub Action
* bump version, so it gets pushed once tagged
* closes#1453
Closes#1428
Since the authoritative validation of scenario files is actually performed by virtue of `swarm` parsing them, this CI job actually exists to ensure the JSON Schema descriptions are accurate. This is important for two purposes:
* Documentation is generated from the JSON Schema files (#1436)
* JSON Schema has integration with VS Code and other IDEs
# Testing
Verified that the schema checker action does indeed work by intentionally pushing an invalid scenario file in f789f81.
Support GHC 9.6 / `base-4.18`, `mtl-2.3`, `megaparsec-9.4`, `servant-0.20`, `servant-docs-0.13`, `servant-server-0.20`, `template-haskell-2.20`, `optparse-applicative-0.18`, fix a bunch of new warnings, and update CI to test on GHC 9.6.
---------
Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Previously the action did not run because of an error:
```
The workflow is not valid. .github/workflows/check_todos.yml (Line: 14, Col: 3):
The identifier 'Enforce issue references' is invalid. IDs may only contain alphanumeric characters, '_', and '-'.
IDs must start with a letter or '_' and and must be less than 100 characters.
```
- fixes#1101
- replace `XXX` with `TODO: #<issue number>`
TODO has simply better editor support. The GitHub plugin will suggest creating an issue for TODO that does not have the issue number after it and some editors may even ask for confirmation when committing code with TODO.
- bump extension version to 0.0.6
- fix highlighting
- do not let an "empty decimal" (`[0-9]*`) match every time. 😉
- add snapshot test
- add VSCode GitHub Action to build and test
- add VSCode GitHub Action to release the extension
- it is triggered when pushing a tag `swarm-language-vscode-*`
- closes#609
- query GitHub Releases for a new version
- add `swarm version` command
- show the version notification in the main menu
- add a new app-wide logging queue
- show the app-wide logs in the main menu as Messages
- catch and show the web API failure in the Messages
- closes#66
- closes#627
The action presently runs twice because both `on` conditions matche
every contributions. With this change, the push action only triggers
for the final push to the main branch, and the pull_requeste action
only triggers for PR made for the main branch.
That also means restyled PR should not trigger CI as they are made
for non main branches.
* Fix doctests
* Regenerate haskell-ci with config
- use latest haskell-ci
- configure haskell-ci to use doctest
* Update tested with compiler
- update cabal tested-with field
- update .mergify.yaml to new compiler
- restore note about mergify in haskell-ci
This change improves the user experience when editing swarm code outside of the REPL with:
- CLI for a `format` command to quickly parse and type check a file.
- Basic LSP server to provide IDE feedback on save, e.g. visual squiggly for errors.
- Initial emacs mode.
Fixes#82#110
This change configures the mergify bot so that:
- PR are validated with the tip of the project before merge
to prevent incompatible PRs to be merged at once which could
break the CI.
- PR maintainer uses a consistent smart squash workflow