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

Help setup with nixld and Neovim #214

Closed
minizilla opened this issue Jul 3, 2024 · 1 comment · Fixed by #243
Closed

Help setup with nixld and Neovim #214

minizilla opened this issue Jul 3, 2024 · 1 comment · Fixed by #243

Comments

@minizilla
Copy link
Member

Description

I'm using Neovim with the following setup

local nvim_lsp = require("lspconfig")
nvim_lsp.nixd.setup({
   cmd = { "nixd" },
   settings = {
      nixd = {
         formatting = {
            command = { "nixfmt" },
         },
      },
   },
})

When try to format the nix file, nothing happened, no formatting, check with nixfmt -c flake.nix also report flake.nix: not formatted.

Previously I'm using nixpkgs-fmt, the formatter is worked well.
Can you help me how to setup nixfmt with nixld and Neovim?

@infinisil
Copy link
Member

Can you make sure that you installed a recent version of nixfmt? Notably it's pkgs.nixfmt-rfc-style in Nixpkgs.

dasJ added a commit that referenced this issue Aug 28, 2024
@dasJ dasJ linked a pull request Aug 28, 2024 that will close this issue
dasJ added a commit that referenced this issue Aug 29, 2024
@dasJ dasJ closed this as completed in #243 Aug 29, 2024
@dasJ dasJ closed this as completed in 965c5c5 Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants