feat: initial nixvim configuration
This commit is contained in:
parent
a4947f9b71
commit
e64b39b896
298
flake.lock
generated
298
flake.lock
generated
@ -87,6 +87,28 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"devshell": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_4",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1713532798,
|
||||||
|
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "devshell",
|
||||||
|
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "devshell",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -119,6 +141,72 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"revCount": 57,
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat_4": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1715865404,
|
||||||
|
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-root": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1713493429,
|
||||||
|
"narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=",
|
||||||
|
"owner": "srid",
|
||||||
|
"repo": "flake-root",
|
||||||
|
"rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "srid",
|
||||||
|
"repo": "flake-root",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_3"
|
"systems": "systems_3"
|
||||||
@ -177,6 +265,24 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_6"
|
"systems": "systems_6"
|
||||||
},
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1701680307,
|
||||||
|
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_5": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_7"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1705309234,
|
||||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
@ -191,9 +297,9 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_5": {
|
"flake-utils_6": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_8"
|
"systems": "systems_9"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681202837,
|
"lastModified": 1681202837,
|
||||||
@ -209,6 +315,55 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"git-hooks": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat_4",
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nixpkgs-stable": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1716213921,
|
||||||
|
"narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"git-hooks",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709087332,
|
||||||
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -251,6 +406,27 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"home-manager_3": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717052710,
|
||||||
|
"narHash": "sha256-LRhOxzXmOza5SymhOgnEzA8EAQp+94kkeUYWKKpLJ/U=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "29c69d9a466e41d46fd3a7a9d0591ef9c113c2ae",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"hyprcursor": {
|
"hyprcursor": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"hyprlang": [
|
"hyprlang": [
|
||||||
@ -290,11 +466,11 @@
|
|||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717362715,
|
"lastModified": 1717442018,
|
||||||
"narHash": "sha256-EnkKVUYqVfYqJso4t8ScuuMNEge7eybpdvtPCy4uwlc=",
|
"narHash": "sha256-GhL4f5CedZE0UiuzUFkMwGXD+zqlhrzo0y4FC4wQLTM=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "358e59e69d27a69381bc0872b5b8d1184bc6b6a1",
|
"rev": "5517cc506b2754cb2485b1bf3e46918ee638ea6d",
|
||||||
"revCount": 4756,
|
"revCount": 4760,
|
||||||
"submodules": true,
|
"submodules": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/hyprwm/Hyprland"
|
"url": "https://github.com/hyprwm/Hyprland"
|
||||||
@ -392,11 +568,11 @@
|
|||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717346559,
|
"lastModified": 1717443201,
|
||||||
"narHash": "sha256-SpwWUYctOViUjTp3e7x8VxwxntS1tNtpfef7YJKikgs=",
|
"narHash": "sha256-a0ZXSNQvklHhUkCnX+4wGN8Bu5WkG+I85h7NcKlehdk=",
|
||||||
"owner": "JakeStanger",
|
"owner": "JakeStanger",
|
||||||
"repo": "ironbar",
|
"repo": "ironbar",
|
||||||
"rev": "5d1054abd8ab5e538073b75450bc1618bd537a7b",
|
"rev": "6e921eb567164f4ad46a7c74d665b3dc6223f928",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -423,6 +599,27 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1716993688,
|
||||||
|
"narHash": "sha256-vo5k2wQekfeoq/2aleQkBN41dQiQHNTniZeVONWiWLs=",
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "c0d5b8c54d6828516c97f6be9f2d00c63a363df4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-vscode-extensions": {
|
"nix-vscode-extensions": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
@ -542,13 +739,41 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixvim": {
|
||||||
|
"inputs": {
|
||||||
|
"devshell": "devshell",
|
||||||
|
"flake-compat": "flake-compat_3",
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"flake-root": "flake-root",
|
||||||
|
"git-hooks": "git-hooks",
|
||||||
|
"home-manager": "home-manager_3",
|
||||||
|
"nix-darwin": "nix-darwin",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717444597,
|
||||||
|
"narHash": "sha256-8enVHsN7hLn1hPkY1U5Cfr3rzij4FsWRUx4jjHUHZQE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"rev": "b7a8b0319098fdbaa719ef4dc375337ec4543c6e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717429509,
|
"lastModified": 1717443933,
|
||||||
"narHash": "sha256-c7mqDqNUP5BVtUZLTeglj5NjM1jvncUZy9fhydhB8RQ=",
|
"narHash": "sha256-hKPYAOnbqvy/eZMsp85KRHn5+K3QkGeU8cyLiXtxT48=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "963de5e47dbd9550a36d90c9075b40002000547a",
|
"rev": "0122b0f415811dd2a367f362a595070b6451ff9a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -567,6 +792,7 @@
|
|||||||
"nix-vscode-extensions": "nix-vscode-extensions",
|
"nix-vscode-extensions": "nix-vscode-extensions",
|
||||||
"nixos-wsl": "nixos-wsl",
|
"nixos-wsl": "nixos-wsl",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_4",
|
||||||
|
"nixvim": "nixvim",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"rust-overlay": "rust-overlay_2",
|
"rust-overlay": "rust-overlay_2",
|
||||||
"unstable": "unstable",
|
"unstable": "unstable",
|
||||||
@ -598,15 +824,15 @@
|
|||||||
},
|
},
|
||||||
"rust-overlay_2": {
|
"rust-overlay_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_4",
|
"flake-utils": "flake-utils_5",
|
||||||
"nixpkgs": "nixpkgs_5"
|
"nixpkgs": "nixpkgs_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717406456,
|
"lastModified": 1717442957,
|
||||||
"narHash": "sha256-voWbxOZu1DM6hLOlOkLqSrZ8BsOY6F9h/tYB9C0jOXs=",
|
"narHash": "sha256-w0fqHofxM2hf3pGDXCPSdH0A09v6FgHm6I38nCWA96k=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "711ff40be18b09bf096930f52e1fb2fcbee9adf0",
|
"rev": "025e1742de4fa75b3fb63818bd9726d17da6a102",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -735,6 +961,42 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_9": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"treefmt-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1715940852,
|
||||||
|
"narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "2fba33a182602b9d49f0b2440513e5ee091d838b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"unstable": {
|
"unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717196966,
|
"lastModified": 1717196966,
|
||||||
@ -752,7 +1014,7 @@
|
|||||||
},
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_7"
|
"systems": "systems_8"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1710146030,
|
||||||
@ -770,7 +1032,7 @@
|
|||||||
},
|
},
|
||||||
"vscode-server": {
|
"vscode-server": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_5",
|
"flake-utils": "flake-utils_6",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
|
11
flake.nix
11
flake.nix
@ -18,6 +18,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
utils.url = "github:numtide/flake-utils";
|
utils.url = "github:numtide/flake-utils";
|
||||||
|
nixvim = {
|
||||||
|
# url = "github:nix-community/nixvim/nixos-24.05";
|
||||||
|
url = "github:nix-community/nixvim";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||||
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
||||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||||
@ -67,7 +72,11 @@
|
|||||||
in {
|
in {
|
||||||
# Your custom packages
|
# Your custom packages
|
||||||
# Accessible through 'nix build', 'nix shell', etc
|
# Accessible through 'nix build', 'nix shell', etc
|
||||||
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
packages = forAllSystems (system:
|
||||||
|
import ./pkgs {
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
inherit inputs;
|
||||||
|
});
|
||||||
|
|
||||||
overlays = import ./overlays {inherit inputs;};
|
overlays = import ./overlays {inherit inputs;};
|
||||||
|
|
||||||
|
@ -3,7 +3,11 @@
|
|||||||
vscode-extensions = inputs.nix-vscode-extensions.overlays.default;
|
vscode-extensions = inputs.nix-vscode-extensions.overlays.default;
|
||||||
|
|
||||||
# This one brings our custom packages from the 'pkgs' directory
|
# This one brings our custom packages from the 'pkgs' directory
|
||||||
additions = final: _prev: import ../pkgs final.pkgs;
|
additions = final: _prev:
|
||||||
|
import ../pkgs {
|
||||||
|
pkgs = final.pkgs;
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
|
||||||
# This one contains whatever you want to overlay
|
# This one contains whatever you want to overlay
|
||||||
# You can change versions, add patches, set compilation flags, anything really.
|
# You can change versions, add patches, set compilation flags, anything really.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
pkgs: {
|
{pkgs, ...} @ args: {
|
||||||
homer = pkgs.callPackage ./homer {};
|
homer = pkgs.callPackage ./homer {};
|
||||||
keycloak-theme-keywind = pkgs.callPackage ./keywind {};
|
keycloak-theme-keywind = pkgs.callPackage ./keywind {};
|
||||||
|
nvim-custom = import ./nvim/default.nix args;
|
||||||
}
|
}
|
||||||
|
125
pkgs/nvim/config/bufferlines/bufferline.nix
Normal file
125
pkgs/nvim/config/bufferlines/bufferline.nix
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
{
|
||||||
|
plugins = {
|
||||||
|
bufferline = {
|
||||||
|
enable = true;
|
||||||
|
separatorStyle = "thick"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin”
|
||||||
|
offsets = [
|
||||||
|
{
|
||||||
|
filetype = "neo-tree";
|
||||||
|
text = "Neo-tree";
|
||||||
|
highlight = "Directory";
|
||||||
|
text_align = "left";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<Tab>";
|
||||||
|
action = "<cmd>BufferLineCycleNext<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Cycle to next buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<S-Tab>";
|
||||||
|
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Cycle to previous buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<S-l>";
|
||||||
|
action = "<cmd>BufferLineCycleNext<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Cycle to next buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<S-h>";
|
||||||
|
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Cycle to previous buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>bd";
|
||||||
|
action = "<cmd>bdelete<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Delete buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>bb";
|
||||||
|
action = "<cmd>e #<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Switch to Other Buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# {
|
||||||
|
# mode = "n";
|
||||||
|
# key = "<leader>`";
|
||||||
|
# action = "<cmd>e #<cr>";
|
||||||
|
# options = {
|
||||||
|
# desc = "Switch to Other Buffer";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>br";
|
||||||
|
action = "<cmd>BufferLineCloseRight<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Delete buffers to the right";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>bl";
|
||||||
|
action = "<cmd>BufferLineCloseLeft<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Delete buffers to the left";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>bo";
|
||||||
|
action = "<cmd>BufferLineCloseOthers<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Delete other buffers";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>bp";
|
||||||
|
action = "<cmd>BufferLineTogglePin<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle pin";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>bP";
|
||||||
|
action = "<Cmd>BufferLineGroupClose ungrouped<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Delete non-pinned buffers";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
8
pkgs/nvim/config/colorschemes/base16.nix
Normal file
8
pkgs/nvim/config/colorschemes/base16.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
colorschemes = {
|
||||||
|
base16 = {
|
||||||
|
enable = false;
|
||||||
|
colorscheme = "mountain";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
48
pkgs/nvim/config/colorschemes/catppuccin.nix
Normal file
48
pkgs/nvim/config/colorschemes/catppuccin.nix
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
colorschemes = {
|
||||||
|
catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
background = {
|
||||||
|
light = "macchiato";
|
||||||
|
dark = "mocha";
|
||||||
|
};
|
||||||
|
flavour = "mocha"; # "latte", "mocha", "frappe", "macchiato" or raw lua code
|
||||||
|
disable_bold = false;
|
||||||
|
disable_italic = false;
|
||||||
|
disable_underline = false;
|
||||||
|
transparent_background = true;
|
||||||
|
term_colors = true;
|
||||||
|
integrations = {
|
||||||
|
cmp = true;
|
||||||
|
noice = true;
|
||||||
|
notify = true;
|
||||||
|
neotree = true;
|
||||||
|
harpoon = true;
|
||||||
|
gitsigns = true;
|
||||||
|
which_key = true;
|
||||||
|
illuminate = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
treesitter = true;
|
||||||
|
treesitter_context = true;
|
||||||
|
telescope.enabled = true;
|
||||||
|
indent_blankline.enabled = true;
|
||||||
|
mini.enabled = true;
|
||||||
|
native_lsp = {
|
||||||
|
enabled = true;
|
||||||
|
inlay_hints = {
|
||||||
|
background = true;
|
||||||
|
};
|
||||||
|
underlines = {
|
||||||
|
errors = ["underline"];
|
||||||
|
hints = ["underline"];
|
||||||
|
information = ["underline"];
|
||||||
|
warnings = ["underline"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
14
pkgs/nvim/config/colorschemes/rose-pine.nix
Normal file
14
pkgs/nvim/config/colorschemes/rose-pine.nix
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
colorschemes = {
|
||||||
|
rose-pine = {
|
||||||
|
enable = false;
|
||||||
|
settings = {
|
||||||
|
styles = {
|
||||||
|
italic = true;
|
||||||
|
bold = true;
|
||||||
|
transparency = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
130
pkgs/nvim/config/completion/cmp.nix
Normal file
130
pkgs/nvim/config/completion/cmp.nix
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
{
|
||||||
|
plugins = {
|
||||||
|
cmp-nvim-lsp = {enable = true;}; # lsp
|
||||||
|
cmp-buffer = {enable = true;};
|
||||||
|
copilot-cmp = {enable = true;}; # copilot suggestions
|
||||||
|
cmp-path = {enable = true;}; # file system paths
|
||||||
|
cmp_luasnip = {enable = true;}; # snippets
|
||||||
|
cmp-cmdline = {enable = false;}; # autocomplete for cmdline
|
||||||
|
cmp = {
|
||||||
|
enable = true;
|
||||||
|
autoEnableSources = false;
|
||||||
|
settings = {
|
||||||
|
experimental = {
|
||||||
|
ghost_text = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
mapping = {
|
||||||
|
__raw = ''
|
||||||
|
cmp.mapping.preset.insert({
|
||||||
|
['<C-j>'] = cmp.mapping.select_next_item(),
|
||||||
|
['<C-k>'] = cmp.mapping.select_prev_item(),
|
||||||
|
['<C-e>'] = cmp.mapping.abort(),
|
||||||
|
|
||||||
|
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
|
||||||
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
|
||||||
|
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||||
|
|
||||||
|
['<S-CR>'] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
snippet = {
|
||||||
|
expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||||
|
};
|
||||||
|
sources = {
|
||||||
|
__raw = ''
|
||||||
|
cmp.config.sources({
|
||||||
|
{name = 'nvim_lsp'},
|
||||||
|
{name = 'copilot'},
|
||||||
|
{name = 'path'},
|
||||||
|
{name = 'luasnip'},
|
||||||
|
{name = 'cmdline'},
|
||||||
|
}, {
|
||||||
|
{name = 'buffer'},
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
performance = {
|
||||||
|
debounce = 60;
|
||||||
|
fetching_timeout = 200;
|
||||||
|
max_view_entries = 30;
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
completion = {
|
||||||
|
border = "rounded";
|
||||||
|
winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:Visual,Search:None";
|
||||||
|
};
|
||||||
|
documentation = {
|
||||||
|
border = "rounded";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
formatting = {
|
||||||
|
fields = ["kind" "abbr" "menu"];
|
||||||
|
expandable_indicator = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraConfigLua = ''
|
||||||
|
luasnip = require("luasnip")
|
||||||
|
kind_icons = {
|
||||||
|
Text = "",
|
||||||
|
Method = "",
|
||||||
|
Function = "",
|
||||||
|
Constructor = "",
|
||||||
|
Field = "",
|
||||||
|
Variable = "",
|
||||||
|
Class = "",
|
||||||
|
Interface = "",
|
||||||
|
Module = "",
|
||||||
|
Property = "",
|
||||||
|
Unit = "",
|
||||||
|
Value = "",
|
||||||
|
Enum = "",
|
||||||
|
Keyword = "",
|
||||||
|
Snippet = "",
|
||||||
|
Color = "",
|
||||||
|
File = "",
|
||||||
|
Reference = "",
|
||||||
|
Folder = "",
|
||||||
|
EnumMember = "",
|
||||||
|
Constant = "",
|
||||||
|
Struct = "",
|
||||||
|
Event = "",
|
||||||
|
Operator = "",
|
||||||
|
TypeParameter = "",
|
||||||
|
}
|
||||||
|
|
||||||
|
local cmp = require'cmp'
|
||||||
|
|
||||||
|
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||||
|
cmp.setup.cmdline({'/', "?" }, {
|
||||||
|
sources = {
|
||||||
|
{ name = 'buffer' }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Set configuration for specific filetype.
|
||||||
|
cmp.setup.filetype('gitcommit', {
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
|
||||||
|
}, {
|
||||||
|
{ name = 'buffer' },
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||||
|
cmp.setup.cmdline(':', {
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'path' }
|
||||||
|
}, {
|
||||||
|
{ name = 'cmdline' }
|
||||||
|
}),
|
||||||
|
}) '';
|
||||||
|
}
|
46
pkgs/nvim/config/completion/copilot.nix
Normal file
46
pkgs/nvim/config/completion/copilot.nix
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
plugins.copilot-lua = {
|
||||||
|
enable = true;
|
||||||
|
panel = {
|
||||||
|
enabled = false;
|
||||||
|
autoRefresh = true;
|
||||||
|
keymap = {
|
||||||
|
jumpPrev = "[[";
|
||||||
|
jumpNext = "]]";
|
||||||
|
accept = "<CR>";
|
||||||
|
refresh = "gr";
|
||||||
|
open = "<M-CR>";
|
||||||
|
};
|
||||||
|
layout = {
|
||||||
|
position = "bottom"; # | top | left | right
|
||||||
|
ratio = 0.4;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
suggestion = {
|
||||||
|
enabled = false;
|
||||||
|
autoTrigger = true;
|
||||||
|
debounce = 75;
|
||||||
|
keymap = {
|
||||||
|
accept = "<M-l>";
|
||||||
|
acceptWord = false;
|
||||||
|
acceptLine = false;
|
||||||
|
next = "<M-]>";
|
||||||
|
prev = "<M-[>";
|
||||||
|
dismiss = "<C-]>";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
filetypes = {
|
||||||
|
yaml = false;
|
||||||
|
markdown = false;
|
||||||
|
help = false;
|
||||||
|
gitcommit = false;
|
||||||
|
gitrebase = false;
|
||||||
|
hgcommit = false;
|
||||||
|
svn = false;
|
||||||
|
cvs = false;
|
||||||
|
"." = false;
|
||||||
|
};
|
||||||
|
copilotNodeCommand = "node"; # Node.js version must be > 18.x
|
||||||
|
serverOptsOverrides = {};
|
||||||
|
};
|
||||||
|
}
|
12
pkgs/nvim/config/completion/lspkind.nix
Normal file
12
pkgs/nvim/config/completion/lspkind.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
plugins.lspkind = {
|
||||||
|
enable = true;
|
||||||
|
symbolMap = {
|
||||||
|
Copilot = "";
|
||||||
|
};
|
||||||
|
extraOptions = {
|
||||||
|
maxwidth = 50;
|
||||||
|
ellipsis_char = "...";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
222
pkgs/nvim/config/dap/dap.nix
Normal file
222
pkgs/nvim/config/dap/dap.nix
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
{
|
||||||
|
plugins.dap = {
|
||||||
|
enable = true;
|
||||||
|
signs = {
|
||||||
|
dapBreakpoint = {
|
||||||
|
text = "●";
|
||||||
|
texthl = "DapBreakpoint";
|
||||||
|
};
|
||||||
|
dapBreakpointCondition = {
|
||||||
|
text = "●";
|
||||||
|
texthl = "DapBreakpointCondition";
|
||||||
|
};
|
||||||
|
dapLogPoint = {
|
||||||
|
text = "◆";
|
||||||
|
texthl = "DapLogPoint";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extensions = {
|
||||||
|
dap-python = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
dap-ui = {
|
||||||
|
enable = true;
|
||||||
|
floating.mappings = {
|
||||||
|
close = ["<ESC>" "q"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
dap-virtual-text = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
configurations = {
|
||||||
|
java = [
|
||||||
|
{
|
||||||
|
type = "java";
|
||||||
|
request = "launch";
|
||||||
|
name = "Debug (Attach) - Remote";
|
||||||
|
hostName = "127.0.0.1";
|
||||||
|
port = 5005;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dB";
|
||||||
|
action = "
|
||||||
|
<cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>
|
||||||
|
";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Breakpoint Condition";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>db";
|
||||||
|
action = ":DapToggleBreakpoint<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Toggle Breakpoint";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dc";
|
||||||
|
action = ":DapContinue<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Continue";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>da";
|
||||||
|
action = "<cmd>lua require('dap').continue({ before = get_args })<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Run with Args";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dC";
|
||||||
|
action = "<cmd>lua require('dap').run_to_cursor()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Run to cursor";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dg";
|
||||||
|
action = "<cmd>lua require('dap').goto_()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Go to line (no execute)";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>di";
|
||||||
|
action = ":DapStepInto<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Step into";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dj";
|
||||||
|
action = "
|
||||||
|
<cmd>lua require('dap').down()<cr>
|
||||||
|
";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Down";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dk";
|
||||||
|
action = "<cmd>lua require('dap').up()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Up";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dl";
|
||||||
|
action = "<cmd>lua require('dap').run_last()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Run Last";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>do";
|
||||||
|
action = ":DapStepOut<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Step Out";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dO";
|
||||||
|
action = ":DapStepOver<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Step Over";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dp";
|
||||||
|
action = "<cmd>lua require('dap').pause()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Pause";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dr";
|
||||||
|
action = ":DapToggleRepl<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Toggle REPL";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ds";
|
||||||
|
action = "<cmd>lua require('dap').session()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Session";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dt";
|
||||||
|
action = ":DapTerminate<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Terminate";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>du";
|
||||||
|
action = "<cmd>lua require('dapui').toggle()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Dap UI";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dw";
|
||||||
|
action = "<cmd>lua require('dap.ui.widgets').hover()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Widgets";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = ["n" "v"];
|
||||||
|
key = "<leader>de";
|
||||||
|
action = "<cmd>lua require('dapui').eval()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Eval";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
84
pkgs/nvim/config/default.nix
Normal file
84
pkgs/nvim/config/default.nix
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
{
|
||||||
|
# Import all your configuration modules here
|
||||||
|
imports = [
|
||||||
|
./sets.nix
|
||||||
|
./keymaps.nix
|
||||||
|
|
||||||
|
./bufferlines/bufferline.nix
|
||||||
|
|
||||||
|
./colorschemes/base16.nix
|
||||||
|
./colorschemes/catppuccin.nix
|
||||||
|
./colorschemes/rose-pine.nix
|
||||||
|
|
||||||
|
./completion/cmp.nix
|
||||||
|
./completion/copilot.nix
|
||||||
|
./completion/lspkind.nix
|
||||||
|
|
||||||
|
./dap/dap.nix
|
||||||
|
|
||||||
|
./filetrees/neo-tree.nix
|
||||||
|
./git/gitsigns.nix
|
||||||
|
./git/diffview.nix
|
||||||
|
# ./git/lazygit.nix
|
||||||
|
./git/neogit.nix
|
||||||
|
|
||||||
|
./languages/nvim-jdtls.nix
|
||||||
|
./languages/nvim-lint.nix
|
||||||
|
./languages/typescript-tools-nvim.nix
|
||||||
|
./languages/treesitter/treesitter.nix
|
||||||
|
./languages/treesitter/treesitter-context.nix
|
||||||
|
./languages/treesitter/treesitter-textobjects.nix
|
||||||
|
./languages/treesitter/ts-autotag.nix
|
||||||
|
./languages/treesitter/ts-context-commentstring.nix
|
||||||
|
|
||||||
|
./lsp/conform.nix
|
||||||
|
./lsp/fidget.nix
|
||||||
|
./lsp/lsp.nix
|
||||||
|
./lsp/lspsaga.nix
|
||||||
|
./lsp/trouble.nix
|
||||||
|
|
||||||
|
./none-ls/none-ls.nix
|
||||||
|
|
||||||
|
./snippets/luasnip.nix
|
||||||
|
|
||||||
|
./statusline/lualine.nix
|
||||||
|
./statusline/staline.nix
|
||||||
|
|
||||||
|
./telescope/telescope.nix
|
||||||
|
|
||||||
|
./ui/alpha.nix
|
||||||
|
./ui/dressing-nvim.nix
|
||||||
|
./ui/indent-blankline.nix
|
||||||
|
./ui/noice.nix
|
||||||
|
./ui/nvim-notify.nix
|
||||||
|
./ui/nui.nix
|
||||||
|
|
||||||
|
./utils/better-escape.nix
|
||||||
|
./utils/neocord.nix
|
||||||
|
./utils/flash.nix
|
||||||
|
./utils/hardtime.nix
|
||||||
|
./utils/harpoon.nix
|
||||||
|
./utils/illuminate.nix
|
||||||
|
./utils/markdown-preview.nix
|
||||||
|
./utils/mini.nix
|
||||||
|
./utils/neodev.nix
|
||||||
|
./utils/neotest.nix
|
||||||
|
./utils/nvim-autopairs.nix
|
||||||
|
./utils/nvim-colorizer.nix
|
||||||
|
./utils/nvim-surround.nix
|
||||||
|
./utils/oil.nix
|
||||||
|
./utils/persistence.nix
|
||||||
|
./utils/plenary.nix
|
||||||
|
./utils/project-nvim.nix
|
||||||
|
./utils/sidebar.nix
|
||||||
|
./utils/tmux-navigator.nix
|
||||||
|
./utils/todo-comments.nix
|
||||||
|
./utils/toggleterm.nix
|
||||||
|
./utils/ultimate-autopair.nix
|
||||||
|
./utils/undotree.nix
|
||||||
|
./utils/vim-be-good.nix
|
||||||
|
./utils/wakatime.nix
|
||||||
|
./utils/whichkey.nix
|
||||||
|
./utils/wilder.nix
|
||||||
|
];
|
||||||
|
}
|
64
pkgs/nvim/config/filetrees/neo-tree.nix
Normal file
64
pkgs/nvim/config/filetrees/neo-tree.nix
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
plugins.neo-tree = {
|
||||||
|
enable = false;
|
||||||
|
enableDiagnostics = true;
|
||||||
|
enableGitStatus = true;
|
||||||
|
enableModifiedMarkers = true;
|
||||||
|
enableRefreshOnWrite = true;
|
||||||
|
closeIfLastWindow = true;
|
||||||
|
popupBorderStyle = "rounded"; # Type: null or one of “NC”, “double”, “none”, “rounded”, “shadow”, “single”, “solid” or raw lua code
|
||||||
|
buffers = {
|
||||||
|
bindToCwd = false;
|
||||||
|
followCurrentFile = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
width = 40;
|
||||||
|
height = 15;
|
||||||
|
autoExpandWidth = false;
|
||||||
|
mappings = {
|
||||||
|
"<space>" = "none";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# keymaps = [
|
||||||
|
# {
|
||||||
|
# mode = "n";
|
||||||
|
# key = "<leader>e";
|
||||||
|
# action = ":Neotree toggle reveal_force_cwd<cr>";
|
||||||
|
# options = {
|
||||||
|
# silent = true;
|
||||||
|
# desc = "Explorer NeoTree (root dir)";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# mode = "n";
|
||||||
|
# key = "<leader>E";
|
||||||
|
# action = "<cmd>Neotree toggle<CR>";
|
||||||
|
# options = {
|
||||||
|
# silent = true;
|
||||||
|
# desc = "Explorer NeoTree (cwd)";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# mode = "n";
|
||||||
|
# key = "<leader>be";
|
||||||
|
# action = ":Neotree buffers<CR>";
|
||||||
|
# options = {
|
||||||
|
# silent = true;
|
||||||
|
# desc = "Buffer explorer";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# mode = "n";
|
||||||
|
# key = "<leader>ge";
|
||||||
|
# action = ":Neotree git_status<CR>";
|
||||||
|
# options = {
|
||||||
|
# silent = true;
|
||||||
|
# desc = "Git explorer";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
}
|
5
pkgs/nvim/config/git/diffview.nix
Normal file
5
pkgs/nvim/config/git/diffview.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
plugins.diffview = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
92
pkgs/nvim/config/git/gitsigns.nix
Normal file
92
pkgs/nvim/config/git/gitsigns.nix
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
{
|
||||||
|
plugins.gitsigns = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
trouble = true;
|
||||||
|
current_line_blame = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = ["n" "v"];
|
||||||
|
key = "<leader>gh";
|
||||||
|
action = "gitsigns";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "+hunks";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ghb";
|
||||||
|
action = ":Gitsigns blame_line<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Blame line";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ghd";
|
||||||
|
action = ":Gitsigns diffthis<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Diff This";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ghp";
|
||||||
|
action = ":Gitsigns preview_hunk<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Preview hunk";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ghR";
|
||||||
|
action = ":Gitsigns reset_buffer<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Reset Buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = ["n" "v"];
|
||||||
|
key = "<leader>ghr";
|
||||||
|
action = ":Gitsigns reset_hunk<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Reset Hunk";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = ["n" "v"];
|
||||||
|
key = "<leader>ghs";
|
||||||
|
action = ":Gitsigns stage_hunk<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Stage Hunk";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ghS";
|
||||||
|
action = ":Gitsigns stage_buffer<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Stage Buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ghu";
|
||||||
|
action = ":Gitsigns undo_stage_hunk<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Undo Stage Hunk";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
20
pkgs/nvim/config/git/lazygit.nix
Normal file
20
pkgs/nvim/config/git/lazygit.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
lazygit-nvim
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfigLua = ''
|
||||||
|
require("telescope").load_extension("lazygit")
|
||||||
|
'';
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>gg";
|
||||||
|
action = "<cmd>LazyGit<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "LazyGit (root dir)";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
12
pkgs/nvim/config/git/neogit.nix
Normal file
12
pkgs/nvim/config/git/neogit.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
plugins.neogit = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>gg";
|
||||||
|
action = "<cmd>Neogit<CR>";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
526
pkgs/nvim/config/keymaps.nix
Normal file
526
pkgs/nvim/config/keymaps.nix
Normal file
@ -0,0 +1,526 @@
|
|||||||
|
# Thanks for the keybinds primeagen and folke!
|
||||||
|
{
|
||||||
|
globals.mapleader = " ";
|
||||||
|
|
||||||
|
# TODO: Move general mappings to which-key
|
||||||
|
keymaps = [
|
||||||
|
# Disable arrow keys
|
||||||
|
{
|
||||||
|
mode = ["n" "i"];
|
||||||
|
key = "<Up>";
|
||||||
|
action = "<Nop>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
noremap = true;
|
||||||
|
desc = "Disable Up arrow key";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = ["n" "i"];
|
||||||
|
key = "<Down>";
|
||||||
|
action = "<Nop>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
noremap = true;
|
||||||
|
desc = "Disable Down arrow key";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = ["n" "i"];
|
||||||
|
key = "<Right>";
|
||||||
|
action = "<Nop>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
noremap = true;
|
||||||
|
desc = "Disable Right arrow key";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = ["n" "i"];
|
||||||
|
key = "<Left>";
|
||||||
|
action = "<Nop>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
noremap = true;
|
||||||
|
desc = "Disable Left arrow key";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# General maps
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>f";
|
||||||
|
action = "+find/file";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>s";
|
||||||
|
action = "+search";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>q";
|
||||||
|
action = "+quit/session";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = ["n" "v"];
|
||||||
|
key = "<leader>g";
|
||||||
|
action = "+git";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>u";
|
||||||
|
action = "+ui";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>w";
|
||||||
|
action = "+windows";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader><Tab>";
|
||||||
|
action = "+tab";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = ["n" "v"];
|
||||||
|
key = "<leader>d";
|
||||||
|
action = "+debug";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = ["n" "v"];
|
||||||
|
key = "<leader>c";
|
||||||
|
action = "+code";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = ["n" "v"];
|
||||||
|
key = "<leader>t";
|
||||||
|
action = "+test";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tabs
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader><tab>l";
|
||||||
|
action = "<cmd>tablast<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Last tab";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader><tab>f";
|
||||||
|
action = "<cmd>tabfirst<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "First Tab";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader><tab><tab>";
|
||||||
|
action = "<cmd>tabnew<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "New Tab";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader><tab>]";
|
||||||
|
action = "<cmd>tabnext<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Next Tab";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader><tab>d";
|
||||||
|
action = "<cmd>tabclose<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Close tab";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader><tab>[";
|
||||||
|
action = "<cmd>tabprevious<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Previous Tab";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ww";
|
||||||
|
action = "<C-W>p";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Other window";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>wd";
|
||||||
|
action = "<C-W>c";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Delete window";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>w-";
|
||||||
|
action = "<C-W>s";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Split window below";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>w|";
|
||||||
|
action = "<C-W>v";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Split window right";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# {
|
||||||
|
# mode = "n";
|
||||||
|
# key = "<leader>-";
|
||||||
|
# action = "<C-W>s";
|
||||||
|
# options = {
|
||||||
|
# silent = true;
|
||||||
|
# desc = "Split window below";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
|
||||||
|
# {
|
||||||
|
# mode = "n";
|
||||||
|
# key = "<leader>|";
|
||||||
|
# action = "<C-W>v";
|
||||||
|
# options = {
|
||||||
|
# silent = true;
|
||||||
|
# desc = "Split window right";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-s>";
|
||||||
|
action = "<cmd>w<cr><esc>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Save file";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Quit/Session
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>qq";
|
||||||
|
action = "<cmd>quitall<cr><esc>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Quit all";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>qs";
|
||||||
|
action = ":lua require('persistence').load()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Restore session";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ql";
|
||||||
|
action = "<cmd>lua require('persistence').load({ last = true })<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Restore last session";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>qd";
|
||||||
|
action = "<cmd>lua require('persistence').stop()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Don't save current session";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ul";
|
||||||
|
action = ":lua ToggleLineNumber()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Toggle Line Numbers";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>uL";
|
||||||
|
action = ":lua ToggleRelativeLineNumber()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Toggle Relative Line Numbers";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>uw";
|
||||||
|
action = ":lua ToggleWrap()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Toggle Line Wrap";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
key = "J";
|
||||||
|
action = ":m '>+1<CR>gv=gv";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Move up when line is highlighted";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
key = "K";
|
||||||
|
action = ":m '<-2<CR>gv=gv";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Move down when line is highlighted";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "J";
|
||||||
|
action = "mzJ`z";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Allow cursor to stay in the same place after appeding to current line";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
key = "<";
|
||||||
|
action = "<gv";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Indent while remaining in visual mode.";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
key = ">";
|
||||||
|
action = ">gv";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Indent while remaining in visual mode.";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-d>";
|
||||||
|
action = "<C-d>zz";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Allow <C-d> and <C-u> to keep the cursor in the middle";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-u>";
|
||||||
|
action = "<C-u>zz";
|
||||||
|
options = {
|
||||||
|
desc = "Allow C-d and C-u to keep the cursor in the middle";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remap for dealing with word wrap and adding jumps to the jumplist.
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "j";
|
||||||
|
action.__raw = "
|
||||||
|
[[(v:count > 1 ? 'm`' . v:count : 'g') . 'j']]
|
||||||
|
";
|
||||||
|
options = {
|
||||||
|
expr = true;
|
||||||
|
desc = "Remap for dealing with word wrap and adding jumps to the jumplist.";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "k";
|
||||||
|
action.__raw = "
|
||||||
|
[[(v:count > 1 ? 'm`' . v:count : 'g') . 'k']]
|
||||||
|
";
|
||||||
|
options = {
|
||||||
|
expr = true;
|
||||||
|
desc = "Remap for dealing with word wrap and adding jumps to the jumplist.";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "n";
|
||||||
|
action = "nzzzv";
|
||||||
|
options = {
|
||||||
|
desc = "Allow search terms to stay in the middle";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "N";
|
||||||
|
action = "Nzzzv";
|
||||||
|
options = {
|
||||||
|
desc = "Allow search terms to stay in the middle";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Paste stuff without saving the deleted word into the buffer
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
key = "<leader>p";
|
||||||
|
action = "\"_dP";
|
||||||
|
options = {
|
||||||
|
desc = "Deletes to void register and paste over";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copy stuff to system clipboard with <leader> + y or just y to have it just in vim
|
||||||
|
{
|
||||||
|
mode = ["n" "v"];
|
||||||
|
key = "<leader>y";
|
||||||
|
action = "\"+y";
|
||||||
|
options = {
|
||||||
|
desc = "Copy to system clipboard";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = ["n" "v"];
|
||||||
|
key = "<leader>Y";
|
||||||
|
action = "\"+Y";
|
||||||
|
options = {
|
||||||
|
desc = "Copy to system clipboard";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Delete to void register
|
||||||
|
{
|
||||||
|
mode = ["n" "v"];
|
||||||
|
key = "<leader>D";
|
||||||
|
action = "\"_d";
|
||||||
|
options = {
|
||||||
|
desc = "Delete to void register";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# <C-c> instead of pressing esc just because
|
||||||
|
{
|
||||||
|
mode = "i";
|
||||||
|
key = "<C-c>";
|
||||||
|
action = "<Esc>";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-f>";
|
||||||
|
action = "!tmux new tmux-sessionizer<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Switch between projects";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
extraConfigLua = ''
|
||||||
|
local notify = require("notify")
|
||||||
|
|
||||||
|
local function show_notification(message, level)
|
||||||
|
notify(message, level, { title = "conform.nvim" })
|
||||||
|
end
|
||||||
|
|
||||||
|
function ToggleLineNumber()
|
||||||
|
if vim.wo.number then
|
||||||
|
vim.wo.number = false
|
||||||
|
show_notification("Line numbers disabled", "info")
|
||||||
|
else
|
||||||
|
vim.wo.number = true
|
||||||
|
vim.wo.relativenumber = false
|
||||||
|
show_notification("Line numbers enabled", "info")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function ToggleRelativeLineNumber()
|
||||||
|
if vim.wo.relativenumber then
|
||||||
|
vim.wo.relativenumber = false
|
||||||
|
show_notification("Relative line numbers disabled", "info")
|
||||||
|
else
|
||||||
|
vim.wo.relativenumber = true
|
||||||
|
vim.wo.number = false
|
||||||
|
show_notification("Relative line numbers enabled", "info")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function ToggleWrap()
|
||||||
|
if vim.wo.wrap then
|
||||||
|
vim.wo.wrap = false
|
||||||
|
show_notification("Wrap disabled", "info")
|
||||||
|
else
|
||||||
|
vim.wo.wrap = true
|
||||||
|
vim.wo.number = false
|
||||||
|
show_notification("Wrap enabled", "info")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if vim.lsp.inlay_hint then
|
||||||
|
vim.keymap.set('n', '<leader>uh', function()
|
||||||
|
vim.lsp.inlay_hint(0, nil)
|
||||||
|
end, { desc = 'Toggle Inlay Hints' })
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
81
pkgs/nvim/config/languages/nvim-jdtls.nix
Normal file
81
pkgs/nvim/config/languages/nvim-jdtls.nix
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
let
|
||||||
|
javaTestPath = "/nix/store/j3nvmhvj2pmnykw5pbm51dn0bz4cv6j3-vscode-extension-vscjava-vscode-java-test-0.38.2023032402/share/vscode/extensions/vscjava.vscode-java-test/server/com.microsoft.java.test.plugin-0.38.2.jar
|
||||||
|
";
|
||||||
|
in {
|
||||||
|
plugins.nvim-jdtls = {
|
||||||
|
enable = true;
|
||||||
|
cmd = [
|
||||||
|
"/nix/store/20h2hjjm94gbskqhbwikbgxbblv1xpf2-jdt-language-server-1.31.0/bin/jdtls"
|
||||||
|
];
|
||||||
|
# configuration = "/path/to/configuration";
|
||||||
|
data = "~/.cache/jdtls/workspace";
|
||||||
|
settings = {
|
||||||
|
java = {
|
||||||
|
signatureHelp = true;
|
||||||
|
completion = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
initOptions = {
|
||||||
|
bundles = [
|
||||||
|
"/nix/store/b9ib40q36wxjl4xs5lng263lflz1fsi7-vscode-extension-vscjava-vscode-java-debug-0.49.2023032407/share/vscode/extensions/vscjava.vscode-java-debug/server/com.microsoft.java.debug.plugin-0.44.0.jar"
|
||||||
|
"${javaTestPath}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# extraConfigLua = ''
|
||||||
|
# local jdtls = require("jdtls")
|
||||||
|
# local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||||
|
#
|
||||||
|
# local root_dir = require("jdtls.setup").find_root({ "packageInfo" }, "Config")
|
||||||
|
# local home = os.getenv("HOME")
|
||||||
|
# local eclipse_workspace = home .. "/.local/share/eclipse/" .. vim.fn.fnamemodify(root_dir, ":p:h:t")
|
||||||
|
#
|
||||||
|
# local ws_folders_jdtls = {}
|
||||||
|
# if root_dir then
|
||||||
|
# local file = io.open(root_dir .. "/.bemol/ws_root_folders")
|
||||||
|
# if file then
|
||||||
|
# for line in file:lines() do
|
||||||
|
# table.insert(ws_folders_jdtls, "file://" .. line)
|
||||||
|
# end
|
||||||
|
# file:close()
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# -- for completions
|
||||||
|
# local client_capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
# local capabilities = cmp_nvim_lsp.default_capabilities(client_capabilities)
|
||||||
|
#
|
||||||
|
# local config = {
|
||||||
|
# capabilities = capabilities,
|
||||||
|
# cmd = {
|
||||||
|
# "${pkgs.jdt-language-server}/bin/jdt-language-server",
|
||||||
|
# "--jvm-arg=-javaagent:" .. home .. "/Developer/lombok.jar",
|
||||||
|
# "-data",
|
||||||
|
# eclipse_workspace,
|
||||||
|
# "--add-modules=ALL-SYSTEM",
|
||||||
|
# },
|
||||||
|
# root_dir = root_dir,
|
||||||
|
# init_options = {
|
||||||
|
# workspaceFolders = ws_folders_jdtls,
|
||||||
|
# },
|
||||||
|
# settings = {
|
||||||
|
# java = {
|
||||||
|
# signatureHelp = { enabled = true},
|
||||||
|
# completion = { enabled = true },
|
||||||
|
# },
|
||||||
|
# },
|
||||||
|
# on_attach = function(client, bufnr)
|
||||||
|
# local opts = { silent = true, buffer = bufnr }
|
||||||
|
# vim.keymap.set('n', "<leader>lo", jdtls.organize_imports, { desc = 'Organize imports', buffer = bufnr })
|
||||||
|
# vim.keymap.set('n', "<leader>df", jdtls.test_class, opts)
|
||||||
|
# vim.keymap.set('n', "<leader>dn", jdtls.test_nearest_method, opts)
|
||||||
|
# vim.keymap.set('n', '<leader>rv', jdtls.extract_variable_all, { desc = 'Extract variable', buffer = bufnr })
|
||||||
|
# vim.keymap.set('n', '<leader>rc', jdtls.extract_constant, { desc = 'Extract constant', buffer = bufnr })
|
||||||
|
# end
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# jdtls.start_or_attach(config)
|
||||||
|
# '';
|
||||||
|
|
16
pkgs/nvim/config/languages/nvim-lint.nix
Normal file
16
pkgs/nvim/config/languages/nvim-lint.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
plugins.lint = {
|
||||||
|
enable = true;
|
||||||
|
lintersByFt = {
|
||||||
|
nix = ["statix"];
|
||||||
|
lua = ["selene"];
|
||||||
|
python = ["flake8"];
|
||||||
|
javascript = ["eslint_d"];
|
||||||
|
javascriptreact = ["eslint_d"];
|
||||||
|
typescript = ["eslint_d"];
|
||||||
|
typescriptreact = ["eslint_d"];
|
||||||
|
json = ["jsonlint"];
|
||||||
|
java = ["checkstyle"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
plugins.treesitter-context = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
plugins.treesitter-textobjects = {
|
||||||
|
enable = false;
|
||||||
|
select = {
|
||||||
|
enable = true;
|
||||||
|
lookahead = true;
|
||||||
|
keymaps = {
|
||||||
|
"aa" = "@parameter.outer";
|
||||||
|
"ia" = "@parameter.inner";
|
||||||
|
"af" = "@function.outer";
|
||||||
|
"if" = "@function.inner";
|
||||||
|
"ac" = "@class.outer";
|
||||||
|
"ic" = "@class.inner";
|
||||||
|
"ii" = "@conditional.inner";
|
||||||
|
"ai" = "@conditional.outer";
|
||||||
|
"il" = "@loop.inner";
|
||||||
|
"al" = "@loop.outer";
|
||||||
|
"at" = "@comment.outer";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
move = {
|
||||||
|
enable = true;
|
||||||
|
gotoNextStart = {
|
||||||
|
"]m" = "@function.outer";
|
||||||
|
"]]" = "@class.outer";
|
||||||
|
};
|
||||||
|
gotoNextEnd = {
|
||||||
|
"]M" = "@function.outer";
|
||||||
|
"][" = "@class.outer";
|
||||||
|
};
|
||||||
|
gotoPreviousStart = {
|
||||||
|
"[m" = "@function.outer";
|
||||||
|
"[[" = "@class.outer";
|
||||||
|
};
|
||||||
|
gotoPreviousEnd = {
|
||||||
|
"[M" = "@function.outer";
|
||||||
|
"[]" = "@class.outer";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
swap = {
|
||||||
|
enable = true;
|
||||||
|
swapNext = {
|
||||||
|
"<leader>a" = "@parameters.inner";
|
||||||
|
};
|
||||||
|
swapPrevious = {
|
||||||
|
"<leader>A" = "@parameter.outer";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
8
pkgs/nvim/config/languages/treesitter/treesitter.nix
Normal file
8
pkgs/nvim/config/languages/treesitter/treesitter.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
plugins.treesitter = {
|
||||||
|
enable = true;
|
||||||
|
indent = true;
|
||||||
|
folding = true;
|
||||||
|
nixvimInjections = true;
|
||||||
|
};
|
||||||
|
}
|
5
pkgs/nvim/config/languages/treesitter/ts-autotag.nix
Normal file
5
pkgs/nvim/config/languages/treesitter/ts-autotag.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
plugins.ts-autotag = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
plugins.ts-context-commentstring = {
|
||||||
|
enable = true;
|
||||||
|
disableAutoInitialization = false;
|
||||||
|
};
|
||||||
|
}
|
47
pkgs/nvim/config/languages/typescript-tools-nvim.nix
Normal file
47
pkgs/nvim/config/languages/typescript-tools-nvim.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
plugins.typescript-tools = {
|
||||||
|
enable = true;
|
||||||
|
onAttach = ''
|
||||||
|
function(client, bufnr)
|
||||||
|
client.server_capabilities.documentFormattingProvider = false
|
||||||
|
client.server_capabilities.documentRangeFormattingProvider = false
|
||||||
|
|
||||||
|
if vim.lsp.inlay_hint then
|
||||||
|
vim.lsp.inlay_hint(bufnr, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
settings = {
|
||||||
|
tsserverFilePreferences = {
|
||||||
|
# Inlay Hints
|
||||||
|
includeInlayParameterNameHints = "all";
|
||||||
|
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||||
|
includeInlayFunctionParameterTypeHints = true;
|
||||||
|
includeInlayVariableTypeHints = true;
|
||||||
|
includeInlayVariableTypeHintsWhenTypeMatchesName = true;
|
||||||
|
includeInlayPropertyDeclarationTypeHints = true;
|
||||||
|
includeInlayFunctionLikeReturnTypeHints = true;
|
||||||
|
includeInlayEnumMemberValueHints = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>co";
|
||||||
|
action = "<cmd>TSToolsOrganizeImports<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Organize Imports";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>cR";
|
||||||
|
action = "<cmd>TSToolsRemoveUnusedImports<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Remove Unused Imports";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
92
pkgs/nvim/config/lsp/conform.nix
Normal file
92
pkgs/nvim/config/lsp/conform.nix
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
{
|
||||||
|
plugins.conform-nvim = {
|
||||||
|
enable = true;
|
||||||
|
notifyOnError = true;
|
||||||
|
formattersByFt = {
|
||||||
|
html = [["prettierd" "prettier"]];
|
||||||
|
css = [["prettierd" "prettier"]];
|
||||||
|
javascript = [["prettierd" "prettier"]];
|
||||||
|
javascriptreact = [["prettierd" "prettier"]];
|
||||||
|
typescript = [["prettierd" "prettier"]];
|
||||||
|
typescriptreact = [["prettierd" "prettier"]];
|
||||||
|
java = ["google-java-format"];
|
||||||
|
python = ["black"];
|
||||||
|
lua = ["stylua"];
|
||||||
|
nix = ["alejandra"];
|
||||||
|
markdown = [["prettierd" "prettier"]];
|
||||||
|
rust = ["rustfmt"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>uf";
|
||||||
|
action = ":FormatToggle<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle Format";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>cf";
|
||||||
|
action = "<cmd>lua require('conform').format()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Format Buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "v";
|
||||||
|
key = "<leader>cF";
|
||||||
|
action = "<cmd>lua require('conform').format()<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Format Lines";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfigLua = ''
|
||||||
|
local conform = require("conform")
|
||||||
|
local notify = require("notify")
|
||||||
|
|
||||||
|
conform.setup({
|
||||||
|
format_on_save = function(bufnr)
|
||||||
|
-- Disable with a global or buffer-local variable
|
||||||
|
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return { timeout_ms = 500, lsp_fallback = true }
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
local function show_notification(message, level)
|
||||||
|
notify(message, level, { title = "conform.nvim" })
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command("FormatToggle", function(args)
|
||||||
|
local is_global = not args.bang
|
||||||
|
if is_global then
|
||||||
|
vim.g.disable_autoformat = not vim.g.disable_autoformat
|
||||||
|
if vim.g.disable_autoformat then
|
||||||
|
show_notification("Autoformat-on-save disabled globally", "info")
|
||||||
|
else
|
||||||
|
show_notification("Autoformat-on-save enabled globally", "info")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
vim.b.disable_autoformat = not vim.b.disable_autoformat
|
||||||
|
if vim.b.disable_autoformat then
|
||||||
|
show_notification("Autoformat-on-save disabled for this buffer", "info")
|
||||||
|
else
|
||||||
|
show_notification("Autoformat-on-save enabled for this buffer", "info")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end, {
|
||||||
|
desc = "Toggle autoformat-on-save",
|
||||||
|
bang = true,
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
}
|
99
pkgs/nvim/config/lsp/fidget.nix
Normal file
99
pkgs/nvim/config/lsp/fidget.nix
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
{
|
||||||
|
plugins.fidget = {
|
||||||
|
enable = true;
|
||||||
|
logger = {
|
||||||
|
level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
|
||||||
|
floatPrecision = 0.01; # Limit the number of decimals displayed for floats
|
||||||
|
};
|
||||||
|
progress = {
|
||||||
|
pollRate = 0; # How and when to poll for progress messages
|
||||||
|
suppressOnInsert = true; # Suppress new messages while in insert mode
|
||||||
|
ignoreDoneAlready = false; # Ignore new tasks that are already complete
|
||||||
|
ignoreEmptyMessage = false; # Ignore new tasks that don't contain a message
|
||||||
|
clearOnDetach =
|
||||||
|
# Clear notification group when LSP server detaches
|
||||||
|
''
|
||||||
|
function(client_id)
|
||||||
|
local client = vim.lsp.get_client_by_id(client_id)
|
||||||
|
return client and client.name or nil
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
notificationGroup =
|
||||||
|
# How to get a progress message's notification group key
|
||||||
|
''
|
||||||
|
function(msg) return msg.lsp_client.name end
|
||||||
|
'';
|
||||||
|
ignore = []; # List of LSP servers to ignore
|
||||||
|
lsp = {
|
||||||
|
progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size
|
||||||
|
};
|
||||||
|
display = {
|
||||||
|
renderLimit = 16; # How many LSP messages to show at once
|
||||||
|
doneTtl = 3; # How long a message should persist after completion
|
||||||
|
doneIcon = "✔"; # Icon shown when all LSP progress tasks are complete
|
||||||
|
doneStyle = "Constant"; # Highlight group for completed LSP tasks
|
||||||
|
progressTtl = "math.huge"; # How long a message should persist when in progress
|
||||||
|
progressIcon = {
|
||||||
|
pattern = "dots";
|
||||||
|
period = 1;
|
||||||
|
}; # Icon shown when LSP progress tasks are in progress
|
||||||
|
progressStyle = "WarningMsg"; # Highlight group for in-progress LSP tasks
|
||||||
|
groupStyle = "Title"; # Highlight group for group name (LSP server name)
|
||||||
|
iconStyle = "Question"; # Highlight group for group icons
|
||||||
|
priority = 30; # Ordering priority for LSP notification group
|
||||||
|
skipHistory = true; # Whether progress notifications should be omitted from history
|
||||||
|
formatMessage = ''
|
||||||
|
require ("fidget.progress.display").default_format_message
|
||||||
|
''; # How to format a progress message
|
||||||
|
formatAnnote = ''
|
||||||
|
function (msg) return msg.title end
|
||||||
|
''; # How to format a progress annotation
|
||||||
|
formatGroupName = ''
|
||||||
|
function (group) return tostring (group) end
|
||||||
|
''; # How to format a progress notification group's name
|
||||||
|
overrides = {
|
||||||
|
rust_analyzer = {
|
||||||
|
name = "rust-analyzer";
|
||||||
|
};
|
||||||
|
}; # Override options from the default notification config
|
||||||
|
};
|
||||||
|
};
|
||||||
|
notification = {
|
||||||
|
pollRate = 10; # How frequently to update and render notifications
|
||||||
|
filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
|
||||||
|
historySize = 128; # Number of removed messages to retain in history
|
||||||
|
overrideVimNotify = true;
|
||||||
|
redirect = ''
|
||||||
|
function(msg, level, opts)
|
||||||
|
if opts and opts.on_open then
|
||||||
|
return require("fidget.integration.nvim-notify").delegate(msg, level, opts)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
configs = {
|
||||||
|
default = "require('fidget.notification').default_config";
|
||||||
|
};
|
||||||
|
|
||||||
|
window = {
|
||||||
|
normalHl = "Comment";
|
||||||
|
winblend = 0;
|
||||||
|
border = "none"; # none, single, double, rounded, solid, shadow
|
||||||
|
zindex = 45;
|
||||||
|
maxWidth = 0;
|
||||||
|
maxHeight = 0;
|
||||||
|
xPadding = 1;
|
||||||
|
yPadding = 0;
|
||||||
|
align = "bottom";
|
||||||
|
relative = "editor";
|
||||||
|
};
|
||||||
|
view = {
|
||||||
|
stackUpwards = true; # Display notification items from bottom to top
|
||||||
|
iconSeparator = " "; # Separator between group name and icon
|
||||||
|
groupSeparator = "---"; # Separator between notification groups
|
||||||
|
groupSeparatorHl =
|
||||||
|
# Highlight group used for group separator
|
||||||
|
"Comment";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
167
pkgs/nvim/config/lsp/lsp.nix
Normal file
167
pkgs/nvim/config/lsp/lsp.nix
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
{
|
||||||
|
plugins = {
|
||||||
|
lsp-format = {
|
||||||
|
enable = false; # Enable it if you want lsp-format integration for none-ls
|
||||||
|
};
|
||||||
|
lsp = {
|
||||||
|
enable = true;
|
||||||
|
capabilities = "offsetEncoding = 'utf-16'";
|
||||||
|
servers = {
|
||||||
|
clangd = {enable = true;};
|
||||||
|
lua-ls = {
|
||||||
|
enable = true;
|
||||||
|
extraOptions = {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
completion = {
|
||||||
|
callSnippet = "Replace";
|
||||||
|
};
|
||||||
|
telemetry = {
|
||||||
|
enabled = false;
|
||||||
|
};
|
||||||
|
hint = {enable = true;};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nil_ls = {enable = true;};
|
||||||
|
tsserver = {
|
||||||
|
enable = false;
|
||||||
|
filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact"];
|
||||||
|
extraOptions = {
|
||||||
|
settings = {
|
||||||
|
javascript = {
|
||||||
|
inlayHints = {
|
||||||
|
includeInlayEnumMemberValueHints = true;
|
||||||
|
includeInlayFunctionLikeReturnTypeHints = true;
|
||||||
|
includeInlayFunctionParameterTypeHints = true;
|
||||||
|
includeInlayParameterNameHints = "all";
|
||||||
|
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||||
|
includeInlayPropertyDeclarationTypeHints = true;
|
||||||
|
includeInlayVariableTypeHints = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
typescript = {
|
||||||
|
inlayHints = {
|
||||||
|
includeInlayEnumMemberValueHints = true;
|
||||||
|
includeInlayFunctionLikeReturnTypeHints = true;
|
||||||
|
includeInlayFunctionParameterTypeHints = true;
|
||||||
|
includeInlayParameterNameHints = "all";
|
||||||
|
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
|
||||||
|
includeInlayPropertyDeclarationTypeHints = true;
|
||||||
|
includeInlayVariableTypeHints = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
eslint = {enable = true;};
|
||||||
|
pyright = {enable = true;};
|
||||||
|
ruff-lsp = {enable = true;};
|
||||||
|
|
||||||
|
rust-analyzer = {
|
||||||
|
enable = true;
|
||||||
|
installCargo = true;
|
||||||
|
installRustc = true;
|
||||||
|
settings = {
|
||||||
|
checkOnSave = true;
|
||||||
|
check = {
|
||||||
|
command = "clippy";
|
||||||
|
};
|
||||||
|
# inlayHints = {
|
||||||
|
# enable = true;
|
||||||
|
# showParameterNames = true;
|
||||||
|
# parameterHintsPrefix = "<- ";
|
||||||
|
# otherHintsPrefix = "=> ";
|
||||||
|
# };
|
||||||
|
procMacro = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# keymaps = {
|
||||||
|
# silent = true;
|
||||||
|
# lspBuf = {
|
||||||
|
# gd = {
|
||||||
|
# action = "definition";
|
||||||
|
# desc = "Goto Definition";
|
||||||
|
# };
|
||||||
|
# gr = {
|
||||||
|
# action = "references";
|
||||||
|
# desc = "Goto References";
|
||||||
|
# };
|
||||||
|
# gD = {
|
||||||
|
# action = "declaration";
|
||||||
|
# desc = "Goto Declaration";
|
||||||
|
# };
|
||||||
|
# gI = {
|
||||||
|
# action = "implementation";
|
||||||
|
# desc = "Goto Implementation";
|
||||||
|
# };
|
||||||
|
# gT = {
|
||||||
|
# action = "type_definition";
|
||||||
|
# desc = "Type Definition";
|
||||||
|
# };
|
||||||
|
# K = {
|
||||||
|
# action = "hover";
|
||||||
|
# desc = "Hover";
|
||||||
|
# };
|
||||||
|
# "<leader>cw" = {
|
||||||
|
# action = "workspace_symbol";
|
||||||
|
# desc = "Workspace Symbol";
|
||||||
|
# };
|
||||||
|
# "<leader>cr" = {
|
||||||
|
# action = "rename";
|
||||||
|
# desc = "Rename";
|
||||||
|
# };
|
||||||
|
# "<leader>ca" = {
|
||||||
|
# action = "code_action";
|
||||||
|
# desc = "Code Action";
|
||||||
|
# };
|
||||||
|
# "<C-k>" = {
|
||||||
|
# action = "signature_help";
|
||||||
|
# desc = "Signature Help";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# diagnostic = {
|
||||||
|
# "<leader>cd" = {
|
||||||
|
# action = "open_float";
|
||||||
|
# desc = "Line Diagnostics";
|
||||||
|
# };
|
||||||
|
# "[d" = {
|
||||||
|
# action = "goto_next";
|
||||||
|
# desc = "Next Diagnostic";
|
||||||
|
# };
|
||||||
|
# "]d" = {
|
||||||
|
# action = "goto_prev";
|
||||||
|
# desc = "Previous Diagnostic";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraConfigLua = ''
|
||||||
|
local _border = "rounded"
|
||||||
|
|
||||||
|
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
|
||||||
|
vim.lsp.handlers.hover, {
|
||||||
|
border = _border
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
|
||||||
|
vim.lsp.handlers.signature_help, {
|
||||||
|
border = _border
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
vim.diagnostic.config{
|
||||||
|
float={border=_border}
|
||||||
|
};
|
||||||
|
|
||||||
|
require('lspconfig.ui.windows').default_options = {
|
||||||
|
border = _border
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
186
pkgs/nvim/config/lsp/lspsaga.nix
Normal file
186
pkgs/nvim/config/lsp/lspsaga.nix
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
{
|
||||||
|
plugins.lspsaga = {
|
||||||
|
enable = true;
|
||||||
|
beacon = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
ui = {
|
||||||
|
border = "rounded"; # One of none, single, double, rounded, solid, shadow
|
||||||
|
codeAction = "💡"; # Can be any symbol you want 💡
|
||||||
|
};
|
||||||
|
hover = {
|
||||||
|
openCmd = "!floorp"; # Choose your browser
|
||||||
|
openLink = "gx";
|
||||||
|
};
|
||||||
|
diagnostic = {
|
||||||
|
borderFollow = true;
|
||||||
|
diagnosticOnlyCurrent = false;
|
||||||
|
showCodeAction = true;
|
||||||
|
};
|
||||||
|
symbolInWinbar = {
|
||||||
|
enable = true; # Breadcrumbs
|
||||||
|
};
|
||||||
|
codeAction = {
|
||||||
|
extendGitSigns = false;
|
||||||
|
showServerName = true;
|
||||||
|
onlyInCursor = true;
|
||||||
|
numShortcut = true;
|
||||||
|
keys = {
|
||||||
|
exec = "<CR>";
|
||||||
|
quit = ["<Esc>" "q"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lightbulb = {
|
||||||
|
enable = false;
|
||||||
|
sign = false;
|
||||||
|
virtualText = true;
|
||||||
|
};
|
||||||
|
implement = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
rename = {
|
||||||
|
autoSave = false;
|
||||||
|
keys = {
|
||||||
|
exec = "<CR>";
|
||||||
|
quit = ["<C-k>" "<Esc>"];
|
||||||
|
select = "x";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
outline = {
|
||||||
|
autoClose = true;
|
||||||
|
autoPreview = true;
|
||||||
|
closeAfterJump = true;
|
||||||
|
layout = "normal"; # normal or float
|
||||||
|
winPosition = "right"; # left or right
|
||||||
|
keys = {
|
||||||
|
jump = "e";
|
||||||
|
quit = "q";
|
||||||
|
toggleOrJump = "o";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
scrollPreview = {
|
||||||
|
scrollDown = "<C-f>";
|
||||||
|
scrollUp = "<C-b>";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "gd";
|
||||||
|
action = "<cmd>Lspsaga finder def<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Goto Definition";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "gr";
|
||||||
|
action = "<cmd>Lspsaga finder ref<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Goto References";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# {
|
||||||
|
# mode = "n";
|
||||||
|
# key = "gD";
|
||||||
|
# action = "<cmd>Lspsaga show_line_diagnostics<CR>";
|
||||||
|
# options = {
|
||||||
|
# desc = "Goto Declaration";
|
||||||
|
# silent = true;
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "gI";
|
||||||
|
action = "<cmd>Lspsaga finder imp<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Goto Implementation";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "gT";
|
||||||
|
action = "<cmd>Lspsaga peek_type_definition<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Type Definition";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "K";
|
||||||
|
action = "<cmd>Lspsaga hover_doc<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Hover";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>cw";
|
||||||
|
action = "<cmd>Lspsaga outline<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Outline";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>cr";
|
||||||
|
action = "<cmd>Lspsaga rename<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Rename";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ca";
|
||||||
|
action = "<cmd>Lspsaga code_action<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Code Action";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>cd";
|
||||||
|
action = "<cmd>Lspsaga show_line_diagnostics<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Line Diagnostics";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "[d";
|
||||||
|
action = "<cmd>Lspsaga diagnostic_jump_next<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Next Diagnostic";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "]d";
|
||||||
|
action = "<cmd>Lspsaga diagnostic_jump_prev<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Previous Diagnostic";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
52
pkgs/nvim/config/lsp/trouble.nix
Normal file
52
pkgs/nvim/config/lsp/trouble.nix
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
plugins.trouble = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
auto_close = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# TODO: Add keybinds to close trouble (q would be nice), rn I need to use :x to close it...
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>x";
|
||||||
|
action = "+diagnostics/quickfix";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>xx";
|
||||||
|
action = "<cmd>TroubleToggle<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Document Diagnostics (Trouble)";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>xX";
|
||||||
|
action = "<cmd>TroubleToggle workspace_diagnostics<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Workspace Diagnostics (Trouble)";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>xt";
|
||||||
|
action = "<cmd>TroubleToggle todo<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Todo (Trouble)";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>xQ";
|
||||||
|
action = "<cmd>TodoQuickFix<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Quickfix List (Trouble)";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
73
pkgs/nvim/config/none-ls/none-ls.nix
Normal file
73
pkgs/nvim/config/none-ls/none-ls.nix
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
{
|
||||||
|
plugins.none-ls = {
|
||||||
|
enable = false;
|
||||||
|
enableLspFormat = false;
|
||||||
|
updateInInsert = false;
|
||||||
|
onAttach = ''
|
||||||
|
function(client, bufnr)
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
sources = {
|
||||||
|
code_actions = {
|
||||||
|
gitsigns.enable = true;
|
||||||
|
statix.enable = true;
|
||||||
|
};
|
||||||
|
diagnostics = {
|
||||||
|
checkstyle = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
statix = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
formatting = {
|
||||||
|
alejandra = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
prettier = {
|
||||||
|
enable = true;
|
||||||
|
withArgs = ''
|
||||||
|
{
|
||||||
|
extra_args = { "--no-semi", "--single-quote" },
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
google_java_format = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
stylua = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
black = {
|
||||||
|
enable = true;
|
||||||
|
withArgs = ''
|
||||||
|
{
|
||||||
|
extra_args = { "--fast" },
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# keymaps = [
|
||||||
|
# {
|
||||||
|
# mode = [ "n" "v" ];
|
||||||
|
# key = "<leader>cf";
|
||||||
|
# action = "<cmd>lua vim.lsp.buf.format()<cr>";
|
||||||
|
# options = {
|
||||||
|
# silent = true;
|
||||||
|
# desc = "Format";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
}
|
145
pkgs/nvim/config/sets.nix
Normal file
145
pkgs/nvim/config/sets.nix
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config = {
|
||||||
|
opts = {
|
||||||
|
# Enable relative line numbers
|
||||||
|
number = true;
|
||||||
|
relativenumber = true;
|
||||||
|
|
||||||
|
# Set tabs to 2 spaces
|
||||||
|
tabstop = 2;
|
||||||
|
softtabstop = 2;
|
||||||
|
showtabline = 2;
|
||||||
|
expandtab = true;
|
||||||
|
|
||||||
|
# Enable auto indenting and set it to spaces
|
||||||
|
smartindent = true;
|
||||||
|
shiftwidth = 2;
|
||||||
|
|
||||||
|
# Enable smart indenting (see https://stackoverflow.com/questions/1204149/smart-wrap-in-vim)
|
||||||
|
breakindent = true;
|
||||||
|
|
||||||
|
# Enable incremental searching
|
||||||
|
hlsearch = true;
|
||||||
|
incsearch = true;
|
||||||
|
|
||||||
|
# Enable text wrap
|
||||||
|
wrap = true;
|
||||||
|
|
||||||
|
# Better splitting
|
||||||
|
splitbelow = true;
|
||||||
|
splitright = true;
|
||||||
|
|
||||||
|
# Enable mouse mode
|
||||||
|
mouse = "a"; # Mouse
|
||||||
|
|
||||||
|
# Enable ignorecase + smartcase for better searching
|
||||||
|
ignorecase = true;
|
||||||
|
smartcase = true; # Don't ignore case with capitals
|
||||||
|
grepprg = "rg --vimgrep";
|
||||||
|
grepformat = "%f:%l:%c:%m";
|
||||||
|
|
||||||
|
# Decrease updatetime
|
||||||
|
updatetime = 50; # faster completion (4000ms default)
|
||||||
|
|
||||||
|
# Set completeopt to have a better completion experience
|
||||||
|
completeopt = ["menuone" "noselect" "noinsert"]; # mostly just for cmp
|
||||||
|
|
||||||
|
# Enable persistent undo history
|
||||||
|
swapfile = false;
|
||||||
|
backup = false;
|
||||||
|
undofile = true;
|
||||||
|
|
||||||
|
# Enable 24-bit colors
|
||||||
|
termguicolors = true;
|
||||||
|
|
||||||
|
# Enable the sign column to prevent the screen from jumping
|
||||||
|
signcolumn = "yes";
|
||||||
|
|
||||||
|
# Enable cursor line highlight
|
||||||
|
cursorline = true; # Highlight the line where the cursor is located
|
||||||
|
|
||||||
|
# Set fold settings
|
||||||
|
# These options were reccommended by nvim-ufo
|
||||||
|
# See: https://github.com/kevinhwang91/nvim-ufo#minimal-configuration
|
||||||
|
foldcolumn = "0";
|
||||||
|
foldlevel = 99;
|
||||||
|
foldlevelstart = 99;
|
||||||
|
foldenable = true;
|
||||||
|
|
||||||
|
# Always keep 8 lines above/below cursor unless at start/end of file
|
||||||
|
scrolloff = 8;
|
||||||
|
|
||||||
|
# Place a column line
|
||||||
|
colorcolumn = "80";
|
||||||
|
|
||||||
|
# Reduce which-key timeout to 10ms
|
||||||
|
timeoutlen = 10;
|
||||||
|
|
||||||
|
# Set encoding type
|
||||||
|
encoding = "utf-8";
|
||||||
|
fileencoding = "utf-8";
|
||||||
|
|
||||||
|
# Change cursor options
|
||||||
|
guicursor = [
|
||||||
|
"n-v-c:block" # Normal, visual, command-line: block cursor
|
||||||
|
"i-ci-ve:block" # Insert, command-line insert, visual-exclude: vertical bar cursor with block cursor, use "ver25" for 25% width
|
||||||
|
"r-cr:hor20" # Replace, command-line replace: horizontal bar cursor with 20% height
|
||||||
|
"o:hor50" # Operator-pending: horizontal bar cursor with 50% height
|
||||||
|
"a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor" # All modes: blinking settings
|
||||||
|
"sm:block-blinkwait175-blinkoff150-blinkon175" # Showmatch: block cursor with specific blinking settings
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enable chars list
|
||||||
|
list = true; # Show invisible characters (tabs, eol, ...)
|
||||||
|
listchars = "eol:↲,tab:|->,lead:·,space: ,trail:•,extends:→,precedes:←,nbsp:␣";
|
||||||
|
|
||||||
|
# More space in the neovim command line for displaying messages
|
||||||
|
cmdheight = 2;
|
||||||
|
|
||||||
|
# We don't need to see things like INSERT anymore
|
||||||
|
showmode = false;
|
||||||
|
|
||||||
|
# Maximum number of items to show in the popup menu (0 means "use available screen space")
|
||||||
|
pumheight = 0;
|
||||||
|
|
||||||
|
# Use conform-nvim for gq formatting. ('formatexpr' is set to vim.lsp.formatexpr(), so you can format lines via gq if the language server supports it)
|
||||||
|
formatexpr = "v:lua.require'conform'.formatexpr()";
|
||||||
|
|
||||||
|
laststatus = 3; # (https://neovim.io/doc/user/options.html#'laststatus')
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfigLua = ''
|
||||||
|
local opt = vim.opt
|
||||||
|
local g = vim.g
|
||||||
|
local o = vim.o
|
||||||
|
-- Neovide
|
||||||
|
if g.neovide then
|
||||||
|
-- Neovide options
|
||||||
|
g.neovide_fullscreen = false
|
||||||
|
g.neovide_hide_mouse_when_typing = false
|
||||||
|
g.neovide_refresh_rate = 165
|
||||||
|
g.neovide_cursor_vfx_mode = "ripple"
|
||||||
|
g.neovide_cursor_animate_command_line = true
|
||||||
|
g.neovide_cursor_animate_in_insert_mode = true
|
||||||
|
g.neovide_cursor_vfx_particle_lifetime = 5.0
|
||||||
|
g.neovide_cursor_vfx_particle_density = 14.0
|
||||||
|
g.neovide_cursor_vfx_particle_speed = 12.0
|
||||||
|
g.neovide_transparency = 0.8
|
||||||
|
|
||||||
|
-- Neovide Fonts
|
||||||
|
o.guifont = "MonoLisa Trial:Medium:h15"
|
||||||
|
-- o.guifont = "CommitMono:Medium:h15"
|
||||||
|
-- o.guifont = "JetBrainsMono Nerd Font:h14:Medium:i"
|
||||||
|
-- o.guifont = "FiraMono Nerd Font:Medium:h14"
|
||||||
|
-- o.guifont = "CaskaydiaCove Nerd Font:h14:b:i"
|
||||||
|
-- o.guifont = "BlexMono Nerd Font Mono:h14:Medium:i"
|
||||||
|
-- o.guifont = "Liga SFMono Nerd Font:b:h15"
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
19
pkgs/nvim/config/snippets/luasnip.nix
Normal file
19
pkgs/nvim/config/snippets/luasnip.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
plugins.luasnip = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = {
|
||||||
|
enable_autosnippets = true;
|
||||||
|
store_selection_keys = "<Tab>";
|
||||||
|
};
|
||||||
|
fromVscode = [
|
||||||
|
{
|
||||||
|
lazyLoad = true;
|
||||||
|
paths = "${pkgs.vimPlugins.friendly-snippets}";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
33
pkgs/nvim/config/statusline/lualine.nix
Normal file
33
pkgs/nvim/config/statusline/lualine.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
plugins.lualine = {
|
||||||
|
enable = false;
|
||||||
|
alwaysDivideMiddle = true;
|
||||||
|
globalstatus = true;
|
||||||
|
ignoreFocus = ["neo-tree"];
|
||||||
|
extensions = ["fzf"];
|
||||||
|
theme = "auto";
|
||||||
|
componentSeparators = {
|
||||||
|
left = "|";
|
||||||
|
right = "|";
|
||||||
|
};
|
||||||
|
sectionSeparators = {
|
||||||
|
left = "█"; #
|
||||||
|
right = "█"; #
|
||||||
|
};
|
||||||
|
sections = {
|
||||||
|
lualine_a = ["mode"];
|
||||||
|
lualine_b = [
|
||||||
|
{
|
||||||
|
name = "branch";
|
||||||
|
icon = "";
|
||||||
|
}
|
||||||
|
"diff"
|
||||||
|
"diagnostics"
|
||||||
|
];
|
||||||
|
lualine_c = ["filename"];
|
||||||
|
lualine_x = ["filetype"];
|
||||||
|
lualine_y = ["progress"];
|
||||||
|
lualine_z = [''" " .. os.date("%R")''];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
65
pkgs/nvim/config/statusline/staline.nix
Normal file
65
pkgs/nvim/config/statusline/staline.nix
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimUtils; [
|
||||||
|
(buildVimPlugin {
|
||||||
|
pname = "staline.nvim";
|
||||||
|
version = "2024-02-05";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "tamton-aquib";
|
||||||
|
repo = "staline.nvim";
|
||||||
|
rev = "a53f869278b8b186a5afd6f21680cd103c381599";
|
||||||
|
hash = "sha256-GDMKzxFDtQk5LL+rMsxTGTyLv69w5NUd+u19noeO5ws=";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
extraConfigLua = ''
|
||||||
|
require("staline").setup({
|
||||||
|
sections = {
|
||||||
|
left = { "-mode", " ", "branch" },
|
||||||
|
mid = { "lsp_name" },
|
||||||
|
right = { "file_name", "line_column" },
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
left = { "-mode", " ", "branch" },
|
||||||
|
mid = { "lsp_name" },
|
||||||
|
right = { "file_name", "line_column" },
|
||||||
|
},
|
||||||
|
defaults = {
|
||||||
|
left_separator = " ",
|
||||||
|
right_separator = " ",
|
||||||
|
branch_symbol = " ",
|
||||||
|
mod_symbol = "",
|
||||||
|
line_column = "[%l/%L]",
|
||||||
|
inactive_color = "#80a6f2", --#303030 is the default
|
||||||
|
inactive_bgcolor = "none",
|
||||||
|
},
|
||||||
|
special_table = {
|
||||||
|
lazy = { "Plugins", "💤 " },
|
||||||
|
TelescopePrompt = { "Telescope", " " },
|
||||||
|
oil = { "Oil", " " },
|
||||||
|
lazygit = { "LazyGit", " " },
|
||||||
|
},
|
||||||
|
mode_icons = {
|
||||||
|
["n"] = "NORMAL",
|
||||||
|
["no"] = "NORMAL",
|
||||||
|
["nov"] = "NORMAL",
|
||||||
|
["noV"] = "NORMAL",
|
||||||
|
["niI"] = "NORMAL",
|
||||||
|
["niR"] = "NORMAL",
|
||||||
|
["niV"] = "NORMAL",
|
||||||
|
["i"] = "INSERT",
|
||||||
|
["ic"] = "INSERT",
|
||||||
|
["ix"] = "INSERT",
|
||||||
|
["s"] = "INSERT",
|
||||||
|
["S"] = "INSERT",
|
||||||
|
["v"] = "VISUAL",
|
||||||
|
["V"] = "VISUAL",
|
||||||
|
[""] = "VISUAL",
|
||||||
|
["r"] = "REPLACE",
|
||||||
|
["r?"] = "REPLACE",
|
||||||
|
["R"] = "REPLACE",
|
||||||
|
["c"] = "COMMAND",
|
||||||
|
["t"] = "TERMINAL",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
}
|
178
pkgs/nvim/config/telescope/telescope.nix
Normal file
178
pkgs/nvim/config/telescope/telescope.nix
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
{
|
||||||
|
plugins.telescope = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extensions = {
|
||||||
|
fzf-native = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
ui-select = {
|
||||||
|
settings = {
|
||||||
|
specific_opts = {
|
||||||
|
codeactions = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
undo = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# If you'd prefer Telescope not to enter a normal-like mode when hitting escape (and instead exiting), you can map <Esc> to do so via:
|
||||||
|
settings = {
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
"<esc>" = {
|
||||||
|
__raw = ''
|
||||||
|
function(...)
|
||||||
|
return require("telescope.actions").close(...)
|
||||||
|
end'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = {
|
||||||
|
"<leader><space>" = {
|
||||||
|
action = "find_files, {}";
|
||||||
|
options.desc = "Find project files";
|
||||||
|
};
|
||||||
|
"<leader>/" = {
|
||||||
|
action = "live_grep";
|
||||||
|
options.desc = "Grep (root dir)";
|
||||||
|
};
|
||||||
|
"<leader>:" = {
|
||||||
|
action = "command_history, {}";
|
||||||
|
options.desc = "Command History";
|
||||||
|
};
|
||||||
|
"<leader>b" = {
|
||||||
|
action = "buffers, {}";
|
||||||
|
options.desc = "+buffer";
|
||||||
|
};
|
||||||
|
"<leader>ff" = {
|
||||||
|
action = "find_files, {}";
|
||||||
|
options.desc = "Find project files";
|
||||||
|
};
|
||||||
|
"<leader>fr" = {
|
||||||
|
action = "oldfiles, {}";
|
||||||
|
options.desc = "Recent";
|
||||||
|
};
|
||||||
|
"<leader>fb" = {
|
||||||
|
action = "buffers, {}";
|
||||||
|
options.desc = "Buffers";
|
||||||
|
};
|
||||||
|
"<C-p>" = {
|
||||||
|
action = "git_files, {}";
|
||||||
|
options.desc = "Search git files";
|
||||||
|
};
|
||||||
|
"<leader>gc" = {
|
||||||
|
action = "git_commits, {}";
|
||||||
|
options.desc = "Commits";
|
||||||
|
};
|
||||||
|
"<leader>gs" = {
|
||||||
|
action = "git_status, {}";
|
||||||
|
options.desc = "Status";
|
||||||
|
};
|
||||||
|
"<leader>sa" = {
|
||||||
|
action = "autocommands, {}";
|
||||||
|
options.desc = "Auto Commands";
|
||||||
|
};
|
||||||
|
"<leader>sb" = {
|
||||||
|
action = "current_buffer_fuzzy_find, {}";
|
||||||
|
options.desc = "Buffer";
|
||||||
|
};
|
||||||
|
"<leader>sc" = {
|
||||||
|
action = "command_history, {}";
|
||||||
|
options.desc = "Command History";
|
||||||
|
};
|
||||||
|
"<leader>sC" = {
|
||||||
|
action = "commands, {}";
|
||||||
|
options.desc = "Commands";
|
||||||
|
};
|
||||||
|
"<leader>sD" = {
|
||||||
|
action = "diagnostics, {}";
|
||||||
|
options.desc = "Workspace diagnostics";
|
||||||
|
};
|
||||||
|
"<leader>sh" = {
|
||||||
|
action = "help_tags, {}";
|
||||||
|
options.desc = "Help pages";
|
||||||
|
};
|
||||||
|
"<leader>sH" = {
|
||||||
|
action = "highlights, {}";
|
||||||
|
options.desc = "Search Highlight Groups";
|
||||||
|
};
|
||||||
|
"<leader>sk" = {
|
||||||
|
action = "keymaps, {}";
|
||||||
|
options.desc = "Keymaps";
|
||||||
|
};
|
||||||
|
"<leader>sM" = {
|
||||||
|
action = "man_pages, {}";
|
||||||
|
options.desc = "Man pages";
|
||||||
|
};
|
||||||
|
"<leader>sm" = {
|
||||||
|
action = "marks, {}";
|
||||||
|
options.desc = "Jump to Mark";
|
||||||
|
};
|
||||||
|
"<leader>so" = {
|
||||||
|
action = "vim_options, {}";
|
||||||
|
options.desc = "Options";
|
||||||
|
};
|
||||||
|
"<leader>sR" = {
|
||||||
|
action = "resume, {}";
|
||||||
|
options.desc = "Resume";
|
||||||
|
};
|
||||||
|
"<leader>uC" = {
|
||||||
|
action = "colorscheme, {}";
|
||||||
|
options.desc = "Colorscheme preview";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>fp";
|
||||||
|
action = "<cmd>Telescope projects<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Projects";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>sd";
|
||||||
|
action = "<cmd>Telescope diagnostics bufnr=0<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Document diagnostics";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>st";
|
||||||
|
action = "<cmd>TodoTelescope<cr>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Todo (Telescope)";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# {
|
||||||
|
# mode = "n";
|
||||||
|
# key = "<leader>,";
|
||||||
|
# action = "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>";
|
||||||
|
# options = {
|
||||||
|
# desc = "Switch Buffer";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
];
|
||||||
|
extraConfigLua = ''
|
||||||
|
local telescope = require('telescope')
|
||||||
|
telescope.setup{
|
||||||
|
pickers = {
|
||||||
|
colorscheme = {
|
||||||
|
enable_preview = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
191
pkgs/nvim/config/ui/alpha.nix
Normal file
191
pkgs/nvim/config/ui/alpha.nix
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
{
|
||||||
|
plugins.alpha = {
|
||||||
|
enable = true;
|
||||||
|
theme = null;
|
||||||
|
iconsEnabled = true;
|
||||||
|
layout = let
|
||||||
|
padding = val: {
|
||||||
|
type = "padding";
|
||||||
|
inherit val;
|
||||||
|
};
|
||||||
|
in [
|
||||||
|
(padding 4)
|
||||||
|
{
|
||||||
|
opts = {
|
||||||
|
hl = "AlphaHeader";
|
||||||
|
position = "center";
|
||||||
|
};
|
||||||
|
type = "text";
|
||||||
|
val = [
|
||||||
|
" ██▀███ ▓█████ ▓█████▄▓██ ██▓ █████▒ "
|
||||||
|
" ▓██ ▒ ██▒▓█ ▀ ▒██▀ ██▌▒██ ██▒▓██ ▒ "
|
||||||
|
" ▓██ ░▄█ ▒▒███ ░██ █▌ ▒██ ██░▒████ ░ "
|
||||||
|
" ▒██▀▀█▄ ▒▓█ ▄ ░▓█▄ ▌ ░ ▐██▓░░▓█▒ ░ "
|
||||||
|
" ░██▓ ▒██▒░▒████▒░▒████▓ ░ ██▒▓░░▒█░ "
|
||||||
|
" ░ ▒▓ ░▒▓░░░ ▒░ ░ ▒▒▓ ▒ ██▒▒▒ ▒ ░ "
|
||||||
|
" ░▒ ░ ▒░ ░ ░ ░ ░ ▒ ▒ ▓██ ░▒░ ░ "
|
||||||
|
" ░░ ░ ░ ░ ░ ░ ▒ ▒ ░░ ░ ░ "
|
||||||
|
" ░ ░ ░ ░ ░ ░ "
|
||||||
|
" "
|
||||||
|
" git@github.com:redyf "
|
||||||
|
];
|
||||||
|
}
|
||||||
|
(padding 2)
|
||||||
|
{
|
||||||
|
type = "button";
|
||||||
|
val = " Find File";
|
||||||
|
on_press.raw = "require('telescope.builtin').find_files";
|
||||||
|
opts = {
|
||||||
|
# hl = "comment";
|
||||||
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"f"
|
||||||
|
":Telescope find_files <CR>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "f";
|
||||||
|
|
||||||
|
position = "center";
|
||||||
|
cursor = 3;
|
||||||
|
width = 38;
|
||||||
|
align_shortcut = "right";
|
||||||
|
hl_shortcut = "Keyword";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
(padding 1)
|
||||||
|
{
|
||||||
|
type = "button";
|
||||||
|
val = " New File";
|
||||||
|
on_press.__raw = "function() vim.cmd[[ene]] end";
|
||||||
|
opts = {
|
||||||
|
# hl = "comment";
|
||||||
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"n"
|
||||||
|
":ene <BAR> startinsert <CR>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "n";
|
||||||
|
|
||||||
|
position = "center";
|
||||||
|
cursor = 3;
|
||||||
|
width = 38;
|
||||||
|
align_shortcut = "right";
|
||||||
|
hl_shortcut = "Keyword";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
(padding 1)
|
||||||
|
{
|
||||||
|
type = "button";
|
||||||
|
val = " Recent Files";
|
||||||
|
on_press.raw = "require('telescope.builtin').oldfiles";
|
||||||
|
opts = {
|
||||||
|
# hl = "comment";
|
||||||
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"r"
|
||||||
|
":Telescope oldfiles <CR>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "r";
|
||||||
|
|
||||||
|
position = "center";
|
||||||
|
cursor = 3;
|
||||||
|
width = 38;
|
||||||
|
align_shortcut = "right";
|
||||||
|
hl_shortcut = "Keyword";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
(padding 1)
|
||||||
|
{
|
||||||
|
type = "button";
|
||||||
|
val = " Find Word";
|
||||||
|
on_press.raw = "require('telescope.builtin').live_grep";
|
||||||
|
opts = {
|
||||||
|
# hl = "comment";
|
||||||
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"g"
|
||||||
|
":Telescope live_grep <CR>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "g";
|
||||||
|
|
||||||
|
position = "center";
|
||||||
|
cursor = 3;
|
||||||
|
width = 38;
|
||||||
|
align_shortcut = "right";
|
||||||
|
hl_shortcut = "Keyword";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
(padding 1)
|
||||||
|
{
|
||||||
|
type = "button";
|
||||||
|
val = " Restore Session";
|
||||||
|
on_press.raw = "require('persistence').load()";
|
||||||
|
opts = {
|
||||||
|
# hl = "comment";
|
||||||
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"s"
|
||||||
|
":lua require('persistence').load()<cr>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "s";
|
||||||
|
|
||||||
|
position = "center";
|
||||||
|
cursor = 3;
|
||||||
|
width = 38;
|
||||||
|
align_shortcut = "right";
|
||||||
|
hl_shortcut = "Keyword";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
(padding 1)
|
||||||
|
{
|
||||||
|
type = "button";
|
||||||
|
val = " Quit Neovim";
|
||||||
|
on_press.__raw = "function() vim.cmd[[qa]] end";
|
||||||
|
opts = {
|
||||||
|
# hl = "comment";
|
||||||
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"q"
|
||||||
|
":qa<CR>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "q";
|
||||||
|
|
||||||
|
position = "center";
|
||||||
|
cursor = 3;
|
||||||
|
width = 38;
|
||||||
|
align_shortcut = "right";
|
||||||
|
hl_shortcut = "Keyword";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
171
pkgs/nvim/config/ui/dressing-nvim.nix
Normal file
171
pkgs/nvim/config/ui/dressing-nvim.nix
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
dressing-nvim
|
||||||
|
];
|
||||||
|
extraConfigLua = ''
|
||||||
|
require("dressing").setup({
|
||||||
|
input = {
|
||||||
|
-- Set to false to disable the vim.ui.input implementation
|
||||||
|
enabled = true,
|
||||||
|
|
||||||
|
-- Default prompt string
|
||||||
|
default_prompt = "Input",
|
||||||
|
|
||||||
|
-- Trim trailing `:` from prompt
|
||||||
|
trim_prompt = true,
|
||||||
|
|
||||||
|
-- Can be 'left', 'right', or 'center'
|
||||||
|
title_pos = "left",
|
||||||
|
|
||||||
|
-- When true, <Esc> will close the modal
|
||||||
|
insert_only = true,
|
||||||
|
|
||||||
|
-- When true, input will start in insert mode.
|
||||||
|
start_in_insert = true,
|
||||||
|
|
||||||
|
-- These are passed to nvim_open_win
|
||||||
|
border = "rounded",
|
||||||
|
-- 'editor' and 'win' will default to being centered
|
||||||
|
relative = "cursor",
|
||||||
|
|
||||||
|
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||||
|
prefer_width = 40,
|
||||||
|
width = nil,
|
||||||
|
-- min_width and max_width can be a list of mixed types.
|
||||||
|
-- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total"
|
||||||
|
max_width = { 140, 0.9 },
|
||||||
|
min_width = { 20, 0.2 },
|
||||||
|
|
||||||
|
buf_options = {},
|
||||||
|
win_options = {
|
||||||
|
-- Disable line wrapping
|
||||||
|
wrap = false,
|
||||||
|
-- Indicator for when text exceeds window
|
||||||
|
list = true,
|
||||||
|
listchars = "precedes:…,extends:…",
|
||||||
|
-- Increase this for more context when text scrolls off the window
|
||||||
|
sidescrolloff = 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Set to `false` to disable
|
||||||
|
mappings = {
|
||||||
|
n = {
|
||||||
|
["<Esc>"] = "Close",
|
||||||
|
["<CR>"] = "Confirm",
|
||||||
|
},
|
||||||
|
i = {
|
||||||
|
["<C-c>"] = "Close",
|
||||||
|
["<CR>"] = "Confirm",
|
||||||
|
["<Up>"] = "HistoryPrev",
|
||||||
|
["<Down>"] = "HistoryNext",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
override = function(conf)
|
||||||
|
-- This is the config that will be passed to nvim_open_win.
|
||||||
|
-- Change values here to customize the layout
|
||||||
|
return conf
|
||||||
|
end,
|
||||||
|
|
||||||
|
-- see :help dressing_get_config
|
||||||
|
get_config = nil,
|
||||||
|
},
|
||||||
|
select = {
|
||||||
|
-- Set to false to disable the vim.ui.select implementation
|
||||||
|
enabled = true,
|
||||||
|
|
||||||
|
-- Priority list of preferred vim.select implementations
|
||||||
|
backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" },
|
||||||
|
|
||||||
|
-- Trim trailing `:` from prompt
|
||||||
|
trim_prompt = true,
|
||||||
|
|
||||||
|
-- Options for telescope selector
|
||||||
|
-- These are passed into the telescope picker directly. Can be used like:
|
||||||
|
-- telescope = require('telescope.themes').get_ivy({...})
|
||||||
|
telescope = nil,
|
||||||
|
|
||||||
|
-- Options for fzf selector
|
||||||
|
fzf = {
|
||||||
|
window = {
|
||||||
|
width = 0.5,
|
||||||
|
height = 0.4,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Options for fzf-lua
|
||||||
|
fzf_lua = {
|
||||||
|
-- winopts = {
|
||||||
|
-- height = 0.5,
|
||||||
|
-- width = 0.5,
|
||||||
|
-- },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Options for nui Menu
|
||||||
|
nui = {
|
||||||
|
position = "50%",
|
||||||
|
size = nil,
|
||||||
|
relative = "editor",
|
||||||
|
border = {
|
||||||
|
style = "rounded",
|
||||||
|
},
|
||||||
|
buf_options = {
|
||||||
|
swapfile = false,
|
||||||
|
filetype = "DressingSelect",
|
||||||
|
},
|
||||||
|
win_options = {
|
||||||
|
winblend = 0,
|
||||||
|
},
|
||||||
|
max_width = 80,
|
||||||
|
max_height = 40,
|
||||||
|
min_width = 40,
|
||||||
|
min_height = 10,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Options for built-in selector
|
||||||
|
builtin = {
|
||||||
|
-- Display numbers for options and set up keymaps
|
||||||
|
show_numbers = true,
|
||||||
|
-- These are passed to nvim_open_win
|
||||||
|
border = "rounded",
|
||||||
|
-- 'editor' and 'win' will default to being centered
|
||||||
|
relative = "editor",
|
||||||
|
|
||||||
|
buf_options = {},
|
||||||
|
win_options = {
|
||||||
|
cursorline = true,
|
||||||
|
cursorlineopt = "both",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||||
|
-- the min_ and max_ options can be a list of mixed types.
|
||||||
|
-- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total"
|
||||||
|
width = nil,
|
||||||
|
max_width = { 140, 0.8 },
|
||||||
|
min_width = { 40, 0.2 },
|
||||||
|
height = nil,
|
||||||
|
max_height = 0.9,
|
||||||
|
min_height = { 10, 0.2 },
|
||||||
|
|
||||||
|
-- Set to `false` to disable
|
||||||
|
mappings = {
|
||||||
|
["<Esc>"] = "Close",
|
||||||
|
["<C-c>"] = "Close",
|
||||||
|
["<CR>"] = "Confirm",
|
||||||
|
},
|
||||||
|
|
||||||
|
override = function(conf)
|
||||||
|
-- This is the config that will be passed to nvim_open_win.
|
||||||
|
-- Change values here to customize the layout
|
||||||
|
return conf
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Used to override format_item. See :help dressing-format
|
||||||
|
format_item_override = {},
|
||||||
|
|
||||||
|
-- see :help dressing_get_config
|
||||||
|
get_config = nil,
|
||||||
|
},
|
||||||
|
}) '';
|
||||||
|
}
|
32
pkgs/nvim/config/ui/indent-blankline.nix
Normal file
32
pkgs/nvim/config/ui/indent-blankline.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
plugins = {
|
||||||
|
indent-blankline = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
indent = {
|
||||||
|
char = "│"; # "│" or "▎"
|
||||||
|
};
|
||||||
|
scope = {
|
||||||
|
enabled = true;
|
||||||
|
show_start = true;
|
||||||
|
};
|
||||||
|
exclude = {
|
||||||
|
buftypes = ["terminal" "nofile"];
|
||||||
|
filetypes = [
|
||||||
|
"help"
|
||||||
|
"alpha"
|
||||||
|
"dashboard"
|
||||||
|
"neo-tree"
|
||||||
|
"Trouble"
|
||||||
|
"trouble"
|
||||||
|
"lazy"
|
||||||
|
"mason"
|
||||||
|
"notify"
|
||||||
|
"toggleterm"
|
||||||
|
"lazyterm"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
36
pkgs/nvim/config/ui/noice.nix
Normal file
36
pkgs/nvim/config/ui/noice.nix
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
plugins.noice = {
|
||||||
|
enable = true;
|
||||||
|
notify = {
|
||||||
|
enabled = false;
|
||||||
|
};
|
||||||
|
messages = {
|
||||||
|
enabled = true; # Adds a padding-bottom to neovim statusline when set to false for some reason
|
||||||
|
};
|
||||||
|
lsp = {
|
||||||
|
message = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
progress = {
|
||||||
|
enabled = false;
|
||||||
|
view = "mini";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
popupmenu = {
|
||||||
|
enabled = true;
|
||||||
|
backend = "nui";
|
||||||
|
};
|
||||||
|
format = {
|
||||||
|
filter = {
|
||||||
|
pattern = [":%s*%%s*s:%s*" ":%s*%%s*s!%s*" ":%s*%%s*s/%s*" "%s*s:%s*" ":%s*s!%s*" ":%s*s/%s*"];
|
||||||
|
icon = "";
|
||||||
|
lang = "regex";
|
||||||
|
};
|
||||||
|
replace = {
|
||||||
|
pattern = [":%s*%%s*s:%w*:%s*" ":%s*%%s*s!%w*!%s*" ":%s*%%s*s/%w*/%s*" "%s*s:%w*:%s*" ":%s*s!%w*!%s*" ":%s*s/%w*/%s*"];
|
||||||
|
icon = "";
|
||||||
|
lang = "regex";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
3
pkgs/nvim/config/ui/nui.nix
Normal file
3
pkgs/nvim/config/ui/nui.nix
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [nui-nvim];
|
||||||
|
}
|
44
pkgs/nvim/config/ui/nvim-notify.nix
Normal file
44
pkgs/nvim/config/ui/nvim-notify.nix
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
plugins.notify = {
|
||||||
|
enable = true;
|
||||||
|
backgroundColour = "#000000";
|
||||||
|
fps = 60;
|
||||||
|
render = "default";
|
||||||
|
timeout = 500;
|
||||||
|
topDown = true;
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>un";
|
||||||
|
action = ''
|
||||||
|
<cmd>lua require("notify").dismiss({ silent = true, pending = true })<cr>
|
||||||
|
'';
|
||||||
|
options = {
|
||||||
|
desc = "Dismiss All Notifications";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
extraConfigLua = ''
|
||||||
|
local notify = require("notify")
|
||||||
|
local filtered_message = { "No information available" }
|
||||||
|
|
||||||
|
-- Override notify function to filter out messages
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
|
vim.notify = function(message, level, opts)
|
||||||
|
local merged_opts = vim.tbl_extend("force", {
|
||||||
|
on_open = function(win)
|
||||||
|
local buf = vim.api.nvim_win_get_buf(win)
|
||||||
|
vim.api.nvim_buf_set_option(buf, "filetype", "markdown")
|
||||||
|
end,
|
||||||
|
}, opts or {})
|
||||||
|
|
||||||
|
for _, msg in ipairs(filtered_message) do
|
||||||
|
if message == msg then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return notify(message, level, merged_opts)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
7
pkgs/nvim/config/utils/better-escape.nix
Normal file
7
pkgs/nvim/config/utils/better-escape.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
plugins.better-escape = {
|
||||||
|
enable = true;
|
||||||
|
clearEmptyLines = true;
|
||||||
|
timeout = 200;
|
||||||
|
};
|
||||||
|
}
|
56
pkgs/nvim/config/utils/flash.nix
Normal file
56
pkgs/nvim/config/utils/flash.nix
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
plugins.flash = {
|
||||||
|
enable = false;
|
||||||
|
labels = "asdfghjklqwertyuiopzxcvbnm";
|
||||||
|
search = {
|
||||||
|
mode = "fuzzy";
|
||||||
|
};
|
||||||
|
jump = {
|
||||||
|
autojump = true;
|
||||||
|
};
|
||||||
|
label = {
|
||||||
|
uppercase = false;
|
||||||
|
rainbow = {
|
||||||
|
enabled = false;
|
||||||
|
shade = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# keymaps = [
|
||||||
|
# {
|
||||||
|
# mode = [ "n" "x" "o" ];
|
||||||
|
# key = "s";
|
||||||
|
# action = "<cmd>lua require('flash').jump()<cr>";
|
||||||
|
# options = {
|
||||||
|
# desc = "Flash";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# {
|
||||||
|
# mode = [ "n" "x" "o" ];
|
||||||
|
# key = "S";
|
||||||
|
# action = "<cmd>lua require('flash').treesitter()<cr>";
|
||||||
|
# options = {
|
||||||
|
# desc = "Flash Treesitter";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# {
|
||||||
|
# mode = "o";
|
||||||
|
# key = "r";
|
||||||
|
# action = "<cmd>lua require('flash').remote()<cr>";
|
||||||
|
# options = {
|
||||||
|
# desc = "Remote Flash";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# {
|
||||||
|
# mode = [ "x" "o" ];
|
||||||
|
# key = "R";
|
||||||
|
# action = "<cmd>lua require('flash').treesitter_search()<cr>";
|
||||||
|
# options = {
|
||||||
|
# desc = "Treesitter Search";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
}
|
26
pkgs/nvim/config/utils/hardtime.nix
Normal file
26
pkgs/nvim/config/utils/hardtime.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
plugins.hardtime = {
|
||||||
|
enable = true;
|
||||||
|
enabled = false;
|
||||||
|
disableMouse = true;
|
||||||
|
disabledFiletypes = ["neo-tree" "qf" "netrw" "NvimTree"];
|
||||||
|
hint = true;
|
||||||
|
maxCount = 4;
|
||||||
|
maxTime = 1000;
|
||||||
|
restrictionMode = "hint";
|
||||||
|
restrictedKeys = {
|
||||||
|
"h" = ["n" "x"];
|
||||||
|
"j" = ["n" "x"];
|
||||||
|
"k" = ["n" "x"];
|
||||||
|
"l" = ["n" "x"];
|
||||||
|
"-" = ["n" "x"];
|
||||||
|
"+" = ["n" "x"];
|
||||||
|
"gj" = ["n" "x"];
|
||||||
|
"gk" = ["n" "x"];
|
||||||
|
"<CR>" = ["n" "x"];
|
||||||
|
"<C-M>" = ["n" "x"];
|
||||||
|
"<C-N>" = ["n" "x"];
|
||||||
|
"<C-P>" = ["n" "x"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
17
pkgs/nvim/config/utils/harpoon.nix
Normal file
17
pkgs/nvim/config/utils/harpoon.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
plugins.harpoon = {
|
||||||
|
enable = true;
|
||||||
|
enableTelescope = true;
|
||||||
|
keymapsSilent = true;
|
||||||
|
keymaps = {
|
||||||
|
addFile = "<leader>ha";
|
||||||
|
toggleQuickMenu = "<C-e>";
|
||||||
|
navFile = {
|
||||||
|
"1" = "<leader>hj";
|
||||||
|
"2" = "<leader>hk";
|
||||||
|
"3" = "<leader>hl";
|
||||||
|
"4" = "<leader>hm";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
17
pkgs/nvim/config/utils/illuminate.nix
Normal file
17
pkgs/nvim/config/utils/illuminate.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
plugins.illuminate = {
|
||||||
|
enable = false;
|
||||||
|
underCursor = false;
|
||||||
|
filetypesDenylist = [
|
||||||
|
"DressingSelect"
|
||||||
|
"Outline"
|
||||||
|
"TelescopePrompt"
|
||||||
|
"alpha"
|
||||||
|
"harpoon"
|
||||||
|
"toggleterm"
|
||||||
|
"neo-tree"
|
||||||
|
"Spectre"
|
||||||
|
"reason"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
19
pkgs/nvim/config/utils/markdown-preview.nix
Normal file
19
pkgs/nvim/config/utils/markdown-preview.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
plugins.markdown-preview = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
browser = "floorp";
|
||||||
|
theme = "dark";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>cp";
|
||||||
|
action = "<cmd>MarkdownPreview<cr>";
|
||||||
|
options = {
|
||||||
|
desc = "Markdown Preview";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
15
pkgs/nvim/config/utils/mini.nix
Normal file
15
pkgs/nvim/config/utils/mini.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
plugins.mini = {
|
||||||
|
enable = true;
|
||||||
|
modules = {
|
||||||
|
comment = {
|
||||||
|
options = {
|
||||||
|
customCommentString = ''
|
||||||
|
<cmd>lua require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring<cr>
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
cursorword = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
27
pkgs/nvim/config/utils/neocord.nix
Normal file
27
pkgs/nvim/config/utils/neocord.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
plugins.neocord = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
auto_update = true;
|
||||||
|
blacklist = [];
|
||||||
|
client_id = "1157438221865717891";
|
||||||
|
debounce_timeout = 10;
|
||||||
|
editing_text = "Editing...";
|
||||||
|
enable_line_number = true;
|
||||||
|
logo = "https://repository-images.githubusercontent.com/325421844/ecb73f47-cb89-4ee0-a0fd-9743c2f3569a";
|
||||||
|
logo_tooltip = "NixVim";
|
||||||
|
file_assets = null;
|
||||||
|
file_explorer_text = "Browsing...";
|
||||||
|
git_commit_text = "Committing changes...";
|
||||||
|
global_timer = true;
|
||||||
|
line_number_text = "Line %s out of %s";
|
||||||
|
log_level = null;
|
||||||
|
main_image = "logo";
|
||||||
|
plugin_manager_text = "Managing plugins...";
|
||||||
|
reading_text = "Reading...";
|
||||||
|
show_time = true;
|
||||||
|
terminal_text = "Using Terminal...";
|
||||||
|
workspace_text = "Working on %s";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
11
pkgs/nvim/config/utils/neodev.nix
Normal file
11
pkgs/nvim/config/utils/neodev.nix
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
neodev-nvim
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfigLua = ''
|
||||||
|
require("neodev").setup({
|
||||||
|
library = { plugins = {"neotest"}, types = true},
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
}
|
133
pkgs/nvim/config/utils/neotest.nix
Normal file
133
pkgs/nvim/config/utils/neotest.nix
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
(pkgs.vimUtils.buildVimPlugin {
|
||||||
|
pname = "neotest-java";
|
||||||
|
version = "v0.9.0";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "rcasia";
|
||||||
|
repo = "neotest-java";
|
||||||
|
rev = "2234bfa8044dc39a8baf90470747c65e4623a222";
|
||||||
|
sha256 = "0w5fvqic3qapi9ggfb81nqa9fl6jv831s91r0wgn4d7c35h0340r";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(pkgs.vimUtils.buildVimPlugin {
|
||||||
|
pname = "neotest-vim-test";
|
||||||
|
version = "2023-04-17";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "nvim-neotest";
|
||||||
|
repo = "neotest-vim-test";
|
||||||
|
rev = "75c4228882ae4883b11bfce9b8383e637eb44192";
|
||||||
|
sha256 = "12ix1lzmqlk3iyngaafby9c02fcl9d5iva965miwxfljvmibjnbw";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
neotest
|
||||||
|
FixCursorHold-nvim
|
||||||
|
neotest-plenary
|
||||||
|
vim-test
|
||||||
|
neotest-python
|
||||||
|
neotest-vitest
|
||||||
|
];
|
||||||
|
extraConfigLua = ''
|
||||||
|
require("neotest").setup({
|
||||||
|
adapters = {
|
||||||
|
require("neotest-java")({
|
||||||
|
ignore_wrapper = false,
|
||||||
|
-- function to determine which runner to use based on project path
|
||||||
|
determine_runner = function(project_root_path)
|
||||||
|
-- return should be "maven" or "gradle"
|
||||||
|
return "maven"
|
||||||
|
end,
|
||||||
|
-- override the builtin runner discovery behaviour to always use given
|
||||||
|
-- tool. Default is "nil", so no override
|
||||||
|
force_runner = nil,
|
||||||
|
-- if the automatic runner discovery can't uniquely determine whether
|
||||||
|
-- to use Gradle or Maven, fallback to using this runner. Default is
|
||||||
|
-- "maven"
|
||||||
|
fallback_runner = "gradle"
|
||||||
|
}),
|
||||||
|
require("neotest-python")({
|
||||||
|
dap = { justMyCode = false },
|
||||||
|
}),
|
||||||
|
require "neotest-vim-test" {
|
||||||
|
ignore_file_types = { "python", "java", "vim", "lua", "javascript", "typescript" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
output = { enabled = true, open_on_run = true },
|
||||||
|
summary = { enabled = true, },
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>tt";
|
||||||
|
action = "<cmd>lua require('neotest').run.run(vim.fn.expand '%')<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Run File";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>tT";
|
||||||
|
action = "<cmd>lua require('neotest').run.run(vim.loop.cwd())<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Run All Test Files";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>tr";
|
||||||
|
action = "<cmd>lua require('neotest').run.run()<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Run Nearest";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>td";
|
||||||
|
action = "<cmd>lua require('neotest').run.run({strategy = 'dap'})<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Run Nearest with debugger";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ts";
|
||||||
|
action = "<cmd>lua require('neotest').summary.toggle()<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle Summary";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>to";
|
||||||
|
action = "<cmd>lua require('neotest').output.open{ enter = true, auto_close = true }<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Show Output";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>tO";
|
||||||
|
action = "<cmd>lua require('neotest').output_panel.toggle()<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle Output Panel";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>tS";
|
||||||
|
action = "<cmd>lua require('neotest').run.stop()<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Stop";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
5
pkgs/nvim/config/utils/nvim-autopairs.nix
Normal file
5
pkgs/nvim/config/utils/nvim-autopairs.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
plugins.nvim-autopairs = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
}
|
5
pkgs/nvim/config/utils/nvim-colorizer.nix
Normal file
5
pkgs/nvim/config/utils/nvim-colorizer.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
plugins.nvim-colorizer = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
9
pkgs/nvim/config/utils/nvim-surround.nix
Normal file
9
pkgs/nvim/config/utils/nvim-surround.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
nvim-surround
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfigLua = ''
|
||||||
|
require("nvim-surround").setup()
|
||||||
|
'';
|
||||||
|
}
|
54
pkgs/nvim/config/utils/oil.nix
Normal file
54
pkgs/nvim/config/utils/oil.nix
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
plugins.oil = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
useDefaultKeymaps = true;
|
||||||
|
deleteToTrash = true;
|
||||||
|
viewOptions = {
|
||||||
|
showHidden = true;
|
||||||
|
};
|
||||||
|
preview = {
|
||||||
|
border = "rounded";
|
||||||
|
};
|
||||||
|
|
||||||
|
float = {
|
||||||
|
padding = 2;
|
||||||
|
maxWidth = 0; # ''math.ceil(vim.o.lines * 0.8 - 4)'';
|
||||||
|
maxHeight = 0; # ''math.ceil(vim.o.columns * 0.8)'';
|
||||||
|
border = "rounded"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
|
||||||
|
winOptions = {
|
||||||
|
winblend = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = {
|
||||||
|
"g?" = "actions.show_help";
|
||||||
|
"<CR>" = "actions.select";
|
||||||
|
"<C-\\>" = "actions.select_vsplit";
|
||||||
|
"<C-enter>" = "actions.select_split"; # this is used to navigate left
|
||||||
|
"<C-t>" = "actions.select_tab";
|
||||||
|
"<C-p>" = "actions.preview";
|
||||||
|
"<C-c>" = "actions.close";
|
||||||
|
"<C-r>" = "actions.refresh";
|
||||||
|
"-" = "actions.parent";
|
||||||
|
"_" = "actions.open_cwd";
|
||||||
|
"`" = "actions.cd";
|
||||||
|
"~" = "actions.tcd";
|
||||||
|
"gs" = "actions.change_sort";
|
||||||
|
"gx" = "actions.open_external";
|
||||||
|
"g." = "actions.toggle_hidden";
|
||||||
|
"q" = "actions.close";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>o";
|
||||||
|
action = ":Oil --float<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Open parent directory";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
5
pkgs/nvim/config/utils/persistence.nix
Normal file
5
pkgs/nvim/config/utils/persistence.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
plugins.persistence = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
5
pkgs/nvim/config/utils/plenary.nix
Normal file
5
pkgs/nvim/config/utils/plenary.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
plenary-nvim
|
||||||
|
];
|
||||||
|
}
|
6
pkgs/nvim/config/utils/project-nvim.nix
Normal file
6
pkgs/nvim/config/utils/project-nvim.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
plugins.project-nvim = {
|
||||||
|
enable = true;
|
||||||
|
enableTelescope = true;
|
||||||
|
};
|
||||||
|
}
|
55
pkgs/nvim/config/utils/sidebar.nix
Normal file
55
pkgs/nvim/config/utils/sidebar.nix
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimUtils; [
|
||||||
|
(buildVimPlugin {
|
||||||
|
pname = "sidebar.nvim";
|
||||||
|
version = "2024-02-07";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "sidebar-nvim";
|
||||||
|
repo = "sidebar.nvim";
|
||||||
|
rev = "5695712eef6288fff667343c4ae77c54911bdb1b";
|
||||||
|
sha256 = "1p12189367x0x26cys9wxipzwr3i0bmz4lb0s79ki0a49d6zja2c";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
extraConfigLua = ''
|
||||||
|
local sidebar = require("sidebar-nvim")
|
||||||
|
sidebar.setup({
|
||||||
|
disable_default_keybindings = 0,
|
||||||
|
bindings = nil,
|
||||||
|
open = false,
|
||||||
|
side = "left",
|
||||||
|
initial_width = 32,
|
||||||
|
hide_statusline = false,
|
||||||
|
update_interval = 1000,
|
||||||
|
sections = { "git", "containers" },
|
||||||
|
section_separator = {"", "-----", ""},
|
||||||
|
section_title_separator = {""},
|
||||||
|
containers = {
|
||||||
|
attach_shell = "/bin/sh", show_all = true, interval = 5000,
|
||||||
|
},
|
||||||
|
datetime = { format = "%a %b %d, %H:%M", clocks = { { name = "local" } } },
|
||||||
|
todos = { ignored_paths = {} },
|
||||||
|
["git"] = {
|
||||||
|
icon = "", --
|
||||||
|
},
|
||||||
|
})
|
||||||
|
cmd = {
|
||||||
|
"SidebarNvimToggle",
|
||||||
|
"SidebarNvimOpen",
|
||||||
|
"SidebarNvimFocus",
|
||||||
|
"SidebarNvimUpdate",
|
||||||
|
},
|
||||||
|
'';
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>e";
|
||||||
|
action = ":SidebarNvimToggle<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle Explorer";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
5
pkgs/nvim/config/utils/tmux-navigator.nix
Normal file
5
pkgs/nvim/config/utils/tmux-navigator.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
plugins.tmux-navigator = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
5
pkgs/nvim/config/utils/todo-comments.nix
Normal file
5
pkgs/nvim/config/utils/todo-comments.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
plugins.todo-comments = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
57
pkgs/nvim/config/utils/toggleterm.nix
Normal file
57
pkgs/nvim/config/utils/toggleterm.nix
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
plugins.toggleterm = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
size = ''
|
||||||
|
function(term)
|
||||||
|
if term.direction == "horizontal" then
|
||||||
|
return 15
|
||||||
|
elseif term.direction == "vertical" then
|
||||||
|
return vim.o.columns * 0.4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
open_mapping = "[[<A-i>]]";
|
||||||
|
hide_numbers = true;
|
||||||
|
shade_terminals = true;
|
||||||
|
start_in_insert = true;
|
||||||
|
terminal_mappings = true;
|
||||||
|
persist_mode = true;
|
||||||
|
insert_mappings = true;
|
||||||
|
close_on_exit = true;
|
||||||
|
shell = "zsh";
|
||||||
|
direction = "horizontal"; # 'vertical' | 'horizontal' | 'window' | 'float'
|
||||||
|
auto_scroll = true;
|
||||||
|
float_opts = {
|
||||||
|
border = "single"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
|
||||||
|
width = 80;
|
||||||
|
height = 20;
|
||||||
|
winblend = 0;
|
||||||
|
};
|
||||||
|
winbar = {
|
||||||
|
enabled = true;
|
||||||
|
name_formatter = ''
|
||||||
|
function(term)
|
||||||
|
return term.name
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# extraConfigLua = ''
|
||||||
|
# function _G.set_terminal_keymaps()
|
||||||
|
# local opts = { buffer = 0 }
|
||||||
|
# vim.keymap.set("t", "<esc>", [[<C-\><C-n>]], opts)
|
||||||
|
# vim.keymap.set("t", "jk", [[<C-\><C-n>]], opts)
|
||||||
|
# vim.keymap.set("t", "<C-h>", [[<Cmd>wincmd h<CR>]], opts)
|
||||||
|
# vim.keymap.set("t", "<C-j>", [[<Cmd>wincmd j<CR>]], opts)
|
||||||
|
# vim.keymap.set("t", "<C-k>", [[<Cmd>wincmd k<CR>]], opts)
|
||||||
|
# vim.keymap.set("t", "<C-l>", [[<Cmd>wincmd l<CR>]], opts)
|
||||||
|
# vim.keymap.set("t", "<C-w>", [[<C-\><C-n><C-w>]], opts)
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# -- if you only want these mappings for toggle term use term://*toggleterm#* instead
|
||||||
|
# -- vim.cmd("autocmd! TermOpen term://*toggleterm#* lua set_terminal_keymaps()")
|
||||||
|
# '';
|
||||||
|
}
|
17
pkgs/nvim/config/utils/ultimate-autopair.nix
Normal file
17
pkgs/nvim/config/utils/ultimate-autopair.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimUtils; [
|
||||||
|
(buildVimPlugin {
|
||||||
|
pname = "ultimate-autopair.nvim";
|
||||||
|
version = "2024-02-05";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "altermo";
|
||||||
|
repo = "ultimate-autopair.nvim";
|
||||||
|
rev = "25c13e0ce167db0255456cac10158b27d2be30c0";
|
||||||
|
sha256 = "0bsxfj6g8fii9nn92vl15hdhafx3fikgiz4srr7y10pxz01c5s4c";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
extraConfigLua = ''
|
||||||
|
require('ultimate-autopair').setup()
|
||||||
|
'';
|
||||||
|
}
|
26
pkgs/nvim/config/utils/undotree.nix
Normal file
26
pkgs/nvim/config/utils/undotree.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
host,
|
||||||
|
user,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
plugins.undotree = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
autoOpenDiff = true;
|
||||||
|
focusOnToggle = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ut";
|
||||||
|
action = "<cmd>UndotreeToggle<CR>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Undotree";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
5
pkgs/nvim/config/utils/vim-be-good.nix
Normal file
5
pkgs/nvim/config/utils/vim-be-good.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
vim-be-good
|
||||||
|
];
|
||||||
|
}
|
5
pkgs/nvim/config/utils/wakatime.nix
Normal file
5
pkgs/nvim/config/utils/wakatime.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
|
vim-wakatime
|
||||||
|
];
|
||||||
|
}
|
19
pkgs/nvim/config/utils/whichkey.nix
Normal file
19
pkgs/nvim/config/utils/whichkey.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
# TODO: Implement general mappings
|
||||||
|
plugins.which-key = {
|
||||||
|
enable = true;
|
||||||
|
ignoreMissing = false;
|
||||||
|
icons = {
|
||||||
|
breadcrumb = "»";
|
||||||
|
group = "+";
|
||||||
|
separator = ""; # ➜
|
||||||
|
};
|
||||||
|
# registrations = {
|
||||||
|
# "<leader>t" = " Terminal";
|
||||||
|
# };
|
||||||
|
window = {
|
||||||
|
border = "none";
|
||||||
|
winblend = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
43
pkgs/nvim/config/utils/wilder.nix
Normal file
43
pkgs/nvim/config/utils/wilder.nix
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
plugins.wilder = {
|
||||||
|
enable = true;
|
||||||
|
modes = [":" "/" "?"];
|
||||||
|
pipeline = [
|
||||||
|
''
|
||||||
|
wilder.branch(
|
||||||
|
wilder.python_file_finder_pipeline({
|
||||||
|
file_command = function(ctx, arg)
|
||||||
|
if string.find(arg, '.') ~= nil then
|
||||||
|
return {'fd', '-tf', '-H'}
|
||||||
|
else
|
||||||
|
return {'fd', '-tf'}
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
dir_command = {'fd', '-td'},
|
||||||
|
filters = {'cpsm_filter'},
|
||||||
|
}),
|
||||||
|
wilder.substitute_pipeline({
|
||||||
|
pipeline = wilder.python_search_pipeline({
|
||||||
|
skip_cmdtype_check = 1,
|
||||||
|
pattern = wilder.python_fuzzy_pattern({
|
||||||
|
start_at_boundary = 0,
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
wilder.cmdline_pipeline({
|
||||||
|
language = 'python',
|
||||||
|
fuzzy = 1,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
wilder.check(function(ctx, x) return x == "" end),
|
||||||
|
wilder.history(),
|
||||||
|
},
|
||||||
|
wilder.python_search_pipeline({
|
||||||
|
pattern = wilder.python_fuzzy_pattern({
|
||||||
|
start_at_boundary = 0,
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
) ''
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
13
pkgs/nvim/default.nix
Normal file
13
pkgs/nvim/default.nix
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
system = pkgs.system;
|
||||||
|
nixvim = inputs.nixvim.legacyPackages.${system};
|
||||||
|
nixvimModule = {
|
||||||
|
inherit pkgs;
|
||||||
|
module = import ./config;
|
||||||
|
extraSpecialArgs = {};
|
||||||
|
};
|
||||||
|
in (nixvim.makeNixvimWithModule nixvimModule)
|
Loading…
x
Reference in New Issue
Block a user