Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lsp.log grows insanely #4537

Closed
stevenroose opened this issue Mar 31, 2024 · 4 comments
Closed

lsp.log grows insanely #4537

stevenroose opened this issue Mar 31, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@stevenroose
Copy link

Problem description

I just realize that my ~/.local/state/lvim/lsp.log has grown to 250GiB as it was taking up over half of my /home partition.. This is definitely not good..

LunarVim version

release-1.3/neovim-0.9-d1c1bace

Neovim version (>= 0.9.1)

NVIM v0.9.5

Terminal name

alacritty

Operating system/version

GuixSD

Steps to reproduce

No response

Screenshots

Uploading screenshot-2024-03-31--20-14-38.png…

@stevenroose stevenroose added the bug Something isn't working label Mar 31, 2024

This comment was marked as outdated.

@github-actions github-actions bot added the stale label May 21, 2024
@kylo252
Copy link
Collaborator

kylo252 commented May 22, 2024

could you check which server is spamming the info? are you sure you're not running on debug by mistake?

vim.lsp.set_log_level("WARN") -- set :h set_log_level

@kylo252 kylo252 removed the stale label May 22, 2024
@bgmonroe
Copy link

I've seen this happed with some language servers that act "odd." Namely terraform-ls where it would, by default, send it's logs to stderr which would get captured as errors in the lsp.log file. I had to change the lspconfig for terraform-ls to send its logs to its own file:

require("lspconfig").terraformls.setup {
    filetypes = { "terraform", },
    cmd = { 'terraform-ls', 'serve', '-log-file', vim.fs.dirname(require('vim.lsp.log').get_filename()) .. "/terraform-ls.log" },
}

Saying that, I think it would be a great feature request to add rolling the lsp.log file into LunarVim.

@kylo252
Copy link
Collaborator

kylo252 commented May 31, 2024

I had to change the lspconfig for terraform-ls to send its logs to its own file

please consider upstreaming these changes to https://github.com/neovim/nvim-lspconfig/blob/b124ef3bd4435a6db7ff03ea2f5a23e1e0487552/lua/lspconfig/server_configurations/terraformls.lua

Saying that, I think it would be a great feature request to add rolling the lsp.log file into LunarVim.

I was planning on adding that to neovim core at some point, but got sidetracked with something else.

@kylo252 kylo252 closed this as completed May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants