mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 01:08:43 +02:00
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
|
_: {
|
||
|
empty = {
|
||
|
plugins.markview.enable = true;
|
||
|
};
|
||
|
|
||
|
defaults = {
|
||
|
plugins.markview = {
|
||
|
enable = true;
|
||
|
|
||
|
settings = {
|
||
|
buf_ignore = [ "nofile" ];
|
||
|
mode = [
|
||
|
"n"
|
||
|
"no"
|
||
|
];
|
||
|
hybrid_modes = [ ];
|
||
|
callback = {
|
||
|
on_enable = # Lua
|
||
|
''
|
||
|
function(buf, win)
|
||
|
vim.wo[window].conceallevel = 2;
|
||
|
vim.wo[window].concealcursor = "nc";
|
||
|
end
|
||
|
'';
|
||
|
on_disable = # Lua
|
||
|
''
|
||
|
function(buf, win)
|
||
|
vim.wo[window].conceallevel = 0;
|
||
|
vim.wo[window].concealcursor = "";
|
||
|
end
|
||
|
'';
|
||
|
on_mode_change = # Lua
|
||
|
''
|
||
|
function(buf, win, mode)
|
||
|
if vim.list_contains(markview.configuration.modes, mode) then
|
||
|
vim.wo[window].conceallevel = 2;
|
||
|
else
|
||
|
vim.wo[window].conceallevel = 0;
|
||
|
end
|
||
|
end
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|