Home

Awesome

nvim-lspconfig-test

NOTE: this repo is currently under review before upstreaming to nvim-lua -- please wait until then to contribute!

Tests for configurations implemented in neovim/nvim-lspconfig.

This repo's tests are run on a nightly basis, and config-specific issues are created/closed automatically when tests fail/pass.

Why test?

Much like neovim/nvim-lspconfig, this repo is community-driven. We highly recommend adding tests for your language server to it! Doing so will:

  1. Protect your config from changes to neovim/nvim-lspconfig, as we will run these tests to make sure we don't break anything
  2. Because of the above, make fixes/refactoring easier on our end
  3. Let you know automatically when/if your language server (or something else) changes which breaks compatability with nvim

along with all of the other benefits of having well-tested code!

Adding tests

  1. In .github/workflows/default.yml, add the name of your config to jobs.default.strategy.matrix.config.
  2. Create a folder with your language server's name in the tests/ directory.
  3. Add the following files to it:

Running locally

Assuming all of your language server's necessary software is installed, just do:

TEST=<test_name> make test

where <test_name> is the name of your config.

Contributing

Feel free to make a PR title-prefixed with [WIP] as soon as you start working on your tests. Remove the [WIP] when you're ready for review.

Fixing problems

An issue titled for your language server will automatically be created if your tests fail on a run. Do not close these issues manually! They will be automatically closed on a subsequent run where your tests pass.