Language Server for asyncflows
Configuration
To associate an asyncflows YAML file with the language server, place this snippet at the top of the file:
# asyncflows-language-server
If you specificed schema like this:
# yaml-language-server: $schema=https://raw.githubusercontent.com/asynchronous-flows/asyncflows/main/schemas/asyncflows_schema.json
It will be automatically updated to the first one.
Then, follow the instructions for your editor.
If your editor is not specified here, but you would like to use the language server, please open an issue.
Installation
VSCode
You can find the extension on the VSCode marketplace.
Alternatively, install it manually:
- Download
vsix
file from here.
- Navigate to the
Extensions
view
- Click on the
...
menu
- Select
Install from VSIX...
- Select the downloaded
vsix
file
- Reload the window
NeoVim
local nvim_lsp = require('lspconfig')
local configs = require('lspconfig.configs')
if not configs.asyncflows_lsp then
configs.asyncflows_lsp = {
default_config = {
name = "asyncflows-lsp",
cmd = { 'asyncflows-lsp --stdio' },
filetypes = { 'yaml' },
root_dir = function(fname)
return "."
end,
},
}
end
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
nvim_lsp.asyncflows_lsp.setup {
capabilities = capabilities
}
nvim_lsp.asyncflows_lsp.setup {
}
Helix
[language-server.asyncflows-lsp]
command = "asyncflows-lsp"
args = ["--stdio"]
[[language]]
name = "yaml"
language-servers = ["asyncflows-lsp", "yaml-lsp"]
Development
VSCode
git clone https://github.com/asynchronous-flows/asyncflows-lsp --depth 1
cd asyncflows-lsp
make build
code editors/code
Other editors
npm install -g asyncflows-lsp