mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-28 03:20:08 +02:00
tests/plugins: refactor (#235)
This commit is contained in:
parent
89f54be73a
commit
db5061b4db
38 changed files with 485 additions and 744 deletions
78
tests/test-sources/plugins/bufferlines/barbar.nix
Normal file
78
tests/test-sources/plugins/bufferlines/barbar.nix
Normal file
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.barbar.enable = true;
|
||||
};
|
||||
|
||||
keymappings = {
|
||||
plugins.barbar = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
silent = true;
|
||||
|
||||
next = "<TAB>";
|
||||
previous = "<S-TAB>";
|
||||
close = "<C-w>";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# All the upstream default options of barbar
|
||||
defaults = {
|
||||
plugins.barbar = {
|
||||
animations = true;
|
||||
autoHide = false;
|
||||
tabpages = true;
|
||||
closable = true;
|
||||
clickable = true;
|
||||
diagnostics = {
|
||||
error = {
|
||||
enable = false;
|
||||
icon = "Ⓧ ";
|
||||
};
|
||||
warn = {
|
||||
enable = false;
|
||||
icon = "⚠️ ";
|
||||
};
|
||||
info = {
|
||||
enable = false;
|
||||
icon = "ⓘ ";
|
||||
};
|
||||
hint = {
|
||||
enable = false;
|
||||
icon = "💡";
|
||||
};
|
||||
};
|
||||
excludeFileTypes = [];
|
||||
excludeFileNames = [];
|
||||
hide = {
|
||||
extensions = false;
|
||||
inactive = false;
|
||||
alternate = false;
|
||||
current = false;
|
||||
visible = false;
|
||||
};
|
||||
highlightAlternate = false;
|
||||
highlightInactiveFileIcons = false;
|
||||
highlightVisible = true;
|
||||
icons = {
|
||||
enable = true;
|
||||
customColors = false;
|
||||
separatorActive = "▎";
|
||||
separatorInactive = "▎";
|
||||
separatorVisible = "▎";
|
||||
closeTab = "";
|
||||
closeTabModified = "●";
|
||||
pinned = "車";
|
||||
};
|
||||
insertAtEnd = false;
|
||||
insertAtStart = false;
|
||||
maximumPadding = 4;
|
||||
minimumPadding = 1;
|
||||
maximumLength = 30;
|
||||
semanticLetters = true;
|
||||
letters = "asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP";
|
||||
noNameTitle = null;
|
||||
};
|
||||
};
|
||||
}
|
5
tests/test-sources/plugins/colorschemes/gruvbox.nix
Normal file
5
tests/test-sources/plugins/colorschemes/gruvbox.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
empty = {
|
||||
colorschemes.gruvbox.enable = true;
|
||||
};
|
||||
}
|
36
tests/test-sources/plugins/colorschemes/tokyonight.nix
Normal file
36
tests/test-sources/plugins/colorschemes/tokyonight.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
# Empty configuration
|
||||
empty = {
|
||||
colorschemes.tokyonight.enable = true;
|
||||
};
|
||||
|
||||
# All the upstream default options of tokyonight
|
||||
defaults = {
|
||||
colorschemes.tokyonight = {
|
||||
enable = true;
|
||||
|
||||
style = "storm";
|
||||
# Not implemented
|
||||
# lightStyle = "day";
|
||||
transparent = false;
|
||||
terminalColors = true;
|
||||
styles = {
|
||||
comments = {italic = true;};
|
||||
keywords = {italic = true;};
|
||||
functions = {};
|
||||
variables = {};
|
||||
sidebars = "dark";
|
||||
floats = "dark";
|
||||
};
|
||||
sidebars = ["qf" "help"];
|
||||
dayBrightness = 0.3;
|
||||
hideInactiveStatusline = false;
|
||||
dimInactive = false;
|
||||
lualineBold = false;
|
||||
# Not implemented
|
||||
# onColors = {__raw = "function(colors) end";};
|
||||
# Not implemented
|
||||
# onHighlights = {__raw = "function(colors) end";};
|
||||
};
|
||||
};
|
||||
}
|
34
tests/test-sources/plugins/completion/lspkind.nix
Normal file
34
tests/test-sources/plugins/completion/lspkind.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
# Empty configuration
|
||||
empty = {
|
||||
plugins.lspkind.enable = true;
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers.clangd.enable = true;
|
||||
};
|
||||
nvim-cmp.enable = true;
|
||||
lspkind.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# All the upstream default options of lspkind
|
||||
defaults = {
|
||||
plugins.lspkind = {
|
||||
enable = true;
|
||||
mode = "symbol_text";
|
||||
preset = "codicons";
|
||||
symbolMap = null;
|
||||
cmp = {
|
||||
enable = true;
|
||||
maxWidth = 50;
|
||||
ellipsisChar = "...";
|
||||
menu = null;
|
||||
after = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
113
tests/test-sources/plugins/completion/nvim-cmp.nix
Normal file
113
tests/test-sources/plugins/completion/nvim-cmp.nix
Normal file
|
@ -0,0 +1,113 @@
|
|||
{
|
||||
# Empty configuration
|
||||
empty = {
|
||||
plugins.nvim-cmp.enable = true;
|
||||
};
|
||||
|
||||
snippetEngine = {
|
||||
plugins.nvim-cmp = {
|
||||
enable = true;
|
||||
snippet.expand = "luasnip";
|
||||
};
|
||||
};
|
||||
|
||||
# All the upstream default options of nvim-cmp
|
||||
defaults = {
|
||||
plugins.nvim-cmp = {
|
||||
enable = true;
|
||||
|
||||
performance = {
|
||||
debounce = 60;
|
||||
throttle = 30;
|
||||
fetchingTimeout = 500;
|
||||
};
|
||||
|
||||
preselect = "Item";
|
||||
|
||||
snippet = {
|
||||
expand.__raw = ''
|
||||
function(_)
|
||||
error('snippet engine is not configured.')
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
completion = {
|
||||
keywordLength = 1;
|
||||
keywordPattern = ''\%(-\?\d\+\%(\.\d\+\)\?\|\h\w*\%(-\w*\)*\)'';
|
||||
autocomplete = ["TextChanged"];
|
||||
completeopt = "menu,menuone,noselect";
|
||||
};
|
||||
|
||||
confirmation = {
|
||||
getCommitCharacters = ''
|
||||
function(commit_characters)
|
||||
return commit_characters
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
formatting = {
|
||||
expandableIndicator = true;
|
||||
fields = ["abbr" "kind" "menu"];
|
||||
format = ''
|
||||
function(_, vim_item)
|
||||
return vim_item
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
matching = {
|
||||
disallowFuzzyMatching = false;
|
||||
disallowFullfuzzyMatching = false;
|
||||
disallowPartialFuzzyMatching = true;
|
||||
disallowPartialMatching = false;
|
||||
disallowPrefixUnmatching = false;
|
||||
};
|
||||
|
||||
sorting = {
|
||||
priorityWeight = 2;
|
||||
comparators = [
|
||||
"offset"
|
||||
"exact"
|
||||
"score"
|
||||
"recently_used"
|
||||
"locality"
|
||||
"kind"
|
||||
"length"
|
||||
"order"
|
||||
];
|
||||
};
|
||||
|
||||
sources = [];
|
||||
|
||||
experimental = {
|
||||
ghost_text = false;
|
||||
};
|
||||
|
||||
view = {
|
||||
entries = {
|
||||
name = "custom";
|
||||
selection_order = "top_down";
|
||||
};
|
||||
};
|
||||
|
||||
window = {
|
||||
completion = {
|
||||
border = ["" "" "" "" "" "" "" ""];
|
||||
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuSel,Search:None";
|
||||
scrolloff = 0;
|
||||
colOffset = 0;
|
||||
sidePadding = 1;
|
||||
scrollbar = true;
|
||||
};
|
||||
documentation = {
|
||||
maxHeight = "math.floor(40 * (40 / vim.o.lines))";
|
||||
maxWidth = "math.floor((40 * 2) * (vim.o.columns / (40 * 2 * 16 / 9)))";
|
||||
border = ["" "" "" " " "" "" "" " "];
|
||||
winhighlight = "FloatBorder:NormalFloat";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
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;
|
||||
# })
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
}
|
39
tests/test-sources/plugins/null-ls.nix
Normal file
39
tests/test-sources/plugins/null-ls.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
# Empty configuration
|
||||
empty = {
|
||||
plugins.null-ls.enable = true;
|
||||
};
|
||||
|
||||
# Broken:
|
||||
# error: The option `plugins.null-ls.sources.formatting.beautysh' does not exist.
|
||||
#
|
||||
# beautysh = {
|
||||
# plugins.null-ls = {
|
||||
# enable = true;
|
||||
# sources.formatting.beautysh.enable = true;
|
||||
# };
|
||||
# };
|
||||
|
||||
default = {
|
||||
plugins.null-ls = {
|
||||
enable = true;
|
||||
border = null;
|
||||
cmd = ["nvim"];
|
||||
debounce = 250;
|
||||
debug = false;
|
||||
defaultTimeout = 5000;
|
||||
diagnosticConfig = null;
|
||||
diagnosticsFormat = "#{m}";
|
||||
fallbackSeverity = "error";
|
||||
logLevel = "warn";
|
||||
notifyFormat = "[null-ls] %s";
|
||||
onAttach = null;
|
||||
onInit = null;
|
||||
onExit = null;
|
||||
rootDir = null;
|
||||
shouldAttach = null;
|
||||
tempDir = null;
|
||||
updateInInsert = false;
|
||||
};
|
||||
};
|
||||
}
|
17
tests/test-sources/plugins/nvim-lsp/inc-rename.nix
Normal file
17
tests/test-sources/plugins/nvim-lsp/inc-rename.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.inc-rename.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.inc-rename = {
|
||||
enable = true;
|
||||
cmdName = "IncRename";
|
||||
hlGroup = "Substitute";
|
||||
previewEmptyName = false;
|
||||
showMessage = true;
|
||||
inputBufferType = null;
|
||||
postHook = null;
|
||||
};
|
||||
};
|
||||
}
|
5
tests/test-sources/plugins/nvim-lsp/lsp-lines.nix
Normal file
5
tests/test-sources/plugins/nvim-lsp/lsp-lines.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.lsp-lines.enable = true;
|
||||
};
|
||||
}
|
71
tests/test-sources/plugins/nvim-lsp/nvim-lsp.nix
Normal file
71
tests/test-sources/plugins/nvim-lsp/nvim-lsp.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.lsp.enable = true;
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
silent = true;
|
||||
diagnostic = {
|
||||
"<leader>k" = "goto_prev";
|
||||
"<leader>j" = "goto_next";
|
||||
};
|
||||
|
||||
lspBuf = {
|
||||
"gd" = "definition";
|
||||
"gD" = "references";
|
||||
"gt" = "type_definition";
|
||||
"gi" = "implementation";
|
||||
"K" = "hover";
|
||||
};
|
||||
};
|
||||
|
||||
servers = {
|
||||
bashls.enable = true;
|
||||
clangd.enable = true;
|
||||
nil_ls.enable = true;
|
||||
rust-analyzer.enable = true;
|
||||
pylsp = {
|
||||
enable = true;
|
||||
filetypes = ["python"];
|
||||
autostart = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
all-servers = {
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
|
||||
servers = {
|
||||
astro.enable = true;
|
||||
bashls.enable = true;
|
||||
clangd.enable = true;
|
||||
cssls.enable = true;
|
||||
dartls.enable = true;
|
||||
denols.enable = true;
|
||||
eslint.enable = true;
|
||||
elixirls.enable = true;
|
||||
gopls.enable = true;
|
||||
hls.enable = true;
|
||||
html.enable = true;
|
||||
jsonls.enable = true;
|
||||
lua-ls.enable = true;
|
||||
nil_ls.enable = true;
|
||||
pylsp.enable = true;
|
||||
pyright.enable = true;
|
||||
rnix-lsp.enable = true;
|
||||
rust-analyzer.enable = true;
|
||||
tailwindcss.enable = true;
|
||||
texlab.enable = true;
|
||||
tsserver.enable = true;
|
||||
vuels.enable = true;
|
||||
# zls.enable = true; Broken as of 03/17/2023
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
65
tests/test-sources/plugins/nvim-lsp/trouble.nix
Normal file
65
tests/test-sources/plugins/nvim-lsp/trouble.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
# Empty configuration
|
||||
empty = {
|
||||
plugins.trouble.enable = true;
|
||||
};
|
||||
|
||||
lsp = {
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
servers.clangd.enable = true;
|
||||
};
|
||||
|
||||
plugins.trouble.enable = true;
|
||||
};
|
||||
|
||||
# All the upstream default options of trouble
|
||||
defaults = {
|
||||
plugins.trouble = {
|
||||
enable = true;
|
||||
|
||||
position = "bottom";
|
||||
height = 10;
|
||||
width = 50;
|
||||
icons = true;
|
||||
mode = "workspace_diagnostics";
|
||||
foldOpen = "";
|
||||
foldClosed = "";
|
||||
group = true;
|
||||
padding = true;
|
||||
actionKeys = {
|
||||
close = "q";
|
||||
cancel = "<esc>";
|
||||
refresh = "r";
|
||||
jump = ["<cr>" "<tab>"];
|
||||
openSplit = ["<c-x>"];
|
||||
openVsplit = ["<c-v>"];
|
||||
openTab = ["<c-t>"];
|
||||
jumpClose = ["o"];
|
||||
toggleMode = "m";
|
||||
togglePreview = "P";
|
||||
hover = "K";
|
||||
preview = "p";
|
||||
closeFolds = ["zM" "zm"];
|
||||
openFolds = ["zR" "zr"];
|
||||
toggleFold = ["zA" "za"];
|
||||
previous = "k";
|
||||
next = "j";
|
||||
};
|
||||
indentLines = true;
|
||||
autoOpen = false;
|
||||
autoClose = false;
|
||||
autoPreview = true;
|
||||
autoFold = false;
|
||||
autoJump = ["lsp_definitions"];
|
||||
signs = {
|
||||
error = "";
|
||||
warning = "";
|
||||
hint = "";
|
||||
information = "";
|
||||
other = "";
|
||||
};
|
||||
useDiagnosticSigns = false;
|
||||
};
|
||||
};
|
||||
}
|
121
tests/test-sources/plugins/pluginmanagers/packer.nix
Normal file
121
tests/test-sources/plugins/pluginmanagers/packer.nix
Normal file
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
# Empty configuration
|
||||
empty = {
|
||||
plugins.packer.enable = true;
|
||||
};
|
||||
|
||||
test = {
|
||||
plugins.packer = {
|
||||
enable = true;
|
||||
|
||||
plugins = [
|
||||
# Packer can manage itself
|
||||
"wbthomason/packer.nvim"
|
||||
|
||||
# Simple plugins can be specified as strings
|
||||
"rstacruz/vim-closer"
|
||||
|
||||
# Lazy loading:
|
||||
# Load on specific commands
|
||||
{
|
||||
name = "tpope/vim-dispatch";
|
||||
opt = true;
|
||||
cmd = ["Dispatch" "Make" "Focus" "Start"];
|
||||
}
|
||||
|
||||
# Load on an autocommand event
|
||||
{
|
||||
name = "andymass/vim-matchup";
|
||||
event = "VimEnter";
|
||||
}
|
||||
|
||||
# Load on a combination of conditions: specific filetypes or commands
|
||||
# Also run code after load (see the "config" key)
|
||||
{
|
||||
name = "w0rp/ale";
|
||||
ft = ["sh" "zsh" "bash" "c" "cpp" "cmake" "html" "markdown" "racket" "vim" "tex"];
|
||||
cmd = "ALEEnable";
|
||||
config = "vim.cmd[[ALEEnable]]";
|
||||
}
|
||||
|
||||
# Plugins can have dependencies on other plugins
|
||||
{
|
||||
name = "haorenW1025/completion-nvim";
|
||||
opt = true;
|
||||
requires = [
|
||||
{
|
||||
name = "hrsh7th/vim-vsnip";
|
||||
opt = true;
|
||||
}
|
||||
{
|
||||
name = "hrsh7th/vim-vsnip-integ";
|
||||
opt = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
# Plugins can also depend on rocks from luarocks.org:
|
||||
{
|
||||
name = "my/supercoolplugin";
|
||||
rocks = [
|
||||
"lpeg"
|
||||
{
|
||||
name = "lua-cjson";
|
||||
version = "2.1.0";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
# Local plugins can be included
|
||||
"~/projects/personal/hover.nvim"
|
||||
|
||||
# Plugins can have post-install/update hooks
|
||||
{
|
||||
name = "iamcco/markdown-preview.nvim";
|
||||
run = "cd app && yarn install";
|
||||
cmd = "MarkdownPreview";
|
||||
}
|
||||
|
||||
# Post-install/update hook with neovim command
|
||||
{
|
||||
name = "nvim-treesitter/nvim-treesitter";
|
||||
run = ":TSUpdate";
|
||||
}
|
||||
|
||||
# Post-install/update hook with call of vimscript function with argument
|
||||
{
|
||||
name = "glacambre/firenvim";
|
||||
run.__raw = ''function() vim.fn["firenvim#install"](0) end'';
|
||||
}
|
||||
|
||||
# Use specific branch, dependency and run lua file after load
|
||||
{
|
||||
name = "glepnir/galaxyline.nvim";
|
||||
branch = "main";
|
||||
config.__raw = ''function() require"statusline" end'';
|
||||
requires = ["kyazdani42/nvim-web-devicons"];
|
||||
}
|
||||
|
||||
# Use dependency and run lua function after load
|
||||
{
|
||||
name = "lewis6991/gitsigns.nvim";
|
||||
requires = ["nvim-lua/plenary.nvim"];
|
||||
config.__raw = ''function() require("gitsigns").setup() end'';
|
||||
}
|
||||
|
||||
# You can alias plugin names
|
||||
{
|
||||
name = "dracula/vim";
|
||||
as = "dracula";
|
||||
}
|
||||
];
|
||||
|
||||
# You can specify rocks in isolation
|
||||
rockPlugins = [
|
||||
"penlight"
|
||||
"lua-resty-http"
|
||||
"lpeg"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
208
tests/test-sources/plugins/ui/noice.nix
Normal file
208
tests/test-sources/plugins/ui/noice.nix
Normal file
|
@ -0,0 +1,208 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.noice.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.noice = {
|
||||
enable = true;
|
||||
cmdline = {
|
||||
enabled = true;
|
||||
view = "cmdline_popup";
|
||||
opts = {};
|
||||
format = {
|
||||
cmdline = {
|
||||
pattern = "^:";
|
||||
icon = "";
|
||||
lang = "vim";
|
||||
};
|
||||
search_down = {
|
||||
kind = "search";
|
||||
pattern = "^/";
|
||||
icon = " ";
|
||||
lang = "regex";
|
||||
};
|
||||
search_up = {
|
||||
kind = "search";
|
||||
pattern = "^%?";
|
||||
icon = " ";
|
||||
lang = "regex";
|
||||
};
|
||||
filter = {
|
||||
pattern = "^:%s*!";
|
||||
icon = "$";
|
||||
lang = "bash";
|
||||
};
|
||||
lua = {
|
||||
pattern = "^:%s*lua%s+";
|
||||
icon = "";
|
||||
lang = "lua";
|
||||
};
|
||||
help = {
|
||||
pattern = "^:%s*he?l?p?%s+";
|
||||
icon = "";
|
||||
};
|
||||
input = {};
|
||||
};
|
||||
};
|
||||
messages = {
|
||||
enabled = true;
|
||||
view = "notify";
|
||||
viewError = "notify";
|
||||
viewWarn = "notify";
|
||||
viewHistory = "messages";
|
||||
viewSearch = "virtualtext";
|
||||
};
|
||||
popupmenu = {
|
||||
enabled = true;
|
||||
backend = "nui";
|
||||
kindIcons = {};
|
||||
};
|
||||
redirect = {
|
||||
view = "popup";
|
||||
filter = {event = "msg_show";};
|
||||
};
|
||||
commands = {
|
||||
history = {
|
||||
view = "split";
|
||||
opts = {
|
||||
enter = true;
|
||||
format = "details";
|
||||
};
|
||||
filter = {
|
||||
any = [
|
||||
{event = "notify";}
|
||||
{error = true;}
|
||||
{warning = true;}
|
||||
{
|
||||
event = "msg_show";
|
||||
kind = [""];
|
||||
}
|
||||
{
|
||||
event = "lsp";
|
||||
kind = "message";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
last = {
|
||||
view = "popup";
|
||||
opts = {
|
||||
enter = true;
|
||||
format = "details";
|
||||
};
|
||||
filter = {
|
||||
any = [
|
||||
{event = "notify";}
|
||||
{error = true;}
|
||||
{warning = true;}
|
||||
{
|
||||
event = "msg_show";
|
||||
kind = [""];
|
||||
}
|
||||
{
|
||||
event = "lsp";
|
||||
kind = "message";
|
||||
}
|
||||
];
|
||||
};
|
||||
filter_opts = {count = 1;};
|
||||
};
|
||||
errors = {
|
||||
view = "popup";
|
||||
opts = {
|
||||
enter = true;
|
||||
format = "details";
|
||||
};
|
||||
filter = {error = true;};
|
||||
filter_opts = {reverse = true;};
|
||||
};
|
||||
};
|
||||
notify = {
|
||||
enabled = true;
|
||||
view = "notify";
|
||||
};
|
||||
lsp = {
|
||||
progress = {
|
||||
enabled = true;
|
||||
format = "lsp_progress";
|
||||
formatDone = "lsp_progress_done";
|
||||
throttle = 1000 / 30;
|
||||
view = "mini";
|
||||
};
|
||||
override = {
|
||||
"vim.lsp.util.convert_input_to_markdown_lines" = false;
|
||||
"vim.lsp.util.stylize_markdown" = false;
|
||||
"cmp.entry.get_documentation" = false;
|
||||
};
|
||||
hover = {
|
||||
enabled = true;
|
||||
view = null;
|
||||
opts = {};
|
||||
};
|
||||
signature = {
|
||||
enabled = true;
|
||||
autoOpen = {
|
||||
enabled = true;
|
||||
trigger = true;
|
||||
luasnip = true;
|
||||
throttle = 50;
|
||||
};
|
||||
view = null;
|
||||
opts = {};
|
||||
};
|
||||
message = {
|
||||
enabled = true;
|
||||
view = "notify";
|
||||
opts = {};
|
||||
};
|
||||
documentation = {
|
||||
view = "hover";
|
||||
opts = {
|
||||
lang = "markdown";
|
||||
replace = true;
|
||||
render = "plain";
|
||||
format = ["{message}"];
|
||||
win_options = {
|
||||
concealcursor = "n";
|
||||
conceallevel = 3;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
markdown = {
|
||||
hover = {
|
||||
"|(%S-)|" = "vim.cmd.help";
|
||||
"%[.-%]%((%S-)%)" = ''require("noice.util").open'';
|
||||
};
|
||||
highlights = {
|
||||
"|%S-|" = "@text.reference";
|
||||
"@%S+" = "@parameter";
|
||||
"^%s*(Parameters:)" = "@text.title";
|
||||
"^%s*(Return:)" = "@text.title";
|
||||
"^%s*(See also:)" = "@text.title";
|
||||
"{%S-}" = "@parameter";
|
||||
};
|
||||
};
|
||||
health = {
|
||||
checker = true;
|
||||
};
|
||||
smartMove = {
|
||||
enabled = true;
|
||||
excludedFiletypes = ["cmp_menu" "cmp_docs" "notify"];
|
||||
};
|
||||
presets = {
|
||||
bottom_search = false;
|
||||
command_palette = false;
|
||||
long_message_to_split = false;
|
||||
inc_rename = false;
|
||||
lsp_doc_border = false;
|
||||
};
|
||||
throttle = 1000 / 30;
|
||||
views = {};
|
||||
routes = {};
|
||||
status = {};
|
||||
format = {};
|
||||
};
|
||||
};
|
||||
}
|
402
tests/test-sources/plugins/utils/neo-tree.nix
Normal file
402
tests/test-sources/plugins/utils/neo-tree.nix
Normal file
|
@ -0,0 +1,402 @@
|
|||
{
|
||||
# Empty configuration
|
||||
empty = {
|
||||
plugins.neo-tree.enable = true;
|
||||
};
|
||||
|
||||
# All the upstream default options of neo-tree
|
||||
defaults = {
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
|
||||
sources = ["filesystem" "buffers" "git_status"];
|
||||
|
||||
addBlankLineAtTop = false;
|
||||
autoCleanAfterSessionRestore = false;
|
||||
closeIfLastWindow = false;
|
||||
closeFloatsOnEscapeKey = true;
|
||||
defaultSource = "filesystem";
|
||||
enableDiagnostics = true;
|
||||
enableGitStatus = true;
|
||||
enableModifiedMarkers = true;
|
||||
enableRefreshOnWrite = true;
|
||||
gitStatusAsync = true;
|
||||
gitStatusAsyncOptions = {
|
||||
batchSize = 1000;
|
||||
batchDelay = 10;
|
||||
maxLines = 10000;
|
||||
};
|
||||
hideRootNode = false;
|
||||
retainHiddenRootIndent = false;
|
||||
logLevel = "info";
|
||||
logToFile = false;
|
||||
openFilesInLastWindow = true;
|
||||
popupBorderStyle = "NC";
|
||||
resizeTimerInterval = 500;
|
||||
sortCaseInsensitive = false;
|
||||
sortFunction = "nil";
|
||||
usePopupsForInput = true;
|
||||
useDefaultMappings = true;
|
||||
sourceSelector = {
|
||||
winbar = false;
|
||||
statusline = false;
|
||||
showScrolledOffParentNode = false;
|
||||
tabLabels = {
|
||||
filesystem = " Files ";
|
||||
buffers = " Buffers ";
|
||||
gitStatus = " Git ";
|
||||
diagnostics = " 裂Diagnostics ";
|
||||
};
|
||||
contentLayout = "start";
|
||||
tabsLayout = "equal";
|
||||
truncationCharacter = "…";
|
||||
tabsMinWidth = null;
|
||||
tabsMaxWidth = null;
|
||||
padding = 0;
|
||||
separator = {
|
||||
left = "▏";
|
||||
right = "▕";
|
||||
};
|
||||
separatorActive = null;
|
||||
showSeparatorOnEdge = false;
|
||||
highlightTab = "NeoTreeTabInactive";
|
||||
highlightTabActive = "NeoTreeTabActive";
|
||||
highlightBackground = "NeoTreeTabInactive";
|
||||
highlightSeparator = "NeoTreeTabSeparatorInactive";
|
||||
highlightSeparatorActive = "NeoTreeTabSeparatorActive";
|
||||
};
|
||||
eventHandlers = {
|
||||
before_render = ''
|
||||
function (state)
|
||||
-- add something to the state that can be used by custom components
|
||||
end
|
||||
'';
|
||||
|
||||
file_opened = ''
|
||||
function(file_path)
|
||||
--auto close
|
||||
require("neo-tree").close_all()
|
||||
end
|
||||
'';
|
||||
};
|
||||
defaultComponentConfigs = {
|
||||
container = {
|
||||
enableCharacterFade = true;
|
||||
width = "100%";
|
||||
rightPadding = 0;
|
||||
};
|
||||
diagnostics = {
|
||||
symbols = {
|
||||
hint = "H";
|
||||
info = "I";
|
||||
warn = "!";
|
||||
error = "X";
|
||||
};
|
||||
highlights = {
|
||||
hint = "DiagnosticSignHint";
|
||||
info = "DiagnosticSignInfo";
|
||||
warn = "DiagnosticSignWarn";
|
||||
error = "DiagnosticSignError";
|
||||
};
|
||||
};
|
||||
indent = {
|
||||
indentSize = 2;
|
||||
padding = 1;
|
||||
withMarkers = true;
|
||||
indentMarker = "│";
|
||||
lastIndentMarker = "└";
|
||||
highlight = "NeoTreeIndentMarker";
|
||||
withExpanders = null;
|
||||
expanderCollapsed = "";
|
||||
expanderExpanded = "";
|
||||
expanderHighlight = "NeoTreeExpander";
|
||||
};
|
||||
icon = {
|
||||
folderClosed = "";
|
||||
folderOpen = "";
|
||||
folderEmpty = "ﰊ";
|
||||
folderEmptyOpen = "ﰊ";
|
||||
default = "*";
|
||||
highlight = "NeoTreeFileIcon";
|
||||
};
|
||||
modified = {
|
||||
symbol = "[+] ";
|
||||
highlight = "NeoTreeModified";
|
||||
};
|
||||
name = {
|
||||
trailingSlash = false;
|
||||
useGitStatusColors = true;
|
||||
highlight = "NeoTreeFileName";
|
||||
};
|
||||
gitStatus = {
|
||||
symbols = {
|
||||
added = "✚";
|
||||
deleted = "✖";
|
||||
modified = "";
|
||||
renamed = "";
|
||||
untracked = "";
|
||||
ignored = "";
|
||||
unstaged = "";
|
||||
staged = "";
|
||||
conflict = "";
|
||||
};
|
||||
|
||||
align = "right";
|
||||
};
|
||||
};
|
||||
renderers = {
|
||||
directory = [
|
||||
"indent"
|
||||
"icon"
|
||||
"current_filter"
|
||||
{
|
||||
name = "container";
|
||||
content = [
|
||||
{
|
||||
name = "name";
|
||||
zindex = 10;
|
||||
}
|
||||
{
|
||||
name = "clipboard";
|
||||
zindex = 10;
|
||||
}
|
||||
{
|
||||
name = "diagnostics";
|
||||
errors_only = true;
|
||||
zindex = 20;
|
||||
align = "right";
|
||||
hide_when_expanded = true;
|
||||
}
|
||||
{
|
||||
name = "git_status";
|
||||
zindex = 20;
|
||||
align = "right";
|
||||
hide_when_expanded = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
file = [
|
||||
"indent"
|
||||
"icon"
|
||||
{
|
||||
name = "container";
|
||||
content = [
|
||||
{
|
||||
name = "name";
|
||||
zindex = 10;
|
||||
}
|
||||
{
|
||||
name = "clipboard";
|
||||
zindex = 10;
|
||||
}
|
||||
{
|
||||
name = "bufnr";
|
||||
zindex = 10;
|
||||
}
|
||||
{
|
||||
name = "modified";
|
||||
zindex = 20;
|
||||
align = "right";
|
||||
}
|
||||
{
|
||||
name = "diagnostics";
|
||||
zindex = 20;
|
||||
align = "right";
|
||||
}
|
||||
{
|
||||
name = "git_status";
|
||||
zindex = 20;
|
||||
align = "right";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
message = [
|
||||
{
|
||||
name = "indent";
|
||||
with_markers = false;
|
||||
}
|
||||
{
|
||||
name = "name";
|
||||
highlight = "NeoTreeMessage";
|
||||
}
|
||||
];
|
||||
terminal = [
|
||||
"indent"
|
||||
"icon"
|
||||
"name"
|
||||
"bufnr"
|
||||
];
|
||||
};
|
||||
nestingRules = {};
|
||||
window = {
|
||||
position = "left";
|
||||
width = 40;
|
||||
height = 15;
|
||||
autoExpandWidth = false;
|
||||
popup = {
|
||||
size = {
|
||||
height = "80%";
|
||||
width = "50%";
|
||||
};
|
||||
position = "80%";
|
||||
};
|
||||
sameLevel = false;
|
||||
insertAs = "child";
|
||||
mappingOptions = {
|
||||
noremap = true;
|
||||
nowait = true;
|
||||
};
|
||||
mappings = {
|
||||
"<space>" = {
|
||||
command = "toggle_node";
|
||||
# disable `nowait` if you have existing combos starting with this char that you want to use
|
||||
nowait = false;
|
||||
};
|
||||
"<2-LeftMouse>" = "open";
|
||||
"<cr>" = "open";
|
||||
"<esc>" = "revert_preview";
|
||||
P = {
|
||||
command = "toggle_preview";
|
||||
config = {use_float = true;};
|
||||
};
|
||||
l = "focus_preview";
|
||||
S = "open_split";
|
||||
# S = "split_with_window_picker";
|
||||
s = "open_vsplit";
|
||||
# s = "vsplit_with_window_picker";
|
||||
t = "open_tabnew";
|
||||
# "<cr>" = "open_drop";
|
||||
# t = "open_tab_drop";
|
||||
w = "open_with_window_picker";
|
||||
C = "close_node";
|
||||
z = "close_all_nodes";
|
||||
# Z = "expand_all_nodes";
|
||||
R = "refresh";
|
||||
a = {
|
||||
command = "add";
|
||||
# some commands may take optional config options, see `:h neo-tree-mappings` for details
|
||||
config = {
|
||||
show_path = "none"; # "none", "relative", "absolute"
|
||||
};
|
||||
};
|
||||
A = "add_directory"; # also accepts the config.show_path and config.insert_as options.
|
||||
d = "delete";
|
||||
r = "rename";
|
||||
y = "copy_to_clipboard";
|
||||
x = "cut_to_clipboard";
|
||||
p = "paste_from_clipboard";
|
||||
c = "copy"; # takes text input for destination, also accepts the config.show_path and config.insert_as options
|
||||
m = "move"; # takes text input for destination, also accepts the config.show_path and config.insert_as options
|
||||
e = "toggle_auto_expand_width";
|
||||
q = "close_window";
|
||||
"?" = "show_help";
|
||||
"<" = "prev_source";
|
||||
">" = "next_source";
|
||||
};
|
||||
};
|
||||
filesystem = {
|
||||
window = {
|
||||
mappings = {
|
||||
H = "toggle_hidden";
|
||||
"/" = "fuzzy_finder";
|
||||
D = "fuzzy_finder_directory";
|
||||
# "/" = "filter_as_you_type"; # this was the default until v1.28
|
||||
"#" = "fuzzy_sorter"; # fuzzy sorting using the fzy algorithm
|
||||
# D = "fuzzy_sorter_directory";
|
||||
f = "filter_on_submit";
|
||||
"<C-x>" = "clear_filter";
|
||||
"<bs>" = "navigate_up";
|
||||
"." = "set_root";
|
||||
"[g" = "prev_git_modified";
|
||||
"]g" = "next_git_modified";
|
||||
};
|
||||
};
|
||||
asyncDirectoryScan = "auto";
|
||||
scanMode = "shallow";
|
||||
bindToCwd = true;
|
||||
cwdTarget = {
|
||||
sidebar = "tab";
|
||||
current = "window";
|
||||
};
|
||||
filteredItems = {
|
||||
visible = false;
|
||||
forceVisibleInEmptyFolder = false;
|
||||
showHiddenCount = true;
|
||||
hideDotfiles = true;
|
||||
hideGitignored = true;
|
||||
hideHidden = true;
|
||||
hideByName = [
|
||||
".DS_Store"
|
||||
"thumbs.db"
|
||||
];
|
||||
hideByPattern = [];
|
||||
alwaysShow = [];
|
||||
neverShow = [];
|
||||
neverShowByPattern = [];
|
||||
};
|
||||
findByFullPathWords = false;
|
||||
findCommand = "fd";
|
||||
findArgs = {
|
||||
fd = [
|
||||
"--exclude"
|
||||
".git"
|
||||
"--exclude"
|
||||
"node_modules"
|
||||
];
|
||||
};
|
||||
groupEmptyDirs = false;
|
||||
searchLimit = 50;
|
||||
followCurrentFile = false;
|
||||
hijackNetrwBehavior = "open_default";
|
||||
useLibuvFileWatcher = false;
|
||||
};
|
||||
buffers = {
|
||||
bindToCwd = true;
|
||||
followCurrentFile = true;
|
||||
groupEmptyDirs = true;
|
||||
window = {
|
||||
mappings = {
|
||||
"<bs>" = "navigate_up";
|
||||
"." = "set_root";
|
||||
bd = "buffer_delete";
|
||||
};
|
||||
};
|
||||
};
|
||||
gitStatus = {
|
||||
window = {
|
||||
mappings = {
|
||||
A = "git_add_all";
|
||||
gu = "git_unstage_file";
|
||||
ga = "git_add_file";
|
||||
gr = "git_revert_file";
|
||||
gc = "git_commit";
|
||||
gp = "git_push";
|
||||
gg = "git_commit_and_push";
|
||||
};
|
||||
};
|
||||
};
|
||||
example = {
|
||||
renderers = {
|
||||
custom = [
|
||||
"indent"
|
||||
{
|
||||
name = "icon";
|
||||
default = "C";
|
||||
}
|
||||
"custom"
|
||||
"name"
|
||||
];
|
||||
};
|
||||
window = {
|
||||
mappings = {
|
||||
"<cr>" = "toggle_node";
|
||||
"<C-e>" = "example_command";
|
||||
d = "show_debug_info";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
13
tests/test-sources/plugins/utils/netman.nix
Normal file
13
tests/test-sources/plugins/utils/netman.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.netman.enable = true;
|
||||
};
|
||||
|
||||
withNeotree = {
|
||||
plugins.neo-tree.enable = true;
|
||||
plugins.netman = {
|
||||
enable = true;
|
||||
neoTreeIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
35
tests/test-sources/plugins/utils/nvim-autopairs.nix
Normal file
35
tests/test-sources/plugins/utils/nvim-autopairs.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
# Empty configuration
|
||||
empty = {
|
||||
plugins.nvim-autopairs.enable = true;
|
||||
};
|
||||
|
||||
# All the upstream default options of trouble
|
||||
defaults = {
|
||||
plugins.nvim-autopairs = {
|
||||
enable = true;
|
||||
|
||||
pairs = null;
|
||||
disabledFiletypes = ["TelescopePrompt" "spectre_panel"];
|
||||
disableInMacro = false;
|
||||
disableInVisualblock = false;
|
||||
disableInReplaceMode = true;
|
||||
ignoredNextChar = "[=[[%w%%%'%[%\"%.%`%$]]=]";
|
||||
enableMoveright = true;
|
||||
enableAfterQuote = true;
|
||||
enableCheckBracketLine = true;
|
||||
enableBracketInQuote = true;
|
||||
enableAbbr = false;
|
||||
breakUndo = true;
|
||||
checkTs = false;
|
||||
tsConfig = {
|
||||
lua = ["string" "source"];
|
||||
javascript = ["string" "template_string"];
|
||||
};
|
||||
mapCr = true;
|
||||
mapBs = true;
|
||||
mapCH = false;
|
||||
mapCW = false;
|
||||
};
|
||||
};
|
||||
}
|
18
tests/test-sources/plugins/utils/nvim-osc52.nix
Normal file
18
tests/test-sources/plugins/utils/nvim-osc52.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.nvim-osc52.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.nvim-osc52 = {
|
||||
maxLength = 0;
|
||||
silent = false;
|
||||
trim = false;
|
||||
|
||||
keymaps = {
|
||||
silent = false;
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
275
tests/test-sources/plugins/utils/nvim-tree.nix
Normal file
275
tests/test-sources/plugins/utils/nvim-tree.nix
Normal file
|
@ -0,0 +1,275 @@
|
|||
{
|
||||
# Empty configuration
|
||||
empty = {
|
||||
plugins.nvim-tree.enable = true;
|
||||
};
|
||||
|
||||
# All the upstream default options of nvim-tree
|
||||
defaults = {
|
||||
plugins.nvim-tree = {
|
||||
enable = true;
|
||||
|
||||
disableNetrw = true;
|
||||
hijackNetrw = false;
|
||||
|
||||
openOnSetup = true;
|
||||
openOnSetupFile = true;
|
||||
ignoreBufferOnSetup = true;
|
||||
ignoreFtOnSetup = ["tex"];
|
||||
autoClose = true;
|
||||
|
||||
autoReloadOnWrite = true;
|
||||
sortBy = "name";
|
||||
hijackUnnamedBufferWhenOpening = false;
|
||||
hijackCursor = false;
|
||||
rootDirs = [];
|
||||
preferStartupRoot = false;
|
||||
syncRootWithCwd = false;
|
||||
reloadOnBufenter = false;
|
||||
respectBufCwd = false;
|
||||
hijackDirectories = {
|
||||
enable = true;
|
||||
autoOpen = true;
|
||||
};
|
||||
updateFocusedFile = {
|
||||
enable = false;
|
||||
updateRoot = false;
|
||||
ignoreList = [];
|
||||
};
|
||||
systemOpen = {
|
||||
cmd = "";
|
||||
args = [];
|
||||
};
|
||||
diagnostics = {
|
||||
enable = false;
|
||||
debounceDelay = 50;
|
||||
showOnDirs = false;
|
||||
showOnOpenDirs = true;
|
||||
icons = {
|
||||
hint = "";
|
||||
info = "";
|
||||
warning = "";
|
||||
error = "";
|
||||
};
|
||||
severity = {
|
||||
min = "hint";
|
||||
max = "error";
|
||||
};
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
ignore = true;
|
||||
showOnDirs = true;
|
||||
showOnOpenDirs = true;
|
||||
timeout = 400;
|
||||
};
|
||||
modified = {
|
||||
enable = false;
|
||||
showOnDirs = true;
|
||||
showOnOpenDirs = true;
|
||||
};
|
||||
filesystemWatchers = {
|
||||
enable = true;
|
||||
debounceDelay = 50;
|
||||
ignoreDirs = [];
|
||||
};
|
||||
onAttach = "default";
|
||||
removeKeymaps = false;
|
||||
selectPrompts = false;
|
||||
view = {
|
||||
centralizeSelection = false;
|
||||
cursorline = true;
|
||||
debounceDelay = 15;
|
||||
hideRootFolder = false;
|
||||
width = {
|
||||
min = 30;
|
||||
max = -1;
|
||||
padding = 1;
|
||||
};
|
||||
side = "left";
|
||||
preserveWindowProportions = false;
|
||||
number = false;
|
||||
relativenumber = false;
|
||||
signcolumn = "yes";
|
||||
mappings = {
|
||||
customOnly = false;
|
||||
list = [
|
||||
# remove a default mapping for cd
|
||||
{
|
||||
key = "<2-RightMouse>";
|
||||
action = "";
|
||||
}
|
||||
|
||||
# add multiple normal mode mappings for edit
|
||||
{
|
||||
key = ["<CR>" "o"];
|
||||
action = "edit";
|
||||
mode = "n";
|
||||
}
|
||||
|
||||
# custom action
|
||||
{
|
||||
key = "p";
|
||||
action = "print_the_node_path";
|
||||
action_cb = ''
|
||||
function(node)
|
||||
print(node.absolute_path)
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
float = {
|
||||
enable = false;
|
||||
quitOnFocusLoss = true;
|
||||
openWinConfig = {
|
||||
col = 1;
|
||||
row = 1;
|
||||
relative = "cursor";
|
||||
border = "shadow";
|
||||
style = "minimal";
|
||||
};
|
||||
};
|
||||
};
|
||||
renderer = {
|
||||
addTrailing = false;
|
||||
groupEmpty = false;
|
||||
fullName = false;
|
||||
highlightGit = false;
|
||||
highlightOpenedFiles = "none";
|
||||
highlightModified = "none";
|
||||
rootFolderLabel = ":~:s?$?/..?";
|
||||
indentWidth = 2;
|
||||
indentMarkers = {
|
||||
enable = false;
|
||||
inlineArrows = true;
|
||||
icons = {
|
||||
corner = "└";
|
||||
edge = "│";
|
||||
item = "│";
|
||||
bottom = "─";
|
||||
none = " ";
|
||||
};
|
||||
};
|
||||
icons = {
|
||||
webdevColors = true;
|
||||
gitPlacement = "before";
|
||||
modifiedPlacement = "after";
|
||||
padding = " ";
|
||||
symlinkArrow = " ➛ ";
|
||||
show = {
|
||||
file = true;
|
||||
folder = true;
|
||||
folderArrow = true;
|
||||
git = true;
|
||||
modified = true;
|
||||
};
|
||||
glyphs = {
|
||||
default = "";
|
||||
symlink = "";
|
||||
modified = "●";
|
||||
folder = {
|
||||
arrowClosed = "";
|
||||
arrowOpen = "";
|
||||
default = "";
|
||||
open = "";
|
||||
empty = "";
|
||||
emptyOpen = "";
|
||||
symlink = "";
|
||||
symlinkOpen = "";
|
||||
};
|
||||
git = {
|
||||
unstaged = "✗";
|
||||
staged = "✓";
|
||||
unmerged = "";
|
||||
renamed = "➜";
|
||||
untracked = "★";
|
||||
deleted = "";
|
||||
ignored = "◌";
|
||||
};
|
||||
};
|
||||
};
|
||||
specialFiles = ["Cargo.toml" "Makefile" "README.md" "readme.md"];
|
||||
symlinkDestination = true;
|
||||
};
|
||||
filters = {
|
||||
dotfiles = false;
|
||||
gitClean = false;
|
||||
noBuffer = false;
|
||||
custom = [];
|
||||
exclude = [];
|
||||
};
|
||||
actions = {
|
||||
changeDir = {
|
||||
enable = true;
|
||||
global = false;
|
||||
restrictAboveCwd = false;
|
||||
};
|
||||
expandAll = {
|
||||
maxFolderDiscovery = 300;
|
||||
exclude = [];
|
||||
};
|
||||
filePopup = {
|
||||
openWinConfig = {
|
||||
col = 1;
|
||||
row = 1;
|
||||
relative = "cursor";
|
||||
border = "shadow";
|
||||
style = "minimal";
|
||||
};
|
||||
};
|
||||
openFile = {
|
||||
quitOnOpen = false;
|
||||
resizeWindow = true;
|
||||
};
|
||||
windowPicker = {
|
||||
enable = true;
|
||||
picker = "default";
|
||||
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
||||
exclude = {
|
||||
filetype = ["notify" "packer" "qf" "diff" "fugitive" "fugitiveblame"];
|
||||
buftype = ["nofile" "terminal" "help"];
|
||||
};
|
||||
};
|
||||
removeFile = {
|
||||
closeWindow = true;
|
||||
};
|
||||
useSystemClipboard = true;
|
||||
};
|
||||
liveFilter = {
|
||||
prefix = "[FILTER]: ";
|
||||
alwaysShowFolders = true;
|
||||
};
|
||||
tab = {
|
||||
sync = {
|
||||
open = false;
|
||||
close = false;
|
||||
ignore = [];
|
||||
};
|
||||
};
|
||||
notify = {
|
||||
threshold = "info";
|
||||
};
|
||||
ui = {
|
||||
confirm = {
|
||||
remove = true;
|
||||
trash = true;
|
||||
};
|
||||
};
|
||||
log = {
|
||||
enable = false;
|
||||
truncate = false;
|
||||
types = {
|
||||
all = false;
|
||||
profile = false;
|
||||
config = false;
|
||||
copyPaste = false;
|
||||
dev = false;
|
||||
diagnostics = false;
|
||||
git = false;
|
||||
watcher = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
46
tests/test-sources/plugins/utils/sniprun.nix
Normal file
46
tests/test-sources/plugins/utils/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";
|
||||
};
|
||||
};
|
||||
}
|
112
tests/test-sources/plugins/utils/todo-comments.nix
Normal file
112
tests/test-sources/plugins/utils/todo-comments.nix
Normal file
|
@ -0,0 +1,112 @@
|
|||
{
|
||||
# Empty configuration
|
||||
empty = {
|
||||
plugins.todo-comments.enable = true;
|
||||
};
|
||||
|
||||
# All the upstream default options of todo-comments
|
||||
defaults = {
|
||||
plugins.todo-comments = {
|
||||
enable = true;
|
||||
|
||||
signs = true;
|
||||
signPriority = 8;
|
||||
|
||||
keywords = {
|
||||
FIX = {
|
||||
icon = " ";
|
||||
color = "error";
|
||||
alt = ["FIXME" "BUG" "FIXIT" "ISSUE"];
|
||||
signs = false;
|
||||
};
|
||||
TODO = {
|
||||
icon = " ";
|
||||
color = "info";
|
||||
};
|
||||
HACK = {
|
||||
icon = " ";
|
||||
color = "warning";
|
||||
};
|
||||
WARN = {
|
||||
icon = " ";
|
||||
color = "warning";
|
||||
alt = ["WARNING" "XXX"];
|
||||
};
|
||||
PERF = {
|
||||
icon = " ";
|
||||
alt = ["OPTIM" "PERFORMANCE" "OPTIMIZE"];
|
||||
};
|
||||
NOTE = {
|
||||
icon = " ";
|
||||
color = "hint";
|
||||
alt = ["INFO"];
|
||||
};
|
||||
TEST = {
|
||||
icon = "⏲ ";
|
||||
color = "test";
|
||||
alt = ["TESTING" "PASSED" "FAILED"];
|
||||
};
|
||||
};
|
||||
|
||||
guiStyle = {
|
||||
fg = "NONE";
|
||||
bg = "BOLD";
|
||||
};
|
||||
|
||||
mergeKeywords = true;
|
||||
|
||||
highlight = {
|
||||
multiline = true;
|
||||
multilinePattern = "^.";
|
||||
multilineContext = 10;
|
||||
before = "";
|
||||
keyword = "wide";
|
||||
after = "fg";
|
||||
pattern = ''.*<(KEYWORDS)\s*:'';
|
||||
commentsOnly = true;
|
||||
maxLineLen = 400;
|
||||
exclude = [];
|
||||
};
|
||||
|
||||
colors = {
|
||||
error = ["DiagnosticError" "ErrorMsg" "#DC2626"];
|
||||
warning = ["DiagnosticWarn" "WarningMsg" "#FBBF24"];
|
||||
info = ["DiagnosticInfo" "#2563EB"];
|
||||
hint = ["DiagnosticHint" "#10B981"];
|
||||
default = ["Identifier" "#7C3AED"];
|
||||
test = ["Identifier" "#FF00FF"];
|
||||
};
|
||||
|
||||
search = {
|
||||
command = "rg";
|
||||
args = [
|
||||
"--color=never"
|
||||
"--no-heading"
|
||||
"--with-filename"
|
||||
"--line-number"
|
||||
"--column"
|
||||
];
|
||||
pattern = ''\b(KEYWORDS):'';
|
||||
};
|
||||
|
||||
keymapsSilent = true;
|
||||
|
||||
keymaps = {
|
||||
todoQuickFix.key = "<C-a>";
|
||||
todoLocList = {
|
||||
key = "<C-f>";
|
||||
cwd = "~/projects/foobar";
|
||||
keywords = "TODO,FIX";
|
||||
};
|
||||
todoTrouble = {
|
||||
key = "<C-t>";
|
||||
keywords = "TODO,FIX";
|
||||
};
|
||||
todoTelescope = {
|
||||
key = "<C-e>";
|
||||
cwd = "~/projects/foobar";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
18
tests/test-sources/plugins/utils/vim-bbye.nix
Normal file
18
tests/test-sources/plugins/utils/vim-bbye.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.vim-bbye.enable = true;
|
||||
};
|
||||
|
||||
test = {
|
||||
plugins.vim-bbye = {
|
||||
enable = true;
|
||||
|
||||
keymapsSilent = false;
|
||||
|
||||
keymaps = {
|
||||
bdelete = "<C-w>";
|
||||
bwipeout = "<C-t>";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue