vlang / vls

V language server. (Old V language server - see v-analyzer)
MIT License
314 stars 53 forks source link

Logs are written to $CWD/vls.log instead of language client log #366

Closed yochem closed 1 year ago

yochem commented 2 years ago

I'm using the current version of vls with NeoVim's LSP. This creates a vls.log file in my current working directory:

$ ls -A
.git/
.gitignore
v.mod
vls.log
z.v

This creates clutter in my source code folder. All other LSP logs can be found in the same file: ~/.local/state/nvim/lsp.log. Neovim also reports that this is the language server log file:

image

It would be great if the vls logs can also be found in the same log file as any other lsp. Thank you in advance!

SirZenith commented 1 year ago

vls.log is VLS' server side log file. Now one can explicitly require VLS to generate this file by passing --debug flag to vls command.

Neovim's :LspLog command shows client side log. Normally it won't have much content in it. If you want to see complete debug output of VLS, you can run following command in Neovim:

:lua vim.lsp.set_log_level("debug")
yochem commented 1 year ago

Thanks for the explanation! Would it then be an idea to use a different location for the server logs instead of the current working directory? E.g., $XDG_DATA_HOME?

(I believe XDG_STATE_HOME is currently the recommendation for logs, but it is not much adopted yet)

JalonSolov commented 1 year ago

Try https://blog.vosca.dev/meet-v-analyzer/ instead, now that it is released.