{"id":13675297,"url":"https://github.com/jdnewman85/openai-vim","last_synced_at":"2025-04-28T23:30:31.542Z","repository":{"id":65404028,"uuid":"581716157","full_name":"jdnewman85/openai-vim","owner":"jdnewman85","description":"OpenAI Neovim Integration Plugin","archived":false,"fork":false,"pushed_at":"2023-02-08T02:41:49.000Z","size":79,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-11T16:41:37.056Z","etag":null,"topics":["copilot","lua","neovim","neovim-plugin","openai","teal"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdnewman85.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-12-24T03:53:06.000Z","updated_at":"2023-10-10T23:43:42.000Z","dependencies_parsed_at":"2023-02-19T02:46:12.151Z","dependency_job_id":null,"html_url":"https://github.com/jdnewman85/openai-vim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdnewman85%2Fopenai-vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdnewman85%2Fopenai-vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdnewman85%2Fopenai-vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdnewman85%2Fopenai-vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdnewman85","download_url":"https://codeload.github.com/jdnewman85/openai-vim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251404411,"owners_count":21584089,"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":["copilot","lua","neovim","neovim-plugin","openai","teal"],"created_at":"2024-08-02T12:00:37.408Z","updated_at":"2025-04-28T23:30:30.885Z","avatar_url":"https://github.com/jdnewman85.png","language":"Lua","funding_links":[],"categories":["Code writing and editing"],"sub_categories":[],"readme":"# OpenAI Vim integration plugin\n\nSorry, this isn't quite ready yet\nSoon(TM)\n\nDon't use it yet\n\n# Alternatives\nHere are some alternatives in the interim. I've not actually used any, and can't make any recommendations.\n- [github/copilot.vim](https://github.com/github/copilot.vim)\n- [tom-doerr/vim_codex](https://github.com/tom-doerr/vim_codex)\n- [aduros/ai.vim](https://github.com/aduros/ai.vim)\n- [jessfraz/openai.vim](https://github.com/jessfraz/openai.vim)\n- [jackMort/ChatGPT.nvim](https://github.com/jackMort/ChatGPT.nvim)\n\n# WIP\nNeovim only for now anyway, newish(TBD) version\n\nWritten in [Teal](https://github.com/teal-language/tl)\n\n# TODO\n- README.md\n  - WIP\n  - Initial release\n  - Screenshots\n- Example vim init\n- User defined keybinds\n- Example default keybinds\n- Error handling\n\n# Goals\n- Integrate openai endpoints effectively\n    - Operations: Complete, insert, and edit\n    - Model selection and Parameter settings\n- Tokenize text locally, and use treesitter to help with:\n- Determining tokens to be sent to AI\n    - Entire file\n    - Selection\n    - Up to cursor\n    - Multiple marked ranges\n    - Lexical scope w/ treesitter\n        - Enclosing function\n        - Enclosing class\n        - Imported\n    - Choose method based on expressions including possibly factors:\n      - Operation\n      - Preference/settings\n      - Number of input tokens\n      - Number of available tokens for output\n      - Costs\n      - Codex vs Text\n      - Locally stored prior data, including AI prompts and responses\n    - Error messages\n      - All\n      - W/ prompt\n      - Single\n      - Range\n      - Selection\n- Stops @ end of\n  - Line\n  - Function\n  - Class\n  - List\n  - Comments\n- Assist with predicting cost based on cost-per-token, selected settings, etc\n  - Impossible to _guarantee_ anything here without API access to this information\n\n## Requirements\n- [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) - curl\n  - Actually requires this [forked version](https://github.com/jdnewman85/plenary.nvim) until I PR [Server Sent Events](https://en.wikipedia.org/wiki/Server-sent_events) support\n- Optional\n  - [utf8.nvim](https://github.com/uga-rosa/utf8.nvim) - tokenization functionality\n  - [dressing.nvim](https://github.com/stevearc/dressing.nvim) - prettier menus\n    - [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) - prettier menus\n- Embeds files from\n  - [Neovim types](https://github.com/teal-language/teal-types/blob/master/types/neovim/vim.d.tl) from [teal-types](https://github.com/teal-language/teal-types)\n\n## API Key\nExpects your openai api key in environment variable `OPENAI_APIKEY` - Note: *IT IS NOT A FREE SERVICE!* (though they do provide some starting credit)\n\n## Keybinds\nTerrible keybinds for the functionality so far are in [plugin/openai-test.lua](https://github.com/jdnewman85/openai-vim/blob/main/plugin/openai-test.lua)\n  - They are truly terrible and temporary - I've put no thought in to them\n  - They are hardcoded for development, likely end users would put everything from [plugin/openai-test.lua](https://github.com/jdnewman85/openai-vim/blob/main/plugin/openai-test.lua) in their vim init.\n  - They aren't documented, wait till they are.\n\n# May rename and generalize to other apis in the future\n# MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdnewman85%2Fopenai-vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdnewman85%2Fopenai-vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdnewman85%2Fopenai-vim/lists"}