{"id":20047029,"url":"https://github.com/bartste/nvim-khalorg","last_synced_at":"2025-05-05T10:31:10.948Z","repository":{"id":160912098,"uuid":"628319720","full_name":"BartSte/nvim-khalorg","owner":"BartSte","description":"Neovim plugin for khalorg","archived":false,"fork":false,"pushed_at":"2025-02-21T21:32:39.000Z","size":22,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T02:48:59.976Z","etag":null,"topics":["davmail","khal","khalorg","neovim","org-mode","orgmode-nvim","vdirsyncer"],"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/BartSte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2023-04-15T15:24:10.000Z","updated_at":"2025-02-21T21:32:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"97484c9e-5d3a-40c0-bd23-737b0dddb052","html_url":"https://github.com/BartSte/nvim-khalorg","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartSte%2Fnvim-khalorg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartSte%2Fnvim-khalorg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartSte%2Fnvim-khalorg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartSte%2Fnvim-khalorg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BartSte","download_url":"https://codeload.github.com/BartSte/nvim-khalorg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252480416,"owners_count":21754773,"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":["davmail","khal","khalorg","neovim","org-mode","orgmode-nvim","vdirsyncer"],"created_at":"2024-11-13T11:33:05.099Z","updated_at":"2025-05-05T10:31:10.942Z","avatar_url":"https://github.com/BartSte.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README - nvim-khalorg\n\n[Click here for the GitHub page.](https://github.com/BartSte/nvim-khalorg)\n\nPlugin to interact with `khalorg`: an interface between the org mode and the\n`khal` cli calendar. If you never heard of `khalorg`, take a look at the\n[GitHub page](https://github.com/BartSte/khalorg)\n\n# Demo\n\nThe demo below demonstrates the following features using this neovim plugin:\n\n- `khalorg new`: convert an org agenda item into a `khal` agenda item.\n- `khalorg list`: convert a `khal` agenda item into an org agenda item.\n- `khalorg edit`: edit an existing `khal` agenda item with org mode.\n- `khalorg delete`: delete an existing `khal` item.\n\n![neovim-plugin](https://github.com/BartSte/khalorg/blob/main/demo/neovim-plugin.gif?raw=true)\n\n# CONTENTS\n\n1. [Introduction](#introduction)\n2. [Installation](#installation)\n3. [Configuration](#configuration)\n4. [Usage](#usage)\n5. [Functions](#functions)\n6. [Troubleshooting](#troubleshooting)\n7. [Contributing](#contributing)\n8. [License](#license)\n\n# Introduction\n\nThe `nvim-khalorg` plugin sends folds in an org document to khalorg through\nstdin. The functions are exposed through `nvim-orgmode` its custom export option.\n\n# Installation\n\nInstall using your favorite plugin manager. For example packer:\n\n```lua\nuse {'nvim-treesitter/nvim-treesitter'}\nuse {'nvim-orgmode/orgmode'}\nuse {'BartSte/nvim-khalorg'}\n```\n\nwhere `nvim-treesitter` and `nvim-orgmode` are required. Also, make sure you\ninstalled `khalorg`, which can be found here: https://github.com/BartSte/khalorg\n\n# Configuration\n\nThe following configuration options are available through the `require(\"khalorg\").setup`\nfunction:\n\n- calendar: The name of the calendar to use (default: 'default').\n\nConfiguring `nvim-khalorg` can be done by placing the following in your\n`init.lua`:\n\n```lua\nrequire(\"khalorg\").setup({\n    calendar = 'my_calendar'\n})\n```\n\nwhere you need to replace `'my_calendar'` with the `khal` calendar you want to\nuse. You can add the export functions of `nvim-khalorg` to `nvim-orgmode` by\nadding the following to your `init.lua`:\n\n```lua\nlocal khalorg = require('khalorg')\norgmode.setup_ts_grammar()\norgmode.setup({\n    org_custom_exports = {\n        n = { label = 'Add a new khal item', action = khalorg.new },\n        d = { label = 'Delete a khal item', action = khalorg.delete },\n        e = { label = 'Edit properties of a khal item', action = khalorg.edit },\n        E = { label = 'Edit properties \u0026 dates of a khal item', action = khalorg.edit_all }\n    }\n})\n```\n\n# Usage\n\nAfter configuring `nvim-khalorg` as is described above, you can access them\nthrough `orgmode-org_export` (default mapping: `\u003cleader\u003eoe`). More information\ncan be found by running `:help orgmode-org_export`.\n\n# Functions\n\nThe following functions are provided that send a fold in an org file to a\nkhalorg command through stdin:\n\n- `require(\"khalorg\").new()`: add a new item to khal.\n- `require(\"khalorg\").delete()`: delete a khal item.\n- `require(\"khalorg\").edit_props()`: edit properties of a khal item, the dates are not updated.\n- `require(\"khalorg\").edit_all()`: edit properties of a khal item together with the dates.\n\nThe following function is used to create the functions above and can be used to\nmake your own khalorg export functions.\n\n- `require(\"khalorg\").make_exporter(\u003ckhalorg_command\u003e)`:  \n  Returns a function that, when called, does the following:\n  1. Get the current fold.\n  2. Get the start and end line of the fold.\n  3. Get the text of the fold.\n  4. Send the text of the fold to `\u003ckhalorg_command\u003e` through stdin.\n\nThe example below shows how to use `khalorg.make_exporter` function to create\nthe `khalorg.new` function:\n\n```lua\nnew = khalorg.make_exporter('khalorg new my_calendar')\n```\n\n# Troubleshooting\n\nIf you encounter any issues, please report them on the issue tracker at:\n[nvim-khalorg issues](https://github.com/BartSte/nvim-khalorg/issues)\n\nIf you think the issue arises from khalorg instead of nvim-khalorg, please\nreport them here: [khalorg issues](https://github.com/BartSte/khalorg/issues)\n\n# Contributing\n\nContributions are welcome! Please see [CONTRIBUTING](./CONTRIBUTING.md) for\nmore information.\n\n# License\n\nDistributed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartste%2Fnvim-khalorg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartste%2Fnvim-khalorg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartste%2Fnvim-khalorg/lists"}