From 5f8e256050138a60f24c771c2bbf9e3c5538b8e1 Mon Sep 17 00:00:00 2001 From: KtorZ Date: Sat, 21 Oct 2023 21:39:30 +0200 Subject: [PATCH] Present aiken-lsp & fill-in CHANGELOG --- CHANGELOG.md | 9 ++++++--- crates/aiken-lsp/README.md | 39 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 crates/aiken-lsp/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c4cb2140..b644aef5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,9 @@ - **aiken-project**: The `plutus.json` blueprint now contains a `compiler.name` and `compiler.version` fields. -- **aiken-prokect**: Add compiler and system information to panic error report. +- **aiken-prokect**: Added compiler and system information to panic error report. +- **aiken-lsp**: Added quickfix suggestions for unknown variables, modules and + constructors. ### Changed @@ -20,8 +22,9 @@ ### Fixed -- **aiken-lang**: improved error messages for `a |> b(x)` -- **uplc**: Fixed cost model issue when using div, quot, rem, mod +- **aiken-lang**: improved error messages for `a |> b(x)`. +- **uplc**: Fixed cost model issue when using div, quot, rem, mod. +- **aiken-lsp**: Improved hovering suggestions and type annotations. ## v1.0.19-alpha - 2023-09-29 diff --git a/crates/aiken-lsp/README.md b/crates/aiken-lsp/README.md new file mode 100644 index 00000000..0a6ae7c7 --- /dev/null +++ b/crates/aiken-lsp/README.md @@ -0,0 +1,39 @@ +# Aiken Language Server Protocol (LSP) + +The `aiken` command-line comes built-in with a _Language Server_ implementing +(part of) the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/). + +## Getting Started + +### General + +Regardless of your IDE, you'll likely need the following information to configure your language client: + +- command: `aiken lsp` + > **Note** + > The command is hidden from the command-line help usage + +- root pattern: `aiken.toml` +- filetype: `aiken` `(.ak)` + +### VsCode + +Simply install the [VSCode Aiken extension](https://marketplace.visualstudio.com/items?itemName=TxPipe.aiken) from the official marketplace. + +### NeoVim + +If you're using NeoVim and using [`nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig) then there's almost +nothing to do as Aiken is directly supported. Simply follow the [official +instructions](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#aiken) + +## Supported Capabilities + +- [x] Document syncing and on-the-fly compilation +- [x] Document formatting (akin to `aiken fmt`) +- [x] Go-to definition +- [x] Type annotation on hover +- [x] Code actions providing quickfixes for a variety of errors: + - [x] `aiken::check::unknown::variable` + - [x] `aiken::check::unknown::type` + - [x] `aiken::check::unknown::type_constructor` + - [x] `aiken::check::unknown::module`