mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
Strip `lib` from `lib.types.` Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com> Fix settingsExample expression Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk> Use '-version of options for better examples Fix indentation in example lua code Remove trailing space Replace use of literalLua with strings Revert to use literalLua Use lib.mkDefault Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
64 lines
1.3 KiB
Nix
64 lines
1.3 KiB
Nix
{
|
|
empty = {
|
|
plugins.gx.enable = true;
|
|
};
|
|
|
|
default = {
|
|
plugins.gx = {
|
|
enable = true;
|
|
|
|
disableNetrwGx = true;
|
|
|
|
settings = {
|
|
open_browser_app = null;
|
|
open_browser_args = [ ];
|
|
handlers = { };
|
|
handler_options = {
|
|
search_engine = "google";
|
|
select_for_search = false;
|
|
git_remotes = [
|
|
"upstream"
|
|
"origin"
|
|
];
|
|
git_remote_push = false;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
example = {
|
|
plugins.gx = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
handlers = {
|
|
rust = {
|
|
name = "rust";
|
|
filetype = [ "toml" ];
|
|
filename = "Cargo.toml";
|
|
handle.__raw = ''
|
|
function(mode, line, _)
|
|
local crate = require("gx.helper").find(line, mode, "(%w+)%s-=%s")
|
|
|
|
if crate then
|
|
return "https://crates.io/crates/" .. crate
|
|
end
|
|
end
|
|
'';
|
|
};
|
|
};
|
|
handler_options = {
|
|
search_engine = "duckduckgo";
|
|
git_remotes.__raw = ''
|
|
function(fname)
|
|
if fname:match("myproject") then
|
|
return { "mygit" }
|
|
end
|
|
return { "upstream", "origin" }
|
|
end
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|