diff options
| -rw-r--r-- | doc/server_configurations.md | 45 | ||||
| -rw-r--r-- | doc/server_configurations.txt | 45 |
2 files changed, 90 insertions, 0 deletions
diff --git a/doc/server_configurations.md b/doc/server_configurations.md index 3edb50f9..9e55d929 100644 --- a/doc/server_configurations.md +++ b/doc/server_configurations.md @@ -22,6 +22,7 @@ autogenerated from the Lua files. You can view this file in Nvim by running - [bright_script](#bright_script) - [bsl_ls](#bsl_ls) - [bufls](#bufls) +- [cadence](#cadence) - [ccls](#ccls) - [clangd](#clangd) - [clarity_lsp](#clarity_lsp) @@ -961,6 +962,50 @@ require'lspconfig'.bufls.setup{} ``` +## cadence + +[Cadence Language Server](https://github.com/onflow/cadence-tools/tree/master/languageserver) +using the [flow-cli](https://developers.flow.com/tools/flow-cli). + +The `flow` command from flow-cli must be available. For install instructions see +[the docs](https://developers.flow.com/tools/flow-cli/install#install-the-flow-cli) or the +[Github page](https://github.com/onflow/flow-cli). + +By default the configuration is taken from the closest `flow.json` or the `flow.json` in the users home directory. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cadence.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "flow", "cadence", "language-server" } + ``` + - `filetypes` : + ```lua + { "cdc" } + ``` + - `init_options` : + ```lua + { + numberOfAccounts = "1" + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + util.root_pattern('flow.json') or vim.env.HOME + ``` + + ## ccls https://github.com/MaskRay/ccls/wiki diff --git a/doc/server_configurations.txt b/doc/server_configurations.txt index 3edb50f9..9e55d929 100644 --- a/doc/server_configurations.txt +++ b/doc/server_configurations.txt @@ -22,6 +22,7 @@ autogenerated from the Lua files. You can view this file in Nvim by running - [bright_script](#bright_script) - [bsl_ls](#bsl_ls) - [bufls](#bufls) +- [cadence](#cadence) - [ccls](#ccls) - [clangd](#clangd) - [clarity_lsp](#clarity_lsp) @@ -961,6 +962,50 @@ require'lspconfig'.bufls.setup{} ``` +## cadence + +[Cadence Language Server](https://github.com/onflow/cadence-tools/tree/master/languageserver) +using the [flow-cli](https://developers.flow.com/tools/flow-cli). + +The `flow` command from flow-cli must be available. For install instructions see +[the docs](https://developers.flow.com/tools/flow-cli/install#install-the-flow-cli) or the +[Github page](https://github.com/onflow/flow-cli). + +By default the configuration is taken from the closest `flow.json` or the `flow.json` in the users home directory. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cadence.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "flow", "cadence", "language-server" } + ``` + - `filetypes` : + ```lua + { "cdc" } + ``` + - `init_options` : + ```lua + { + numberOfAccounts = "1" + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + util.root_pattern('flow.json') or vim.env.HOME + ``` + + ## ccls https://github.com/MaskRay/ccls/wiki |
