mirror of
https://github.com/kbwo/testing-language-server.git
synced 2025-08-04 15:38:14 +00:00
docs: update README
This commit is contained in:
parent
3d01eef6b1
commit
54c3ca3e29
2 changed files with 47 additions and 4 deletions
43
demo/README.md
Normal file
43
demo/README.md
Normal file
|
@ -0,0 +1,43 @@
|
|||
## Using `nvim-lspconfig`
|
||||
|
||||
The specification is not stable, so you need to set it yourself. Once the spec is stable, I will send a PR to `nvim-lspconfig`.
|
||||
```
|
||||
local lspconfig = require('lspconfig')
|
||||
local configs = require('lspconfig.configs')
|
||||
local util = require "lspconfig/util"
|
||||
|
||||
configs.testing_ls = {
|
||||
default_config = {
|
||||
cmd = { "testing-language-server" },
|
||||
filetypes = { "rust" },
|
||||
root_dir = util.root_pattern(".git", "Cargo.toml"),
|
||||
init_options = {
|
||||
enable = true,
|
||||
fileTypes = {"rust"},
|
||||
adapterCommand = {
|
||||
rust = {
|
||||
{
|
||||
path = "testing-ls-adapter",
|
||||
extra_arg = { "--test-kind=cargo-test", "--workspace" },
|
||||
include = { "/demo/**/src/**/*.rs"},
|
||||
exclude = { "/**/target/**"},
|
||||
}
|
||||
}
|
||||
},
|
||||
enableWorkspaceDiagnostics = true,
|
||||
trace = {
|
||||
server = "verbose"
|
||||
}
|
||||
}
|
||||
},
|
||||
docs = {
|
||||
description = [[
|
||||
https://github.com/kbwo/testing-language-server
|
||||
|
||||
Language Server for real-time testing.
|
||||
]],
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.testing_ls.setup{}
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue