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

NixVim \\ heavy flow of same errors then using nixd #604

Open
Sk7Str1p3 opened this issue Oct 8, 2024 · 7 comments
Open

NixVim \\ heavy flow of same errors then using nixd #604

Sk7Str1p3 opened this issue Oct 8, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@Sk7Str1p3
Copy link

Sk7Str1p3 commented Oct 8, 2024

Bug

image
so any time i edit .nix file i get flow of those, exactly same errors

Logs

[START][2024-10-08 09:14:01] LSP logging initiated
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.121] 29882: <-- initialize(1)\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.122] 29882"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	": --> reply:initialize(1)\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.122] 29882: --> call window/workDoneProgress/create(1)\nI[09:14:01.122] 29882: --> notify $/progress\nI[09:14:01.122] 29882: --> call attrset/evalExpr(1)\nI[09:14:01.123] 29882: --> call window/workDoneProgress/create(2)\nI[09:14:01.123] 29882: --> notify $/progress\nI[09:14:01.123] 29882: --> call attrset/evalExpr(1)\nI[09:14:01.123] 29882: --> call workspace/configuration(3)\nI[09:14:01.123] 29882: <-- initialized\nI[09:14:01.123] 29882: <-- textDocument/didOpen\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.124] 29882: --> notify textDocument/publishDiagnostics\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.125] 29882: <-- textDocument/inlayHint(2)\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.125] 29882: <-- textDocument/inlayHint(3)\nI[09:14:01.125] 29882: <-- reply(1)\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.125] 29882: --> call attrset/attrpathInfo(2)\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.125] 29882: --> call attrset/attrpathInfo(3)\nI[09:14:01.125] 29882: <-- reply(2)\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.125] 29882: <-- reply(3)\nE[09:14:01.125] 29882: workspace/configuration: parse error expected object\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.125] 29882: <-- textDocument/semanticTokens/full(4)\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.128] 29882: --> reply:textDocument/semanticTokens/full(4)\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.276] 29882: "
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"<-- reply(1)\nI[09:14:01.276] 29882: --> notify $/progress\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.277] 29882: <-- reply(2)\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.277] 29882: <-- reply(3)\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.277"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"] 29882: --> reply:textDocument/inlayHint(2)\nI[09:14:01.277] 29882: --> reply:textDocument/inlayHint(3)\n"
[ERROR][2024-10-08 09:14:01] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/2dx04iayp5nl6zwsa60dsm82c58ghwk7-nixd-2.4.0/bin/nixd"	"stderr"	"I[09:14:01.646] 29882: <-- reply(1)\nI[09:14:01.646] 29882: --> notify $/progress\n"

Config

part of my NixVim Configuration, declaring LSPs:

lsp-lines.enable = true;
	  lsp-format.enable = true;
	  lsp = {
	    enable = true;
	    inlayHints = true;
	    servers = {
	      lua-ls = {
	        enable = true;
	      };
	      pylsp = {
	        enable = true;
	      };
	      nixd = {
	        enable = true;
	      };
	      clangd = {
	        enable = true;
	      };
	    };
	  };

i guess something is missed here but cant understand or find any info what exactly. LSP works, the only problems are these error messages. thx

@Sk7Str1p3 Sk7Str1p3 added the bug Something isn't working label Oct 8, 2024
@inclyc
Copy link
Member

inclyc commented Oct 9, 2024

nixvim issue: nix-community/nixvim#2390

@poperigby
Copy link

Having the same issue, but not using NixVim. Just normally configured Neovim.

@inclyc
Copy link
Member

inclyc commented Oct 18, 2024

This is a bug in nvim, see neovim/neovim@84bbbd9.

@inclyc inclyc closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2024
@Deliganli
Copy link

I have the same issue. I tried the suggested workarounds in the tickets linked but it doesn't stop logging. .local/state/nvim/lsp.log file is growing very fast.

It looks to me a different issue. In my understanding the issue in that ticket is triggered when the nix file contains a unicode character. In my case, logging very similarly to the ticket, file doesn't contain any special character.

It feels like nixd info logs are printed to stderr.

@inclyc
Copy link
Member

inclyc commented Nov 11, 2024

So there is still reports on semantic tokens w/ Unicode character, let's reopen this issue and I'll inspect a little bit.

@inclyc inclyc reopened this Nov 11, 2024
@inclyc
Copy link
Member

inclyc commented Nov 18, 2024

Recently, I temporarily disabled semantic tokens in #616. We've received considerable feedback suggesting that this feature requires more thoughtful refinement. As of #616 (v2.5.1+), syntax coloring is now disabled in your editor by default. This should workaround the issue and ensure it no longer causes any inconvenience.

In the future, semantic highlighting may undergo a significant refactor before being reintroduced.

Happy coding!

@inclyc
Copy link
Member

inclyc commented Nov 18, 2024

Part of #573.

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

4 participants