{"id":29483538,"url":"https://github.com/ozars/aiignore.nvim","last_synced_at":"2026-05-16T13:02:42.962Z","repository":{"id":304125563,"uuid":"1017214239","full_name":"ozars/aiignore.nvim","owner":"ozars","description":"A small Neovim extension to prevent AI coding plugins (e.g. copilot.lua) from attaching to files and directories specified in an .aiignore file.","archived":false,"fork":false,"pushed_at":"2025-07-11T07:27:01.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-11T10:54:51.519Z","etag":null,"topics":["ai","copilot","lua","neovim","plugin"],"latest_commit_sha":null,"homepage":"","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/ozars.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-07-10T07:41:31.000Z","updated_at":"2025-07-11T07:27:05.000Z","dependencies_parsed_at":"2025-07-11T11:09:01.536Z","dependency_job_id":null,"html_url":"https://github.com/ozars/aiignore.nvim","commit_stats":null,"previous_names":["ozars/aiignore.nvim"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ozars/aiignore.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozars%2Faiignore.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozars%2Faiignore.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozars%2Faiignore.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozars%2Faiignore.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozars","download_url":"https://codeload.github.com/ozars/aiignore.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozars%2Faiignore.nvim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265401013,"owners_count":23758929,"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":["ai","copilot","lua","neovim","plugin"],"created_at":"2025-07-15T04:00:36.346Z","updated_at":"2026-05-16T13:02:42.957Z","avatar_url":"https://github.com/ozars.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e🤖 aiignore.nvim\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/ozars/aiignore.nvim/actions/workflows/actions.yml\"\u003e\n\u003cimg alt=\"Github Actions Build\" src=\"https://img.shields.io/github/actions/workflow/status/ozars/aiignore.nvim/actions.yml?style=for-the-badge\u0026logo=github-actions\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\nA small Neovim extension to prevent AI coding plugins (e.g. [`copilot.lua`])\nfrom attaching to files and directories specified in an `.aiignore` file.\n\n## ✨ Features\n\n* Respects `.aiignore` files in your project root and subdirectories.\n* Uses the same `.gitignore` format and semantics with git.\n* Caches `.aiignore` files for better performance.\n\n## ⚙️ Installation\n\nYou can install this plugin using your favorite package manager.\n\nTo use this extension, you need to require it and use its `should_ignore`\nfunction in your AI extension setup. \n\nSee below for an example setup with [`copilot.lua`]:\n\n[`copilot.lua`]: https://github.com/zbirenbaum/copilot.lua\n\n### lazy.nvim\n\n```lua\n{\n  -- Example with \"zbirenbaum/copilot.lua\"\n  \"zbirenbaum/copilot.lua\",\n  cmd = \"Copilot\",\n  event = \"InsertEnter\",\n  dependencies = { \"ozars/aiignore.nvim\" }, -- Ensure aiignore is loaded before copilot.lua\n  config = function()\n    require(\"copilot\").setup({\n      -- Other copilot.lua settings\n\n      should_attach = function(bufnr)\n        local aiignore = require(\"aiignore\")\n        return not aiignore.should_ignore(bufnr, {\n          -- File and directory names configurations.\n          aiignore_filename = \".aiignore\", -- The name of the .aiignore file.\n          -- aiignore_filename = { \".aiexclude\", \".aiignore\" }, -- Multiple names are also supported. All of them will be checked.\n          git_dirname = \".git\",                -- The name of the directory which will be used for finding a repository root.\n          force_disable_if_not_in_git = false  -- Whether to force disable if the file is not in a git repository.\n\n          -- Logging and notifications configurations.\n          warn_ignored = false,     -- Whether to notify the user if the file is ignored.\n          warn_not_ignored = false, -- Whether to notify the user if the file is not ignored.\n          debug_log = false,        -- Whether to log debug messages.\n          quiet = false,            -- Whether to ignore errors silently.\n\n          -- Buffer configurations.\n          should_ignore_invalid_buffers = true, -- Whether to ignore invalid buffers.\n          should_ignore_unnamed_buffers = true, -- Whether to ignore unnamed buffers.\n        })\n      end,\n    })\n  end,\n}\n```\n\n## 📝 The `.aiignore` file\n\nCreate an `.aiignore` file in the root of your project (the same directory that\ncontains your `.git` folder). The format is identical to `.gitignore`. Similar to\n`.gitignore`, you can have `.aiignore` files in subdirectories of the repository,\nwhich will only affect those directories.\n\nIf a file is not in a git repository, the extension checks for any `.aiignore`\nfiles in the same directory as the buffer path.\n\n### Example `.aiignore`\n\n```\n# Ignore secrets and environment files\n.env\n*.secret\ncredentials.json\n/config/private.yml\n\n# Ignore specific files\n/src/legacy/do_not_touch.js\n```\n\nWith the configuration above, (a configured) AI extension will not attach to or\nprovide suggestions for any files or directories matching these patterns.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozars%2Faiignore.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozars%2Faiignore.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozars%2Faiignore.nvim/lists"}