testing-language-server/demo
2024-11-30 18:22:53 +09:00
..
.helix chore: update each settings for demo 2024-11-10 15:11:25 +09:00
.vim chore: update each settings for demo 2024-11-10 15:11:25 +09:00
.vscode chore: update each settings for demo 2024-11-10 15:11:25 +09:00
deno test(adapter): prevent test failure 2024-08-13 21:47:55 +09:00
go refactor: rename directory 2024-07-15 19:13:19 +09:00
jest fix(adapter): fix top level tests to not be in namespace 2024-10-19 13:41:09 +09:00
node-test fix(adapter): support nested namespace definition 2024-10-19 16:50:52 +09:00
phpunit feat: implement phpunit adapter 2024-09-23 17:56:13 +09:00
rust feat(adapter): add diagnostics to show which test failed 2024-11-30 18:22:53 +09:00
vitest refactor(demo): remove yarn related files 2024-08-04 15:46:31 +09:00
.testingls.toml feat: get configuration from toml file 2024-11-09 18:18:53 +09:00
README.md docs: update README 2024-10-14 00:00:56 +09:00

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{}