Skip to content

Commit f201661

Browse files
committed
chore(tests): enable lsp debug logging to a file
The file path looks like yazi.nvim/integration-tests/test-environment/testdirs/dir-mvZoqB/.local/state/nvim/lsp.log
1 parent efab494 commit f201661

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

documentation/for-developers/lsp-renaming.md

+7
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,10 @@ neovim->>neovim: apply changes to related files
4444
neovim->>lsp: send 'renaming finished' notification (didRenameFiles)
4545
neovim->>neovim: user saves changes
4646
```
47+
48+
## Debugging for developers
49+
50+
The e2e test environment should enable logging of all lsp requests and
51+
responses. Each test run has its own log file, and you can find it in a
52+
directory such as
53+
`integration-tests/test-environment/testdirs/dir-rNJosm/.local/state/nvim/lsp.log`

integration-tests/test-environment/.config/nvim/init.lua

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ vim.o.swapfile = false
3232
local thisfile = vim.fn.expand("<sfile>")
3333
local repo_root = vim.fn.fnamemodify(thisfile, ":h:h:h:h:h:h:h")
3434

35+
vim.lsp.set_log_level("debug")
36+
3537
-- for CI, use a single log file location and put it in a known location. This
3638
-- way it's easy to display the log file contents after each test using
3739
-- showYaziLog() and removeYaziLog().

0 commit comments

Comments
 (0)