{"id":29143932,"url":"https://github.com/ddrcode/toolwise","last_synced_at":"2025-09-07T08:46:04.795Z","repository":{"id":301451914,"uuid":"1009300019","full_name":"ddrcode/toolwise","owner":"ddrcode","description":"Neovim integration for Nix shells, direnv, and other project-scoped dev environments","archived":false,"fork":false,"pushed_at":"2025-06-26T23:18:25.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-27T00:39:26.441Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddrcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-06-26T22:55:59.000Z","updated_at":"2025-06-26T23:18:27.000Z","dependencies_parsed_at":"2025-06-27T00:39:27.741Z","dependency_job_id":"e26927e9-6555-4f09-8efe-7384f023fe10","html_url":"https://github.com/ddrcode/toolwise","commit_stats":null,"previous_names":["ddrcode/toolwise"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ddrcode/toolwise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddrcode%2Ftoolwise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddrcode%2Ftoolwise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddrcode%2Ftoolwise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddrcode%2Ftoolwise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddrcode","download_url":"https://codeload.github.com/ddrcode/toolwise/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddrcode%2Ftoolwise/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274015006,"owners_count":25207688,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-06-30T20:39:45.443Z","updated_at":"2025-09-07T08:46:04.766Z","avatar_url":"https://github.com/ddrcode.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# toolwise.nvim\n*Smarter tooling. Only when you need it.*\n\n\u003e **Neovim integration for Nix shells, `direnv`, and other project-scoped dev environments.**\n\u003e Dynamically attach LSPs, formatters, and tools *only if they exist in your current shell*.\n\u003e Ideal for Nix, Flakes, per-project devShells, and anyone tired of checkhealth errors.\n\n## ⚡ At a Glance\n\n✅ **Nix shell aware**  \n✅ **direnv-friendly**  \n✅ No global pollution  \n✅ No “command not found”  \n✅ Clean Neovim startup  \n✅ Automatic fallbacks (`treefmt`, LSP, etc.)\n\n\u003e *If you use `conform.nvim`, `lspconfig`, or a Nix-based dev workflow — this plugin is for you.*\n\n## ✨ Why?\n\nYou’re using Neovim inside a project that has its own shell —  \na **`shell.nix`**, a **flake**, a **`.envrc`** with tools defined.\n\nBut your editor doesn’t know what’s available *right now*.\n\nYou get this:\n\n```\n✗ black not found\n✗ rustfmt missing\n✗ tsserver unavailable\n```\n\nWhen what you want is:\n\n\u003e *“Use it if it’s there. Ignore it if it’s not.”*\n\n## 🚀 What It Does\n\n- Detects **whether tools are available** (LSPs, formatters, CLI helpers)\n- Attaches or configures them **only when present**\n- Enables **graceful fallback** to `treefmt`, LSP, or nothing\n- Works beautifully with Nix shells, `direnv`, and dev environments\n\n## 🧠 Key Features\n\n✅ One-liner: \"only use `black` if it's available\"  \n✅ Attach `lspconfig` only if binary exists  \n✅ Dynamically build formatter lists for `conform.nvim`  \n✅ Works with any plugin, any tool — universal runtime check  \n✅ Optional logging so you know what's active  \n✅ Designed for **real-world setups**, not demo-only configs\n\n## 📦 Install\n\nWith `lazy.nvim`:\n\n```lua\n{\n  \"yourname/toolwise.nvim\",\n  config = true\n}\n```\n\nWith `packer`:\n\n```lua\nuse { \"yourname/toolwise.nvim\" }\n```\n\n## 💡 Example: Formatters\n\n```lua\nlocal toolwise = require(\"toolwise\")\n\ntoolwise.if_has(\"black\", function()\n  require(\"conform\").formatters.black = {\n    command = \"black\",\n    args = { \"--quiet\", \"-\" },\n    stdin = true,\n  }\nend)\n```\n\nOr for dynamic resolution:\n\n```lua\nrequire(\"conform\").setup({\n  formatters_by_ft = setmetatable({}, {\n    __index = function(_, ft)\n      return require(\"toolwise\").formatters_for(ft)\n    end,\n  })\n})\n```\n\n## 🔍 Example: LSPs\n\n```lua\ntoolwise.lsp(\"rust_analyzer\", {\n  settings = {\n    [\"rust-analyzer\"] = {\n      cargo = { allFeatures = true },\n    }\n  }\n})\n```\n\nOnly attaches if `rust-analyzer` is executable.\n\n## 🧘 Philosophy\n\nNo magic. No assumptions.\n\nToolwise doesn’t manage plugins, override behavior, or invent abstractions. It just answers one question:\n\n\u003e *“Can I use this tool right now?”*\n\nIf yes — it lets you use it.  \nIf not — it steps aside.\n\n## 📍 Roadmap\n\n- [ ] Statusline hook (`toolwise.active(\"black\")`)\n- [ ] DAP support\n- [ ] Built-in profiles for known formatters/LSPs\n- [ ] Project-based overrides via `.toolwise.lua`\n- [ ] Integration with `treefmt.toml` for discovery\n\n## 🔥 Author’s Note\n\nCreated out of frustration.  \nMaintained out of hope.  \nTested on Nix.  \nRuns anywhere.\n\nIf you’ve ever opened Neovim and thought  \n*“Ugh, I don’t even have that tool in this project…”*,  \n**Toolwise** is your friend.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddrcode%2Ftoolwise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddrcode%2Ftoolwise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddrcode%2Ftoolwise/lists"}