feat(clipboard): allow overriding clipboard and document OSC52 example#280
Merged
linrongbin16 merged 7 commits intolinrongbin16:masterfrom Oct 28, 2025
Merged
Conversation
Owner
|
This feature looks great, thank you, will take a look later |
Owner
|
I will fix the lint issue in ci. Done in e4cdebb |
lua/gitlinker/actions.lua
Outdated
|
|
||
| local clipboard_override = require('gitlinker.configs').get()['clipboard_override'] | ||
| if clipboard_override then | ||
| M.clipboard = clipboard_override |
Owner
There was a problem hiding this comment.
hi @kraftnix ,
This part is like a cycle-dependency between "gitlinker.actions" and "gitlinker.configs".
I moved this part to "setup" here: https://github.com/linrongbin16/gitlinker.nvim/pull/280/files#diff-e85b0a73f385d3b9be62752dbc0afd2ca8eba8b75c12d7667a5514b8b35755ee
Contributor
Author
There was a problem hiding this comment.
Looks good! I wasn't quite sure where to put the override when testing before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unlike the original parent of this fork, it is not currently possible to use a different copy/clipboard command (which used to be implemented via
action_callback).This PR adds a way to override the default copy command, which can be used to add OSC52 support (or use a specific clipboard program like wl-copy).
Test Platforms
Test Hosts
Test Functions
GitLink(!)to copy git link (or open in browser).GitLink(!) blameto copy the/blamelink (or open in browser).GitLink(!) default_branchto open the/main//masterlink in browser (or open in browser).GitLink(!) current_branchto open the current branch link in browser (or open in browser).