From ba523e894bb2770998c95215115d11d1309f0afb Mon Sep 17 00:00:00 2001 From: xav-ie Date: Sun, 29 Dec 2024 01:38:37 -0500 Subject: [PATCH] feat(treefmt): add --- LICENSE => LICENSE.md | 1 - README.md | 28 ++++++++++++++++++++++++++ README.org | 26 ------------------------ flake.lock | 46 ++++++++++++++++++++++++++++++++++++------- flake.nix | 24 +++++++++++++++++++++- 5 files changed, 90 insertions(+), 35 deletions(-) rename LICENSE => LICENSE.md (99%) create mode 100644 README.md delete mode 100644 README.org diff --git a/LICENSE b/LICENSE.md similarity index 99% rename from LICENSE rename to LICENSE.md index fa32438..e27d6ae 100644 --- a/LICENSE +++ b/LICENSE.md @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/README.md b/README.md new file mode 100644 index 0000000..46d7041 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# xnixvim + +My nixvim (nixified neovim) config! + +Nixvim is an amazing project that brings nix to neovim. You can find out more on the [nixvim repository](https://github.com/nix-community/nixvim). It makes running neovim with your complete config on alien systems easy, consistent, and fast! Try this command to run _my_ neovim configuration: + +```sh +nix run github:xav-ie/xnixvim +``` + +Basically, if you have `nix` installed, you can run this configuation! + +I am still actively re-organizing this repository, so feel free to just poke around. + +You might also enjoy [my dotfiles](https://github.com/xav-ie/dots)! + +## TODO + +- [ ] CI to automatically run and take screenshot +- [x] CI +- [x] Fast CI +- [ ] Screenshot with CI +- [ ] separate theme out and share +- [ ] local completions +- [ ] snippets +- [ ] better large file support +- [ ] proper spelling and dictionary support to add new words +- [ ] org concealment diff --git a/README.org b/README.org deleted file mode 100644 index 9d4cb1e..0000000 --- a/README.org +++ /dev/null @@ -1,26 +0,0 @@ -* xnixvim - My nixvim (nixified neovim) config! - - Nixvim is an amazing project that brings nix to neovim. You can find out more on the [[https://github.com/nix-community/nixvim][nixvim repository]]. It makes running neovim with your complete config on alien systems easy, consistent, and fast! Try this command to run /my/ neovim configuration: - #+BEGIN_SRC sh - nix run github:xav-ie/xnixvim - #+END_SRC - - Basically, if you have `nix` installed, you can run this configuation! - - I am still actively re-organizing this repository, so feel free to just poke around. - - You might also enjoy [[https://github.com/xav-ie/dots][my dotfiles]]! - -** TODO TODO - - [ ] CI to automatically run and take screenshot - - [X] CI - - [ ] Fast CI - - [ ] Screenshot with CI - - [ ] separate theme out and share - - [ ] local completions - - [ ] snippets - - [ ] better large file support - - [ ] proper spelling and dictionary support to add new words - - [ ] org concealment - diff --git a/flake.lock b/flake.lock index caabf1f..5ecee9b 100644 --- a/flake.lock +++ b/flake.lock @@ -287,6 +287,22 @@ "type": "github" } }, + "nixpkgs_3": { + "locked": { + "lastModified": 1735291276, + "narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "634fd46801442d760e09493a794c4f15db2d0cbb", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "devshell": "devshell", @@ -430,6 +446,7 @@ "orgmode": "orgmode", "schemastore-nvim": "schemastore-nvim", "tabscope-nvim": "tabscope-nvim", + "treefmt-nix": "treefmt-nix_2", "vim-guise": "vim-guise", "witt-neovim": "witt-neovim" } @@ -483,17 +500,32 @@ }, "treefmt-nix": { "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1735135567, + "narHash": "sha256-8T3K5amndEavxnludPyfj3Z1IkcFdRpR23q+T0BVeZE=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "9e09d30a644c57257715902efbb3adc56c79cf28", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1734704479, - "narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=", + "lastModified": 1735135567, + "narHash": "sha256-8T3K5amndEavxnludPyfj3Z1IkcFdRpR23q+T0BVeZE=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f", + "rev": "9e09d30a644c57257715902efbb3adc56c79cf28", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 3e8577e..e99270b 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,7 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; nixvim.url = "github:nix-community/nixvim"; + treefmt-nix.url = "github:numtide/treefmt-nix"; # neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; # vendored @@ -59,6 +60,10 @@ "x86_64-linux" ]; + imports = [ + inputs.treefmt-nix.flakeModule + ]; + perSystem = { pkgs, system, ... }: let @@ -84,7 +89,24 @@ # TODO: add `nix run github:fzakaria/nix-auto-follow -- -c` }; - formatter = pkgs.nixfmt-rfc-style; + # https://flake.parts/options/treefmt-nix.html#options + treefmt = { + projectRootFile = "./flake.nix"; + programs = { + deadnix.enable = true; + nixfmt.enable = true; + stylua.enable = true; + prettier.enable = true; + }; + settings.global.excludes = [ + # I could not find formatters for these: + "Makefile" + ".git-blame-ignore-revs" + ]; + + }; + + # formatter = pkgs.nixfmt-rfc-style; packages = { # Lets you run `nix run .` to start nixvim