mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
plugins/hop: init
This commit is contained in:
parent
f1df154834
commit
c86a0aca63
3 changed files with 398 additions and 0 deletions
112
tests/test-sources/plugins/utils/hop.nix
Normal file
112
tests/test-sources/plugins/utils/hop.nix
Normal file
|
@ -0,0 +1,112 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.hop.enable = true;
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.hop = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
keys = "asdghklqwertyuiopzxcvbnmfj";
|
||||
quit_key = "<Esc>";
|
||||
reverse_distribution = false;
|
||||
x_bias = 10;
|
||||
teasing = true;
|
||||
virtual_cursor = true;
|
||||
jump_on_sole_occurrence = true;
|
||||
case_insensitive = false;
|
||||
dim_unmatched = true;
|
||||
direction = "require'hop.hint'.HintDirection.BEFORE_CURSOR";
|
||||
hint_position = "require'hop.hint'.HintPosition.BEGIN";
|
||||
hint_type = "require'hop.hint'.HintType.OVERLAY";
|
||||
match_mappings = ["zh" "zh_sc"];
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "f";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require'hop'.hint_char1({
|
||||
direction = require'hop.hint'.HintDirection.AFTER_CURSOR,
|
||||
current_line_only = true
|
||||
})
|
||||
end
|
||||
'';
|
||||
options.remap = true;
|
||||
}
|
||||
{
|
||||
key = "F";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require'hop'.hint_char1({
|
||||
direction = require'hop.hint'.HintDirection.BEFORE_CURSOR,
|
||||
current_line_only = true
|
||||
})
|
||||
end
|
||||
'';
|
||||
options.remap = true;
|
||||
}
|
||||
{
|
||||
key = "t";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require'hop'.hint_char1({
|
||||
direction = require'hop.hint'.HintDirection.AFTER_CURSOR,
|
||||
current_line_only = true,
|
||||
hint_offset = -1
|
||||
})
|
||||
end
|
||||
'';
|
||||
options.remap = true;
|
||||
}
|
||||
{
|
||||
key = "T";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require'hop'.hint_char1({
|
||||
direction = require'hop.hint'.HintDirection.BEFORE_CURSOR,
|
||||
current_line_only = true,
|
||||
hint_offset = 1
|
||||
})
|
||||
end
|
||||
'';
|
||||
options.remap = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.hop = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
keys = "asdghklqwertyuiopzxcvbnmfj";
|
||||
quit_key = "<Esc>";
|
||||
perm_method = "require'hop.perm'.TrieBacktrackFilling";
|
||||
reverse_distribution = false;
|
||||
x_bias = 10;
|
||||
teasing = true;
|
||||
virtual_cursor = true;
|
||||
jump_on_sole_occurrence = true;
|
||||
ignore_injections = false;
|
||||
case_insensitive = true;
|
||||
create_hl_autocmd = true;
|
||||
dim_unmatched = true;
|
||||
direction = null;
|
||||
hint_position = "require'hop.hint'.HintPosition.BEGIN";
|
||||
hint_type = "require'hop.hint'.HintType.OVERLAY";
|
||||
hint_offset = 0;
|
||||
current_line_only = false;
|
||||
uppercase_labels = false;
|
||||
yank_register = "";
|
||||
extensions = null;
|
||||
multi_windows = false;
|
||||
excluded_filetypes = [];
|
||||
match_mappings = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue