nixvim
                                
                                 nixvim copied to clipboard
                                
                                    nixvim copied to clipboard
                            
                            
                            
                        [BUG] nixfmt was renamed to nixfmt-classic
| Field | Description | 
|---|---|
| Plugin | none-ls.sources.formatting | 
| Nixpkgs | unstable | 
| Home Manager | 24.05  | 
- [x] I have read the FAQ and my bug is not listed there.
Description
After my latest flake update I started to get some warnings related both the nixfmt and htmlbeutifier.
❯ alias home-switch
home-switch='home-manager switch --flake ~/.config/home-manager'
❯ home-switch
trace: warning: nixfmt was renamed to nixfmt-classic. The nixfmt attribute may be used for the new RFC 166-style formatter in the future, which is currently available as nixfmt-rfc-style
trace: warning: [DEV] Nixvim (plugins.none-ls): Some tools from upstream are not declared locally in `builtinPackages`.
-> [htmlbeautifier]
trace: warning: nixfmt was renamed to nixfmt-classic. The nixfmt attribute may be used for the new RFC 166-style formatter in the future, which is currently available as nixfmt-rfc-style
Starting Home Manager activation
Activating checkFilesChanged
Activating checkLaunchAgents
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
replacing old 'home-manager-path'
installing 'home-manager-path'
Activating linkGeneration
Cleaning up orphan links from /Users/seba
Creating profile generation 490
Creating home file links in /Users/seba
Activating onFilesChange
Activating setupLaunchAgents
trace: warning: nixfmt was renamed to nixfmt-classic. The nixfmt attribute may be used for the new RFC 166-style formatter in the future, which is currently available as nixfmt-rfc-style
trace: warning: [DEV] Nixvim (plugins.none-ls): Some tools from upstream are not declared locally in `builtinPackages`.
-> [htmlbeautifier]
I'm assuming that the possible fix is to change the package in server.nix file to nixfmt-rfc-style. Please let me know if I can send a PR.
Minimal, Reproducible Example (MRE)
This is my nixvim config:
{ pkgs, lib, ... }:
let
  toLua = str: ''
    lua << EOF
    ${str}
    EOF
  '';
  toLuaFile = file: ''
    lua << EOF
    ${builtins.readFile file}
    EOF
  '';
  guihua-lua = pkgs.vimUtils.buildVimPlugin {
    pname = "guihua-lua";
    version = "0.1";
    src = pkgs.fetchFromGitHub {
      owner = "ray-x";
      repo = "guihua.lua";
      rev = "f8ef84df19369bd1fcb8c3210a3b9db13026b7bc";
      sha256 = "fKljvoExSf1Y+3yOfYoS1+4nyDTmGRKIs+vwkK69VZM=";
    };
    meta = with lib; {
      description = "A GUI library for Neovim plugin developers";
      homepage = "https://github.com/ray-x/guihua.lua";
      license = licenses.mit;
    };
  };
  opts = {
    cmp = {
      windowBorder = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
      highlight =
        "Normal:CmpPmenu,FloatBorder:CmpBorder,CursorLine:PmenuSel,Search:None";
    };
  };
