{"id":25631792,"url":"https://github.com/esensar/neovim-http-api-plugin","last_synced_at":"2026-05-17T02:43:41.996Z","repository":{"id":114551645,"uuid":"501275128","full_name":"esensar/neovim-http-api-plugin","owner":"esensar","description":"Very simple HTTP wrapper around Neovim RPC API - demonstration of neovim-java-plugin-host - Moved to https://codeberg.org/neovim-java/neovim-http-api-plugin","archived":false,"fork":false,"pushed_at":"2022-06-10T10:40:01.000Z","size":82,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T10:08:56.150Z","etag":null,"topics":["api","http","java","neovim","neovim-java-plugin","plugin","rpc"],"latest_commit_sha":null,"homepage":"","language":"Java","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/esensar.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}},"created_at":"2022-06-08T13:59:58.000Z","updated_at":"2023-04-03T17:09:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"07a2271b-cfd2-4f8c-ae54-c8be0e76e5f0","html_url":"https://github.com/esensar/neovim-http-api-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/esensar/neovim-http-api-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esensar%2Fneovim-http-api-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esensar%2Fneovim-http-api-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esensar%2Fneovim-http-api-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esensar%2Fneovim-http-api-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esensar","download_url":"https://codeload.github.com/esensar/neovim-http-api-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esensar%2Fneovim-http-api-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280893614,"owners_count":26409280,"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-25T02:00:06.499Z","response_time":81,"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":["api","http","java","neovim","neovim-java-plugin","plugin","rpc"],"created_at":"2025-02-22T20:31:30.430Z","updated_at":"2025-10-25T02:06:31.564Z","avatar_url":"https://github.com/esensar.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neovim HTTP API\n\nThis plugin serves as an example of Java plugin that can be used with [neovim-java-plugin-host](https://github.com/esensar/neovim-java-plugin-host). It provides Neovim RPC API through HTTP endpoints.\n\n**NOTE:** This example uses request instead of notification for starting. In this case, notification could have been used as well (and is probably the better solution, since it won't block Neovim). To use notifications instead `@NeovimNotificationHandler` annotation should be used, and from neovim `notify` instead of `request` should be used.\n\n## Requirements\n\n- [Neovim](https://neovim.io/) version 0.7.0+\n- [neovim-java-plugin-host](https://github.com/esensar/neovim-java-plugin-host)\n\n## Usage\n\n### Installation\n\nThere are a couple of different ways to install the plugin.\n\n#### Plugin manager\n\nUsing your favourite plugin manager, e.g. [Packer.nvim](https://github.com/wbthomason/packer.nvim):\n```lua\nuse {\n  'esensar/neovim-http-api-plugin',\n  requires = { 'esensar/neovim-java-plugin-host' },\n  run = { 'mkdir -p rplugin/hosted-jar \u0026\u0026 mvn package \u0026\u0026 cp target/*.jar rplugin/hosted-jar/' }\n}\n```\n\nFor this way to work, `require(\"java_plugin_host\").setup()` needs to be called and `rplugins.load_hosted` needs to be true (it is true by default). This is one of the easiest ways to install the plugin and it also supports any custom documentation added in `doc/` directory.\n\n#### Java plugin host\n\nIf `esensar/neovim-java-plugin-host` is already installed and used, this plugin can be added to its configuration (in this case JAR will be downloaded from specified repository):\n```lua\nrequire(\"java_plugin_host\").setup {\n  -- ...\n  common_host = {\n    -- ...\n    hosted_plugins = {\n      -- ...\n      {\n        group_id = \"com.ensarsarajcic.neovim.http\",\n        artifact_id = \"neovim-http-api-plugin\",\n        version = \"0.1.0\"\n      },\n      -- ...\n    },\n    custom_repositories = {\n      -- ...\n      -- This is optional in case of this plugin, since it is also deployed to maven central\n      -- But usually, this provides an easier way for plugin authors to deploy their plugins, directly to GitHub package repository\n      {\n        id = \"github\",\n        url = \"https://maven.pkg.github.com/esensar/neovim-http-api-plugin\"\n      }\n      -- ...\n    }\n    -- ...\n  }\n  -- ...\n}\n```\n**NOTE**: To use custom repositories (GitHub), [GitHub Packages Auth](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry) needs to be set up.\n\n### Starting the API\n\nAPI can be started with a request, that can be made using `java_plugin_host`:\n```lua\nrequire(\"java_plugin_host\").request(\n  \"com.ensarsarajcic.neovim.http.NeovimHttpApi.start\",\n  {\n    -- Port is required!\n    port = 8080,\n    -- Optionally define thread count for HTTP handler\n    -- thread_count = 4,\n    -- Optionally define root URL\n    -- root_url = \"/\",\n    -- Optionally define request timeout in millisecond\n    -- request_timeout_ms = 10000\n  }\n)\n```\n\nAfter this API should be available on `http://localhost:8080`.\n\n### Calling the API\n\nExample calls:\n```\ncurl \"http://localhost:8080?opts.builtin=false\"\n\n{\"AbortDispatch\":{\"name\":\"AbortDispatch\",\"definition\":\"execute dispatch#abort_command(\u003cbang\u003e0, \u003cq-args\u003e)\",\"script_id\":84,\"bang\":true,\"bar\":true,\"register\":false,\"keepscript\":false,\"nargs\":\"*\",\"complete\":null,\"complete_arg\":null,\"count\":null,\"range\":null,\"addr\":null},\"...}\n\ncurl \"http://localhost:8080/buf/0/name\"\n\n\"/home/user/.cache/nvim/java_plugin_host/common_host.log\"\n\ncurl \"http://localhost:8080/buf/0/name\" -X PUT -d '{\"name\": \"new_name\"}'\n\nnull\n\ncurl \"http://localhost:8080/buf/0/name\"\n\n\"/home/user/.cache/nvim/java_plugin_host/new_name\"\n```\n\nAPI supports `GET`, `PUT`, `DELETE` and `POST` requests. Command name is generated by adding `nvim_` prefix to the request path, as well as additional prefix based on used method (`GET = get_`, `PUT = set_` and `DELETE = del_` - special case is `nvim_buf_delete`). Methods for buffers, windows and tabpages are supported as well, following the format:\n```\nhttp://localhost:8080/{buf,window,tabpage}/{id}/method_name\n```\nAs seen in the example above - `http://localhost:8080/buf/0/name` = `nvim_get_buf_name` for buffer 0\n\nArguments can be passed in query params (suitable for `GET` requests) and body too. Body should be in JSON using names as defined by `nvim_get_api_info`, and query should use the same names, using `.` to set nested fields - example: `http://localhost:8080?opts.builtin=false`\n\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesensar%2Fneovim-http-api-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesensar%2Fneovim-http-api-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesensar%2Fneovim-http-api-plugin/lists"}