{"id":13571726,"url":"https://github.com/eraserhd/parinfer-rust","last_synced_at":"2025-05-15T00:09:11.997Z","repository":{"id":38025906,"uuid":"124084615","full_name":"eraserhd/parinfer-rust","owner":"eraserhd","description":"A Rust port of parinfer.","archived":false,"fork":false,"pushed_at":"2025-02-10T14:31:32.000Z","size":742,"stargazers_count":564,"open_issues_count":31,"forks_count":45,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-14T12:58:25.481Z","etag":null,"topics":["clojure","kakoune","lisp","parinfer","plugin","scheme","vim"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eraserhd.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.adoc","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-06T13:46:59.000Z","updated_at":"2025-04-11T00:35:54.000Z","dependencies_parsed_at":"2024-01-14T03:51:00.118Z","dependency_job_id":"9c28d86e-9378-4527-8078-66a4e37203cb","html_url":"https://github.com/eraserhd/parinfer-rust","commit_stats":{"total_commits":578,"total_committers":29,"mean_commits":19.93103448275862,"dds":0.1470588235294118,"last_synced_commit":"d84828b453e158d06406f6b5e9056f6b54ff76c9"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eraserhd%2Fparinfer-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eraserhd%2Fparinfer-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eraserhd%2Fparinfer-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eraserhd%2Fparinfer-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eraserhd","download_url":"https://codeload.github.com/eraserhd/parinfer-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254249206,"owners_count":22039029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","kakoune","lisp","parinfer","plugin","scheme","vim"],"created_at":"2024-08-01T14:01:05.344Z","updated_at":"2025-05-15T00:09:11.904Z","avatar_url":"https://github.com/eraserhd.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"= parinfer-rust\n\nInfer parentheses for Clojure, Lisp and Scheme.\n\nhttps://github.com/eraserhd/parinfer-rust\n\nA full-featured, super fast implementation of https://shaunlebron.github.io/parinfer/[Shaun Lebron’s parinfer].\nThis repo has Vim, Neovim, and Kakoune plugins, and an https://github.com/justinbarclay/parinfer-rust-mode[Emacs plugin] is available.\nThe Rust library can be called from other editors that can load dynamic libraries.\n\nThis plugin, unlike others available for Vim, implements \"smart\" mode.\nRather than switching between \"paren\" mode and \"indent\" mode, parinfer uses information about how the user is changing the file to decide what to do.\n\n== Installing\n\nDependencies:\n\n* https://www.rust-lang.org/en-US/install.html[rust] \u003e= ~1.83 ?\n* `clang` and `libclang-dev` packages or equivalent for your OS\n\n\n=== Stand-alone CLI\n\nIf you just want to run `parinfer-rust` from the command-line:\n\n....\n$ cargo build --release\n$ cargo install\n....\n\nIf you use emacs add the corresponding feature flag during compilation\n....\n$ cargo build --release --features emacs\n....\n\n=== Vim and Neovim\n\n==== `+pathogen+`\n\nIf you are using Tim Pope’s `+pathogen+`:\n\n....\n$ cd ~/.vim/bundle\n$ git clone git@github.com:eraserhd/parinfer-rust.git\n$ cd ~/.vim/bundle/parinfer-rust\n$ cargo build --release\n....\n\n==== `+vim-plug+`\n\n[source,viml]\n----\nPlug 'eraserhd/parinfer-rust'\n----\n\nThen, build project using cargo:\n\n....\n$ cd /path/to/parinfer-rust\n$ cargo build --release\n....\n\nOr, with optional automatic recompilation on update:\n\n[source,viml]\n----\nPlug 'eraserhd/parinfer-rust', {'do':\n        \\  'cargo build --release'}\n----\n\nIf you are a NixOS user using Plug, you can use this command instead:\n[source,viml]\n----\nPlug 'eraserhd/parinfer-rust', {'do':\n        \\ 'nix-shell --run \\\"cargo build --release \\\"'}\n----\n\n==== `+lazy.nvim+`\n\nAdd this to your `+init.lua+`:\n\n[source,viml]\n----\nrequire(\"lazy\").setup({\n  {\"eraserhd/parinfer-rust\", build = \"cargo build --release\"}\n})\n----\n\n==== `+Nix+`\n\nIf you are a Nix user using Nix + Home Manager to build your vim plugins, you can add:\n\n[source,nix]\n----\nprograms.neovim = {\n    [ pkgs.vimPlugins.parinfer-rust ];\n}\n----\n\n\n=== Kakoune\n\n==== `+plug.kak+`\n\nAdd this to your `+kakrc+`\n\n[source,kak]\n----\nplug \"eraserhd/parinfer-rust\" do %{\n    cargo install --force --path .\n} config %{\n    hook global WinSetOption filetype=(clojure|lisp|picolisp|racket|scheme) %{\n        parinfer-enable-window -smart\n    }\n}\n----\n\nRe-source your `+kakrc+` or restart Kakoune. Then run `+:plug-install+`.\n`+plug.kak+` will download, build and install plugin for you. Optionally\nadd `+cargo clean+` line to the `+do+` block to clean plugin from build\nfiles, thus making it load a bit faster.\n\n==== Manual\n\n....\n$ cd ~/my-projects\n$ git clone git@github.com:eraserhd/parinfer-rust.git\n$ cd parinfer-rust\n$ make install\n$ cargo build --release\n$ cargo install\n....\n\nAdd this to your `+kakrc+`\n\n[source,kak]\n----\nhook global WinSetOption filetype=(clojure|lisp|picolisp|racket|scheme) %{\n    parinfer-enable-window -smart\n}\n----\n\n==== NixOS or nix-darwin\n\n[source,nix]\n----\n{\n  environment.systemPackages = let\n    myKakoune = pkgs.wrapKakoune pkgs.kakoune-unwrapped {\n      configure = {\n        plugins = with self.kakounePlugins; [\n          parinfer-rust\n        ];\n      };\n    };\n  in [ myKakoune ];\n}\n----\n\nAlternately, you can add your plugins as an overlay:\n\n[source,nix]\n----\n{\n  nixpkgs.overlays = [\n    (self: super: {\n      kakoune = super.wrapKakoune self.kakoune-unwrapped {\n        configure = {\n          plugins = with self.kakounePlugins; [\n            parinfer-rust\n          ];\n        };\n      };\n    })\n  ];\n\n  environment.systemPackages = [ pkgs.kakoune ];\n}\n----\n\n=== Emacs\n\nTo install parinfer-rust for Emacs follow the instructions at\nhttps://github.com/justinbarclay/parinfer-rust-mode#installing[parinfer-rust-mode.el]\n\n== Building WebAssembly\n\nWebAssembly currently needs the ``nigthly'' toolchain:\n\n....\n$ rustup update\n$ rustup install nightly\n$ rustup target add wasm32-unknown-unknown --toolchain nightly\n$ cargo +nightly install cargo-web\n....\n\nIt can then be built with:\n\n....\n$ cargo +nightly web build --release\n....\n\n== Tests\n\nThe CI server uses [Nix](https://nixos.org/nix/download.html) to make\nreproducible build and test environments.  It's a good idea to run tests with\nit.\n\n....\n$ nix flake check                        # Build and test everything\n$ cargo +nightly web test                # Test the WebAssembly version\n$ vim --clean -u tests/vim/run.vim       # Test against locally-installed Vim\n$ ( cd tests/kakoune \u0026\u0026 ./run.sh )       # Test against locally-installed Kakoune\n....\n\nVim tests are in a nice, readable format in `+tests/vim/test-cases.md+`.\nPlease add tests for any new features (or even old ones!).\nYou can set the `+VIM_TO_TEST+` environment variable to Vim’s path to test weird or different builds.\n\n== Contributors\n\nThis wouldn’t be possible without the work of others:\n\n* Shaun Lebron - Inventing parinfer and doing the math.\n* Case Nelson - Writing the nvim-parinfer, from which VimL code and some\n  inspiration was stolen.\n* Justin Barclay - Emacs module.\n* Michael Camilleri - User-defined comments.\n* Mitsuhiro Nakamura - Support for Common Lisp and Scheme.\n* ElKowar - User-defined string-delimiters and support for Yuck.\n* Graham Enos - Updating Rust edition\n* Sunjay Cauligi - Support for Hy\n\n== License\n\nlink:LICENSE.md[ISC License]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feraserhd%2Fparinfer-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feraserhd%2Fparinfer-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feraserhd%2Fparinfer-rust/lists"}