fix(lsp): prevent lsp tests from picking up local user config (#22606)

Sets `NVIM_APPNAME` for the lsp server instances and also for the
`exec_lua` environment to ensure local user config doesn't interfere
with the test cases.

My local `ftplugin/xml.lua` broke the LSP test cases about setting
`omnifunc` defaults.
This commit is contained in:
Mathias Fußenegger
2023-03-10 17:30:40 +01:00
committed by GitHub
parent 762a06c6bc
commit d3c8d104bc
2 changed files with 3 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ describe('LSP', function()
return lsp.start_client {
cmd_env = {
NVIM_LOG_FILE = fake_lsp_logfile;
NVIM_APPNAME = "nvim_lsp_test";
};
cmd = {
vim.v.progpath, '-l', fake_lsp_code, test_name;