{"id":13816650,"url":"https://github.com/phenax/neorg-hop-extras","last_synced_at":"2025-04-14T15:35:33.526Z","repository":{"id":182017613,"uuid":"667804698","full_name":"phenax/neorg-hop-extras","owner":"phenax","description":"Neorg plugin to extend the functionality of links","archived":false,"fork":false,"pushed_at":"2024-08-17T11:30:49.000Z","size":41,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T04:30:34.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phenax.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":"2023-07-18T10:40:14.000Z","updated_at":"2024-12-15T21:10:30.000Z","dependencies_parsed_at":"2024-01-13T11:34:24.966Z","dependency_job_id":"6fa6aca3-4737-4fbe-af6c-a2eb29fc5537","html_url":"https://github.com/phenax/neorg-hop-extras","commit_stats":null,"previous_names":["phenax/neorg-hop-extras"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Fneorg-hop-extras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Fneorg-hop-extras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Fneorg-hop-extras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Fneorg-hop-extras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phenax","download_url":"https://codeload.github.com/phenax/neorg-hop-extras/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248906954,"owners_count":21181250,"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":[],"created_at":"2024-08-04T05:00:48.715Z","updated_at":"2025-04-14T15:35:33.488Z","avatar_url":"https://github.com/phenax.png","language":"Lua","funding_links":[],"categories":["Neorg Modules"],"sub_categories":[],"readme":"# neorg-hop-extras\nNeorg plugin to extend the functionality of links\n\n\u003e NOTE: Includes changes removing neorgs keybindings api\n\n## Install\n\n#### For [packer](https://github.com/wbthomason/packer.nvim) users -\n```lua\n  use {\n    'nvim-neorg/neorg',\n    -- ...\n    requires = {\n      -- ...\n      {'phenax/neorg-hop-extras'},\n    }\n  }\n```\n\n\n#### Basic config\n```lua\nrequire('neorg').setup {\n  load = {\n    ['external.hop-extras'] = {},\n  },\n}\n```\n\n#### Custom keybinding\n```lua\nrequire('neorg').setup {\n  load = {\n    -- ...\n    ['external.hop-extras'] = {\n      config = {\n        bind_enter_key = false,\n      }\n    },\n  },\n}\n\nvim.keymap.set('n', '\u003cleader\u003egl', '\u003cplug\u003e(neorg.external.hop-extras.hop-link)')\n```\n\n\n## Usage\n\n#### Commands as links\nRun an arbitrary vim command when a link is activated\n\n```neorg\n- View yesterday's journal {+Neorg journal yesterday}[Yesterday] - Opens yesterday's journal\n- Log the time using timelog module {+Neorg timelog insert routine}[Log routine] (requires https://github.com/phenax/neorg-timelog)\n- Run shell commands {+!ls}\n\n* Counter example\n  - count: 28\n  - Increment: {+/-\\s*count:/ | call feedkeys(\"\\\u003cC-a\u003e\\\u003cC-o\u003e\")}\n  - Decrement: {+/-\\s*count:/ | call feedkeys(\"\\\u003cC-x\u003e\\\u003cC-o\u003e\")}\n```\n\n#### Aliases for links\nUse aliases for links\n\n```neorg\n- Github url - {\u0026gh phenax/neorg-timelog}\n- Npm package link - {\u0026npm react}\n- Rust package link - {\u0026crates serde}\n- Dart package link - {\u0026pub serde}\n- Twitter user @Neovim - {\u0026tw Neovim} (Custom alias defined below)\n```\n\nTo define the custom alias, use -\n```lua\nrequire('neorg').setup {\n  load = {\n    -- ...\n    ['external.hop-extras'] = {\n      config = {\n        aliases = {\n          tw = 'https://twitter.com/{}'\n        },\n      },\n    },\n  },\n}\n```\n\n#### Ask for confirmation before opening link\nAsk for confirmation (uses `vim.fn.confirm`) before activating a link\n\n```neorg\n  - Asks for confirmation before opening external link - {! https://example.com}\n  - Confirm before opening alias - {! \u0026npm react}\n  - Confirm before running command {! +echo \"Dangerous commands need confirmation\"}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenax%2Fneorg-hop-extras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphenax%2Fneorg-hop-extras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenax%2Fneorg-hop-extras/lists"}