mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 01:08:43 +02:00
tests/plugins: refactor (#235)
This commit is contained in:
parent
89f54be73a
commit
db5061b4db
38 changed files with 485 additions and 744 deletions
52
tests/test-sources/plugins/languages/rust-tools.nix
Normal file
52
tests/test-sources/plugins/languages/rust-tools.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
# Empty configuration
|
||||
empty = {
|
||||
plugins.rust-tools.enable = true;
|
||||
};
|
||||
|
||||
# All the upstream default options of rust-tools
|
||||
defaults = {
|
||||
plugins.rust-tools = {
|
||||
enable = true;
|
||||
executor = "termopen";
|
||||
onInitialized = null;
|
||||
reloadWorkspaceFromCargoToml = true;
|
||||
inlayHints = {
|
||||
auto = true;
|
||||
onlyCurrentLine = false;
|
||||
showParameterHints = true;
|
||||
parameterHintsPrefix = "<- ";
|
||||
otherHintsPrefix = "=> ";
|
||||
maxLenAlign = false;
|
||||
maxLenAlignPadding = 1;
|
||||
rightAlign = false;
|
||||
rightAlignPadding = 7;
|
||||
highlight = "Comment";
|
||||
};
|
||||
hoverActions = {
|
||||
border = [
|
||||
["╭" "FloatBorder"]
|
||||
["─" "FloatBorder"]
|
||||
["╮" "FloatBorder"]
|
||||
["│" "FloatBorder"]
|
||||
["╯" "FloatBorder"]
|
||||
["─" "FloatBorder"]
|
||||
["╰" "FloatBorder"]
|
||||
["│" "FloatBorder"]
|
||||
];
|
||||
maxWidth = null;
|
||||
maxHeight = null;
|
||||
autoFocus = false;
|
||||
};
|
||||
crateGraph = {
|
||||
backend = "x11";
|
||||
output = null;
|
||||
full = true;
|
||||
enabledGraphvizBackends = null;
|
||||
};
|
||||
server = {
|
||||
standalone = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
46
tests/test-sources/plugins/languages/sniprun.nix
Normal file
46
tests/test-sources/plugins/languages/sniprun.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.sniprun.enable = true;
|
||||
};
|
||||
|
||||
default = {
|
||||
plugins.sniprun = {
|
||||
enable = true;
|
||||
selectedInterpreters = [];
|
||||
replEnable = [];
|
||||
replDisable = [];
|
||||
interpreterOptions = {};
|
||||
display = ["Classic" "VirtualTextOk"];
|
||||
liveDisplay = ["VirtualTextOk"];
|
||||
displayOptions = {
|
||||
terminalWidth = 45;
|
||||
notificationTimeout = 5;
|
||||
};
|
||||
showNoOutput = ["Classic" "TempFloatingWindow"];
|
||||
snipruncolors = {
|
||||
SniprunVirtualTextOk = {
|
||||
bg = "#66eeff";
|
||||
fg = "#000000";
|
||||
ctermbg = "Cyan";
|
||||
ctermfg = "Black";
|
||||
};
|
||||
SniprunFloatingWinOk = {
|
||||
fg = "#66eeff";
|
||||
ctermfg = "Cyan";
|
||||
};
|
||||
SniprunVirtualTextErr = {
|
||||
bg = "#881515";
|
||||
fg = "#000000";
|
||||
ctermbg = "DarkRed";
|
||||
ctermfg = "Black";
|
||||
};
|
||||
SniprunFloatingWinErr = {
|
||||
fg = "#881515";
|
||||
ctermfg = "DarkRed";
|
||||
};
|
||||
};
|
||||
liveModeToggle = "off";
|
||||
borders = "single";
|
||||
};
|
||||
};
|
||||
}
|
29
tests/test-sources/plugins/languages/treesitter.nix
Normal file
29
tests/test-sources/plugins/languages/treesitter.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{pkgs}: {
|
||||
empty = {
|
||||
plugins.treesitter.enable = true;
|
||||
};
|
||||
|
||||
nonix = {
|
||||
# TODO: See if we can build parsers (legacy way)
|
||||
tests.dontRun = true;
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
nixGrammars = false;
|
||||
};
|
||||
};
|
||||
|
||||
# This needs a custom input
|
||||
# custom = {
|
||||
# plugins.treesitter = {
|
||||
# enable = true;
|
||||
# nixGrammars = true;
|
||||
# grammarPackages = [
|
||||
# (build-ts.lib.buildGrammar pkgs {
|
||||
# language = "gleam";
|
||||
# version = "0.25.0";
|
||||
# source = gleam;
|
||||
# })
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue