-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
[BUG] lsp.servers.nil_ls: No formatter configured #2562
Comments
I'm using nil_ls and haven't seen this behavior, we also have unit tests setup with nil_ls that don't throw the error, and I tried using that MRE as one of the test cases. Might need more information about your configuration / setup of nixvim. |
my full config is here ive also not been able to see it any logs but i get the notification asking about flake archive which only happens with the plugin default |
Looks like you have pkgs from stable and nixvim from unstable, curious if you see the same behavior by matching them up / not overriding nixpkgs from nixvim. |
settings both nixpkgs and nixvim to follow unstable (with nixvim following under the name nixpkgs specifically) still has the same result |
Sometimes it can be difficult to pin down exactly which nixpkgs version is being used by nixvim, and just setting the flake input follows isn't always enough to change what is used. If you're using nixvim via a wrapper module then we currently default to re-using the If you're using our standalone nixvim function, then it defaults to our flake input (which can be overridden using Maybe it's worth having a programs.nixvim = { pkgs, ... }: {
extraConfigLua = builtins.trace "pkgs version is ${pkgs.lib.trivial.release}" "";
} If necessary, you can explicitly tell nixvim which pkgs instance to use via our Also, did you check what happens when you switch between nixvim's |
ive moved everything in my config back to unstable and adding the trace reports its using the correct version (25.05), and i dont think its a good idea to try using the 24.05 branch as i only moved parts of my config to stable after the release of 24.11 beta. i also seem to use the nixpkgs.pkgs option correctly, how am i supposed to use it? im not very good with nix... i am on the main branch though. |
I've encountered the same issue, and traced it down to nixos module values leaking into the 395 │ local __lspServers = {
396 │ { extraOptions = { settings = { _type = "if", condition = true } }, name = "texlab" },
397 │ {
398 │ extraOptions = {
399 │ settings = {
400 │ _type = "if",
401 │ condition = true,
402 │ content = {
403 │ ["rust-analyzer"] = {
404 │ check = { command = "clippy" },
405 │ typing = { autoClosingAngleBrackets = { enable = true } },
406 │ },
407 │ },
408 │ },
409 │ },
410 │ name = "rust_analyzer",
411 │ },
412 │ { extraOptions = { settings = { _type = "if", condition = true } }, name = "ruff" },
-- and so forth. My full config is here. |
Also see this issue as described by @bpeetz. FWIW nixd formatter config, which uses the same settings path, works. |
lsp.servers.nil_ls
unstable
Description
after updating the newest unstable the below config doesnt work anymore, instead i get this:
[ERROR]...-format/init.lua:219 "nil_ls: -32603: No formatter configured. Set the nil.formatting.command LSP server setting."
from lsp.log
Minimal, Reproducible Example (MRE)
The text was updated successfully, but these errors were encountered: