{ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixvim.url = "github:nix-community/nixvim"; }; outputs = { nixpkgs, nixvim, self, }: let pkgs = nixpkgs.legacyPackages.x86_64-linux; npkgs = nixvim.legacyPackages.x86_64-linux; in { packages.x86_64-linux.default = npkgs.makeNixvimWithModule { module = { config = { opts = {mouse = "";}; colorschemes.kanagawa = { enable = true; settings.transparent = true; }; extraPackages = [ pkgs.go pkgs.rustfmt ]; plugins = { ledger.enable = true; lsp-format.enable = true; vim-css-color.enable = true; none-ls = { enable = true; sources = { formatting = { shfmt = { enable = true; withArgs = "{ extra_args = {'-i', '4', '-s'}}"; }; alejandra.enable = true; }; }; }; lsp = { enable = true; servers = { cmake.enable = true; gopls.enable = true; ruff.enable = true; nixd.enable = true; bashls.enable = true; rust-analyzer = { enable = true; installCargo = true; installRustc = true; }; }; }; luasnip.enable = true; cmp = { enable = true; settings = { autoEnableSources = true; sources = [ {name = "nvim_lsp";} {name = "path";} {name = "buffer";} {name = "luasnip";} ]; mapping = { "" = "cmp.mapping.confirm({ select = true })"; "" = '' cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item({ behavior = cmp.SelectBehavior.Select }) else fallback() end end, {"i","s","c",}) ''; }; }; }; }; }; }; }; }; }