{"id":22189688,"url":"https://github.com/squareys/magnum-neovim-api","last_synced_at":"2025-10-13T19:41:20.981Z","repository":{"id":93649663,"uuid":"134382146","full_name":"Squareys/magnum-neovim-api","owner":"Squareys","description":"Neovim API bindings generator and library using http://magnum.graphics types","archived":false,"fork":false,"pushed_at":"2018-09-24T05:37:07.000Z","size":51,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-07T14:47:32.072Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CMake","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/Squareys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2018-05-22T08:10:11.000Z","updated_at":"2025-01-19T02:21:20.000Z","dependencies_parsed_at":"2023-03-04T05:15:37.932Z","dependency_job_id":null,"html_url":"https://github.com/Squareys/magnum-neovim-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Squareys/magnum-neovim-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squareys%2Fmagnum-neovim-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squareys%2Fmagnum-neovim-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squareys%2Fmagnum-neovim-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squareys%2Fmagnum-neovim-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Squareys","download_url":"https://codeload.github.com/Squareys/magnum-neovim-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Squareys%2Fmagnum-neovim-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016930,"owners_count":26085889,"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-10-13T02:00:06.723Z","response_time":61,"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":"2024-12-02T11:20:04.319Z","updated_at":"2025-10-13T19:41:20.975Z","avatar_url":"https://github.com/Squareys.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"Magnum Neovim API\n=================\n\n*Neovim API bindings generator and library using [Magnum](http://magnum.graphics) types*\n\nA small generated library which talks to [neovim](https://neovim.io) via TCP and their\n[msgpack-rpc](https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md)\n[API](https://github.com/neovim/neovim/blob/master/runtime/doc/msgpack_rpc.txt).\n\nNote: Only Windows is supported currently. Except if you swiftly implement a\n[Corrade::Net::Socket](https://github.com/Squareys/magnum-neovim-api/blob/master/src/Corrade/Net/Socket.cpp)\nfor your operating system (and hopefully create a pullrequest that).\n\n# Building\n\nThe project relies on [CMake](https://cmake.org/). You can use\n[vcpkg](https://github.com/Microsoft/vcpkg) or\n[build Corrade and Magnum yourself](http://doc.magnum.graphics/magnum/building.html).\nAfter that, building this project should be a matter of:\n\n~~~\nmkdir build \u0026\u0026 cd build\ncmake .. -DBUILD_TESTS=ON\ncmake --build . --target install\n~~~\n\nPotentially with additional parameters like `CMAKE_INSTALL_PREFIX` or\n`CMAKE_TOOLCHAIN_FILE` depending on your specific setup.\n\n# Running\n\nMake sure to run Neovim first. While the documentation still refers to `neovim --listen 127.0.0.1:6666`,\n`--listen` seems to be an unknown argument.\nI found that instead the following works:\n\n~~~\n./nvim.exe --headless -c \"call serverstart('127.0.0.1:6666')\"\n~~~\n\nYou can then run a function like this:\n\n~~~cpp\n    #include \"neovimapi2.h\"\n\n    // ...\n\n    NeovimApi::NeovimApi2 nvim{6666};\n    Object result = nvim.nvim_eval(\"'hello' . 'world!\\n'\");\n~~~\n\nor just run the test `src/Test/NeovimApiTest.cpp`.\n\n# How it works\n\n## Code Generation\n\nA [python3](https://python.org) script runs `nvim --api-info` to get a list of functions\nand some metadata in *msgpack* format. This data is parsed and passed onto a\n[jinja](http://jinja.pocoo.org) template which generates `neovimapi2.h` and `neovimapi2.cpp`\ninto `\u003cbuild\u003e/src/.`.\n\n## CMake\n\n`neovimapi2.h` and `neovimapi2.cpp` are generated via a\n[custom CMake target](https://cmake.org/cmake/help/v3.0/command/add_custom_target.html) `generate`,\nwhich allows the compilation of those files to depend on the code generation.\nWhile this made working with the templates extremely convenient, it is not necessary to generate the\nfiles more than once during development.\nBut, hey, now you have to checkout 1864 (.cpp) + 276 (.h) less lines of code `¯\\_(ツ)_/¯`\n\n## Communication with Neovim\n\nNeovim allows two ways of communiaction: TCP and stdin. Data passed between Neovim and your client\nis formatted in *msgpack*, which is kinda like json, but efficiently packed and binary.\n\nOn top of *msgpack*, [msgpack-rpc](https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md)\ndefines a protocol for remote procedure calls, which Neovim uses to allow you to run functions.\n\n# Licence\n\nThe code of this project is licensed under the MIT/Expat license:\n\n~~~\nCopyright © 2018 Jonathan Hale \u003csquareys@googlemail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n~~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquareys%2Fmagnum-neovim-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquareys%2Fmagnum-neovim-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquareys%2Fmagnum-neovim-api/lists"}