in {
  imports = [ ../go ];
  home.packages = with pkgs; [
    ripgrep
    nodePackages.fixjson
    hclfmt
    luaformatter
    pgformatter
    prettier-d-slim
    shfmt
    yq-go
  ];
  programs.nixvim = {
    enable = true;
    globals = {
      mapleader = " ";
      maplocalleader = " ";
    };
    highlight = {
      Comment.fg = "#ff00ff";
      Comment.bg = "#000000";
      Comment.underline = true;
      Comment.bold = true;
    };
    clipboard.providers.xclip.enable = true;
    opts = {
      termguicolors = true;
      ## from nvchad ### 
      laststatus = 3;
      showmode = false;
      clipboard = "unnamedplus";
      cursorline = true;
      cursorlineopt = "both";
      # Indenting
      expandtab = true;
      shiftwidth = 2;
      smartindent = true;
      tabstop = 2;
      softtabstop = 2;
      ignorecase = true;
      smartcase = true;
      mouse = "a";
      # Numbers
      number = true;
      relativenumber = false;
      numberwidth = 2;
      ruler = false;
      # disable nvim intro
      signcolumn = "yes";
      splitbelow = true;
      splitright = true;
      timeoutlen = 400;
      # undofile = true;
      # interval for writing swap file to disk, also used by gitsigns
      updatetime = 250;
      wrap = false;
    };
    viAlias = true;
    vimAlias = true;
    colorschemes.catppuccin = {
      enable = true;
      flavour = "macchiato";
      dimInactive.enabled = true;
      integrations = {
        dap = {
          enabled = true;
          enable_ui = true;
        };
        telescope.enabled = true;
        native_lsp.enabled = true;
        indent_blankline.enabled = true;
        noice = true;
      };
    };
    keymaps = [
      ## comment
      {
        mode = [ "n" ];
        key = "<leader>/";
        lua = true;
        action =
          ''function() require("Comment.api").toggle.linewise.current() end'';
      }
      ## nvim tree
      {
        mode = [ "n" ];
        key = "<leader>e";
        action = "<cmd>Neotree toggle<CR>";
      }
      ## telescope
      {
        mode = [ "n" ];
        key = "<leader>fw";
        action = "<cmd>Telescope live_grep<CR>";
      }
      {
        mode = [ "n" ];
        key = "<leader>fb";
        action = "<cmd>Telescope buffers<CR>";
      }
      {
        mode = [ "n" ];
        key = "<leader>fh";
        action = "<cmd>Telescope help_tags<CR>";
      }
      {
        mode = [ "n" ];
        key = "<leader>fo";
        action = "<cmd>Telescope oldfiles<CR>";
      }
      {
        mode = [ "n" ];
        key = "<leader>fz";
        action = "<cmd>Telescope current_buffer_fuzzy_find<CR>";
      }
      {
        mode = [ "n" ];
        key = "<leader>cm";
        action = "<cmd>Telescope git_commits<CR>";
      }
      {
        mode = [ "n" ];
        key = "<leader>gt";
        action = "<cmd>Telescope git_status<CR>";
      }
      {
        mode = [ "n" ];
        key = "<leader>pt";
        action = "<cmd>Telescope terms<CR>";
      }
      {
        mode = [ "n" ];
        key = "<leader>th";
        action = "<cmd>Telescope themes<CR>";
      }
      {
        mode = [ "n" ];
        key = "<leader>ff";
        action = "<cmd>Telescope find_files<CR>";
      }
      {
        mode = [ "n" ];
        key = "<leader>fa";
        action =
          "<cmd>Telescope find_files follow=true no_ignore=true hidden=true<CR>";
      }
      ## terminal
      {
        mode = [ "n" "t" ];
        key = "<C-j>";
        action = "<cmd>ToggleTerm direction=horizontal size=40<CR>";
      }
      ## toggle wrap
      {
        mode = [ "n" ];
        key = "<leader>w";
        action = "<cmd>set wrap!<CR>";
      }
      ## lsp diagnostics
      {
        mode = [ "n" ];
        key = "<leader>lt";
        lua = true;
        action = ''require("lsp_lines").toggle'';
      }
    ];
    editorconfig.enable = true;
    plugins = {
      comment.enable = true;
      barbecue.enable = true;
      lualine = {
        enable = true;
        iconsEnabled = true;
        globalstatus = true;
        sectionSeparators = {
          right = "";
          left = "";
        };
        extensions = [ "fzf" ];
      };
      nix.enable = true;
      lightline.enable = true;
      helm.enable = true;
      treesitter.enable = true;
      telescope = {
        enable = true;
        keymaps = {
          "<C-p>" = {
            action = "git_files";
            desc = "Telescope Git Files";
          };
          "<leader>fg" = "live_grep";
        };
      };
      lsp = {
        enable = true;
        servers = {
          ansiblels.enable = true;
          gopls.enable = true;
          golangci-lint-ls.enable = true;
          lua-ls.enable = true;
          bashls.enable = true;
          yamlls.enable = true;
        };
      };
      luasnip.enable = true;
      cmp-nvim-lsp.enable = true;
      cmp-buffer.enable = true;
      cmp-path.enable = true;
      cmp-cmdline.enable = true;
      cmp_luasnip.enable = true;
      cmp = {
        enable = true;
        autoEnableSources = true;
        settings = {
          mapping = {
            "<C-Space>" = "cmp.mapping.complete()";
            "<C-d>" = "cmp.mapping.scroll_docs(-4)";
            "<C-e>" = "cmp.mapping.close()";
            "<C-f>" = "cmp.mapping.scroll_docs(4)";
            "<CR>" = "cmp.mapping.confirm({ select = true })";
            "<S-Tab>" =
              "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
            "<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
          };
          sources = [
            { name = "nvim_lsp"; }
            { name = "luasnip"; }
            { name = "buffer"; }
          ];
          snippet = {
            expand = ''
              function(args)
                require('luasnip').lsp_expand(args.body)
              end
            '';
          };
          window = {
            completion = {
              border = opts.cmp.windowBorder;
              winhighlight = opts.cmp.highlight;
            };
            documentation = {
              border = opts.cmp.windowBorder;
              winhighlight = opts.cmp.highlight;
            };
          };
        };
      };
      zen-mode.enable = true;
      none-ls = {
        enable = true;
        sources = {
          formatting = {
            gofumpt.enable = true;
            goimports_reviser.enable = true;
            golines.enable = true;
            nixfmt.enable = true;
            hclfmt.enable = true;
            stylua.enable = true;
            pg_format.enable = true;
            prettierd.enable = true;
            shfmt.enable = true;
            yamlfmt.enable = true;
          };
        };
        onAttach = ''
          function(client, bufnr)
            local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
            if client.supports_method("textDocument/formatting") then
              vim.api.nvim_clear_autocmds({
                  group = augroup,
                  buffer = bufnr
              })
              vim.api.nvim_create_autocmd("BufWritePre", {
                  group = augroup,
                  buffer = bufnr,
                  callback = function()
                      vim.lsp.buf.format({
                          bufnr = bufnr
                      })
                  end
              })
            end
          end
        '';
      };
      neo-tree.enable = true;
      lsp-lines.enable = true;
      alpha = {
        enable = true;
        theme = "dashboard";
      };
      bufferline.enable = true;
      fidget.enable = true;
      gitsigns.enable = true;
      indent-blankline.enable = true;
      noice = { enable = true; };
      lspsaga = {
        enable = true;
        beacon.enable = true;
      };
      toggleterm = {
        enable = true;
        winbar.enabled = true;
      };
    };
    extraPlugins = with pkgs.vimPlugins; [
      nvim-web-devicons
      nvim-lspconfig
      nui-nvim
      plenary-nvim
      vim-jinja
      {
        plugin = guihua-lua;
        config = toLua ''
          require('guihua.maps').setup()
        '';
      }
      {
        plugin = go-nvim;
        config = toLuaFile ./plugins/go-lang.lua;
      }
      {
        plugin = nvim-window-picker;
        config = toLuaFile ./plugins/window-picker.lua;
      }
    ];
  };
}