feat(pkgs): Remove nixvim and its configuration

This commit is contained in:
ulic-youthlic 2026-07-04 22:39:10 +08:00
parent 7ef52e7b62
commit 1c7c2a2692
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
43 changed files with 107 additions and 1642 deletions

View file

@ -1,5 +0,0 @@
column_width = 120
indent_type = "Spaces"
indent_width = 2
[sort_requires]
enabled = true

View file

@ -1 +0,0 @@
{...}: {}

View file

@ -1,60 +0,0 @@
{...}: {
youthlic.plugins.blink-cmp = {
enable = true;
setupLspCapabilities = true;
settings = {
snippets = {
expand = {
__raw =
#lua
''
function(snippet, _)
return {}
end
'';
};
};
appearance = {
# use_nvim_cmp_as_default = false;
};
completion = {
accept = {
auto_brackets = {
enabled = true;
};
};
menu = {
draw = {
treesitter = ["lsp"];
};
};
documentation = {
auto_show = true;
auto_show_delay_ms = 200;
};
ghost_text = {
enabled = {
__raw =
#lua
''vim.g.ai_cmp'';
};
};
};
sources = {
compat = [];
default = [
"lsp"
"path"
"snippets"
"buffer"
];
};
cmdline = {
enabled = false;
};
keymap = {
preset = "enter";
};
};
};
}

View file

@ -1,15 +0,0 @@
{...}: {
youthlic.plugins = {
lazydev = {
enable = true;
settings = {
library = [
{
path = "$''{3rd}/luv/library";
words = ["vim%.uv"];
}
];
};
};
};
}

View file

@ -1,121 +0,0 @@
{...}: {
youthlic.plugins.mini-ai = {
enable = true;
luaConfig.pre =
#lua
''
do
local ai = require("mini.ai")
_M.__coding_plugin_mini_ai_opts = {
n_lines = 500,
custom_textobjects = {
o = ai.gen_spec.treesitter({ -- code block
a = { "@block.outer", "@conditional.outer", "@loop.outer" },
i = { "@block.inner", "@conditional.inner", "@loop.inner" },
}),
f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }), -- function
c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }), -- class
t = { "<([%p%w]-)%f[^<%w][^<>]->.-</%1>", "^<.->().*()</[^/]->$" }, -- tags
d = { "%f[%d]%d+" }, -- digits
e = { -- Word with case
{ "%u[%l%d]+%f[^%l%d]", "%f[%S][%l%d]+%f[^%l%d]", "%f[%P][%l%d]+%f[^%l%d]", "^[%l%d]+%f[^%l%d]" },
"^().*()$",
},
g = function(ai_type)
local start_line, end_line = 1, vim.fn.line("$")
if ai_type == "i" then
local first_nonblank, last_nonblank = vim.fn.nextnonblank(start_line), vim.fn.prevnonblank(end_line)
if first_nonblank == 0 or last_nonblank == 0 then
return { from = { line = start_line, col = 1 } }
end
start_line, end_line = first_nonblank, last_nonblank
end
local to_col = math.max(vim.fn.getline(end_line):len(), 1)
return {
from = {
line = start_line,
col = 1,
},
to = {
line = end_line,
col = to_col,
},
}
end, -- buffer
u = ai.gen_spec.function_call(), -- u for "Usage"
U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name
},
}
end
'';
settings = {
__raw =
#lua
"_M.__coding_plugin_mini_ai_opts";
};
luaConfig.post =
#lua
''
_M.on_load("which-key", function()
local opts = _M.__coding_plugin_mini_ai_opts
local objects = {
{ " ", desc = "whitespace" },
{ '"', desc = '" string' },
{ "'", desc = "' string" },
{ "(", desc = "() block" },
{ ")", desc = "() block with ws" },
{ "<", desc = "<> block" },
{ ">", desc = "<> block with ws" },
{ "?", desc = "user prompt" },
{ "U", desc = "use/call without dot" },
{ "[", desc = "[] block" },
{ "]", desc = "[] block with ws" },
{ "_", desc = "underscore" },
{ "`", desc = "` string" },
{ "a", desc = "argument" },
{ "b", desc = ")]} block" },
{ "c", desc = "class" },
{ "d", desc = "digit(s)" },
{ "e", desc = "CamelCase / snake_case" },
{ "f", desc = "function" },
{ "g", desc = "entire file" },
{ "i", desc = "indent" },
{ "o", desc = "block, conditional, loop" },
{ "q", desc = "quote `\"'" },
{ "t", desc = "tag" },
{ "u", desc = "use/call" },
{ "{", desc = "{} block" },
{ "}", desc = "{} with ws" },
}
---@type wk.Spec[]
local ret = { mode = { "o", "x" } }
---@type table<string, string>
local mappings = vim.tbl_extend("force", {}, {
around = "a",
inside = "i",
around_next = "an",
inside_next = "in",
around_last = "al",
inside_last = "il",
}, opts.mappings or {})
mappings.goto_left = nil
mappings.goto_right = nil
for name, prefix in pairs(mappings) do
name = name:gsub("^around_", ""):gsub("^inside_", "")
ret[#ret + 1] = { prefix, group = name }
for _, obj in ipairs(objects) do
local desc = obj.desc
if prefix:sub(1, 1) == "i" then
desc = desc:gsub(" with ws", "")
end
ret[#ret + 1] = { prefix .. obj[1], desc = obj.desc }
end
end
require("which-key").add(ret, { notify = false })
end)
'';
};
}

View file

@ -1,71 +0,0 @@
{...}: {
youthlic.plugins.mini-pairs = {
enable = true;
settings = {
modes = {
insert = true;
command = true;
terminal = false;
};
};
luaConfig.post =
#lua
''
do
local opts = {
skip_next = [=[[%w%%'%[%"%.%`%$]]=],
skip_ts = { "string" },
skip_unbalanced = true,
markdown = true,
}
_M.on_load("snacks", function()
vim.schedule(function()
Snacks.toggle({
name = "Mini Pairs",
get = function()
return not vim.g.minipairs_disable
end,
set = function(state)
vim.g.minipairs_disable = not state
end,
}):map("<leader>up")
end)
end)
local pairs = require("mini.pairs")
local open = pairs.open
pairs.open = function(pair, neigh_pattern)
if vim.fn.getcmdline() ~= "" then
return open(pair, neigh_pattern)
end
local o, c = pair:sub(1, 1), pair:sub(2, 2)
local line = vim.api.nvim_get_current_line()
local cursor = vim.api.nvim_win_get_cursor(0)
local next = line:sub(cursor[2] + 1, cursor[2] + 1)
local before = line:sub(1, cursor[2])
if opts.markdown and o == "`" and vim.bo.filetype == "markdown" and before:match("^%s*``") then
return "`\n``" .. vim.api.nvim_replace_termcodes("<up>", true, true, true)
end
if opts.skip_next and next ~= "" and next:match(opts.skip_next) then
return o
end
if opts.skip_ts and #opts.skip_ts > 0 then
local ok, captures = pcall(vim.treesitter.get_captures_at_pos, 0, cursor[1] - 1, math.max(cursor[2] - 1, 0))
for _, capture in ipairs(ok and captures or {}) do
if vim.tbl_contains(opts.skip_ts, capture.capture) then
return o
end
end
end
if opts.skip_unbalanced and next == c and c ~= o then
local _, count_open = line:gsub(vim.pesc(pair:sub(1, 1)), "")
local _, count_close = line:gsub(vim.pesc(pair:sub(2, 2)), "")
if count_close > count_open then
return o
end
end
return open(pair, neigh_pattern)
end
end
'';
};
}

View file

@ -1,3 +0,0 @@
{...}: {
youthlic.plugins.ts-comments.enable = true;
}

View file

@ -1,13 +0,0 @@
{...}: {
youthlic.plugins = {
# grug-far = {
# enable = true;
# };
# flash = {
# enable = true;
# };
# todo-comments = {
# enable = true;
# };
};
}

View file

@ -1,119 +0,0 @@
{...}: {
youthlic.plugins.gitsigns = {
enable = true;
luaConfig.post =
#lua
''
_M.on_load("snacks", function()
vim.schedule(function()
Snacks.toggle({
name = "Git Signs",
get = function()
return require("gitsigns.config").config.signcolumn
end,
set = function(state)
require("gitsigns").toggle_signs(state)
end,
}):map("<leader>uG")
end)
end)
'';
settings = {
current_line_blame = true;
signcolumn = true;
numhl = true;
linehl = false;
signs = {
add = {
text = "";
};
change = {
text = "";
};
delete = {
text = "";
};
topdelete = {
text = "";
};
changedelete = {
text = "";
};
untracked = {
text = "";
};
};
signs_staged = {
add = {
text = "";
};
change = {
text = "";
};
delete = {
text = "";
};
topdelete = {
text = "";
};
changedelete = {
text = "";
};
};
on_attach = {
__raw =
#lua
''
function(buffer)
local gs = package.loaded.gitsigns
local map = function(mode, l, r, desc)
vim.keymap.set(mode, l, r, {
buffer = buffer,
desc = desc,
})
end
map("n", "]h", function()
if vim.wo.diff then
vim.cmd.normal({ "]c", bang = true })
else
gs.nav_hunk("next")
end
end, "Next Hunk")
map("n", "[h", function()
if vim.wo.diff then
vim.cmd.normal({ "[c", bang = true })
else
gs.nav_hunk("prev")
end
end, "Prev Hunk")
map("n", "]H", function()
gs.nav_hunk("last")
end, "Last Hunk")
map("n", "[H", function()
gs.nav_hunk("first")
end, "First Hunk")
map({ "n", "v" }, "<leader>ghs", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
map({ "n", "v" }, "<leader>ghr", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
map("n", "<leader>ghS", gs.stage_buffer, "Stage Buffer")
map("n", "<leader>ghu", gs.undo_stage_hunk, "Undo Stage Hunk")
map("n", "<leader>ghR", gs.reset_buffer, "Reset Buffer")
map("n", "<leader>ghp", gs.preview_hunk_inline, "Preview Hunk Inline")
map("n", "<leader>ghb", function()
gs.blame_line({ full = true })
end, "Blame Line")
map("n", "<leader>ghB", function()
gs.blame()
end, "Blame Buffer")
map("n", "<leader>ghd", gs.diffthis, "Diff This")
map("n", "<leader>ghD", function()
gs.diffthis("~")
end, "Diff This ~")
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk")
end
'';
};
};
};
}

View file

@ -1,33 +0,0 @@
{...}: {
youthlic.plugins.trouble = {
enable = true;
settings = {
modes = {
lsp = {
win = {
position = "right";
};
};
preview_float = {
mode = "diagnostics";
preview = {
type = "float";
relative = "editor";
border = "rounded";
title = "Preview";
title_pos = "center";
position = [
0
(-2)
];
size = {
width = 0.3;
height = 0.3;
};
zindex = 200;
};
};
};
};
};
}

View file

@ -1,17 +0,0 @@
{...}: {
youthlic.plugins = {
which-key = {
enable = true;
settings = {
preset = "helix";
win = {
no_overlap = false;
};
show_help = false;
};
};
web-devicons = {
enable = true;
};
};
}

View file

@ -1,105 +0,0 @@
{...}: {
userCommands = let
formatCmd = {
desc = "Format all the buffer";
# conform.format function can deal with range by itself
range = "%";
bang = true;
bar = true;
nargs = "?";
complete = {
__raw =
#lua
''
function(ArgLead, CmdLine, CursorPos)
return vim.iter(require("conform").list_all_formatters()):filter(function(val)
return val.available
end):map(function(val)
return val.name
end):filter(function(name)
return string.match(name, "^" .. ArgLead) ~= nil
end):totable()
end
'';
};
command = {
__raw =
#lua
''
function(opts)
local format = require("conform").format
if #(opts.fargs) == 0 then
return format()
else
return format({ formatters = { opts.fargs[1] } })
end
end
'';
};
};
in {
Format = formatCmd;
Fmt = formatCmd;
Formatter = {
desc = "Show config of formatter";
nargs = "?";
bar = true;
complete = {
__raw =
#lua
''
function(ArgLead, CmdLine, CursorPos)
return vim.iter(require("conform").list_all_formatters()):map(function(val)
return val.name
end):filter(function(name)
return string.match(name, "^" .. ArgLead) ~= nil
end):totable()
end
'';
};
command = {
__raw =
#lua
''
function(opts)
local conform = require("conform")
if #(opts.fargs) == 0 then
local formatters = conform.list_all_formatters()
print(vim.inspect(formatters))
return formatters
else
local config = conform.get_formatter_config(opts.fargs[1])
print(vim.inspect(config))
return config
end
end
'';
};
};
};
keymaps = [
{
action = {
__raw =
#lua
''
function(opts)
return require("conform").format()
end
'';
};
key = "=";
mode = [
"n"
"v"
];
options = {
desc = "Format with conform";
};
}
];
youthlic.plugins.conform-nvim = {
enable = true;
settings.formatters.injected.options.ignore_errors = true;
};
}

View file

@ -1 +0,0 @@
{...}: {}

View file

@ -1,31 +0,0 @@
{
lib,
pkgs,
...
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.c = {
__unkeyed-1 = "clang-format";
lsp_format = "fallback";
};
formatters.clang-format = {
__raw =
#lua
''
function()
local defaultFormatter = require("conform.formatters.clang-format")
return vim.tbl_extend("force", defaultFormatter, {
command = function()
local exe = vim.fn["exepath"]("clang-format")
if exe ~= "" then
return exe
else
return "${lib.getExe' pkgs.clang-tools "clang-format"}"
end
end
})
end
'';
};
};
}

View file

@ -1,31 +0,0 @@
{
lib,
pkgs,
...
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.cpp = {
__unkeyed-1 = "clang-format";
lsp_format = "fallback";
};
formatters.clang-format = {
__raw =
#lua
''
function()
local defaultFormatter = require("conform.formatters.clang-format")
return vim.tbl_extend("force", defaultFormatter, {
command = function()
local exe = vim.fn["exepath"]("clang-format")
if exe ~= "" then
return exe
else
return "${lib.getExe' pkgs.clang-tools "clang-format"}"
end
end
})
end
'';
};
};
}

View file

@ -1,9 +0,0 @@
{pkgs, ...}: {
extraPackagesAfter = with pkgs; [idris2Packages.idris2Lsp];
lsp.servers.idris2 = {
enable = true;
};
youthlic.plugins.idris2 = {
enable = true;
};
}

View file

@ -1,30 +0,0 @@
{
lib,
pkgs,
...
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.json = {
__unkeyed-1 = "deno_fmt";
};
formatters.deno_fmt = {
__raw =
#lua
''
function()
local defaultFormatter = require("conform.formatters.deno_fmt")
return vim.tbl_extend("force", defaultFormatter, {
command = function()
local exe = vim.fn["exepath"]("deno")
if exe ~= "" then
return exe
else
return "${lib.getExe pkgs.deno}"
end
end
})
end
'';
};
};
}

View file

@ -1,34 +0,0 @@
{
lib,
pkgs,
...
}: {
lsp.servers.lua_ls = {
enable = true;
};
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.lua = {
__unkeyed-1 = "stylua";
lsp_format = "fallback";
};
formatters.stylua = {
__raw =
#lua
''
function()
local defaultFormatter = require("conform.formatters.stylua")
return vim.tbl_extend("force", defaultFormatter, {
command = function()
local exe = vim.fn["exepath"]("stylua")
if exe ~= "" then
return exe
else
return "${lib.getExe pkgs.stylua}"
end
end
})
end
'';
};
};
}

View file

@ -1,30 +0,0 @@
{
lib,
pkgs,
...
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.markdown = {
__unkeyed-1 = "deno_fmt";
};
formatters.deno_fmt = {
__raw =
#lua
''
function()
local defaultFormatter = require("conform.formatters.deno_fmt")
return vim.tbl_extend("force", defaultFormatter, {
command = function()
local exe = vim.fn["exepath"]("deno")
if exe ~= "" then
return exe
else
return "${lib.getExe pkgs.deno}"
end
end
})
end
'';
};
};
}

View file

@ -1,61 +0,0 @@
{
lib,
pkgs,
...
}: {
lsp.servers = {
nixd = {
enable = true;
};
nil_ls = {
enable = true;
};
};
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.nix = {
__unkeyed-1 = "alejandra";
__unkeyed-2 = "injected";
lsp_format = "fallback";
};
formatters = {
alejandra = {
__raw =
#lua
''
function()
local defaultFormatter = require("conform.formatters.alejandra")
return vim.tbl_extend("force", defaultFormatter, {
command = function()
local exe = vim.fn["exepath"]("alejandra")
if exe ~= "" then
return exe
else
return "${lib.getExe pkgs.alejandra}"
end
end
})
end
'';
};
nixfmt = {
__raw =
#lua
''
function()
local defaultFormatter = require("conform.formatters.nixfmt")
return vim.tbl_extend("force", defaultFormatter, {
command = function()
local exe = vim.fn["exepath"]("nixfmt")
if exe ~= "" then
return exe
else
return "${lib.getExe pkgs.nixfmt}"
end
end
})
end
'';
};
};
};
}

View file

@ -1,53 +0,0 @@
{
lib,
pkgs,
...
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.python = {
__unkeyed-1 = "ruff_format";
__unkeyed-2 = "ruff_organize_imports";
lsp_format = "fallback";
};
formatters = {
ruff_organize_imports = {
__raw =
#lua
''
function()
local defaultFormatter = require("conform.formatters.ruff_organize_imports")
return vim.tbl_extend("force", defaultFormatter, {
command = function()
local exe = vim.fn["exepath"]("ruff")
if exe ~= "" then
return exe
else
return "${lib.getExe pkgs.ruff}"
end
end
})
end
'';
};
ruff_format = {
__raw =
#lua
''
function()
local defaultFormatter = require("conform.formatters.ruff_format")
return vim.tbl_extend("force", defaultFormatter, {
command = function()
local exe = vim.fn["exepath"]("ruff")
if exe ~= "" then
return exe
else
return "${lib.getExe pkgs.ruff}"
end
end
})
end
'';
};
};
};
}

View file

@ -1,31 +0,0 @@
{
lib,
pkgs,
...
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.rust = {
__unkeyed-1 = "rustfmt";
lsp_format = "fallback";
};
formatters.rustfmt = {
__raw =
#lua
''
function()
local defaultFormatter = require("conform.formatters.rustfmt")
return vim.tbl_extend("force", defaultFormatter, {
command = function()
local exe = vim.fn["exepath"]("rustfmt")
if exe ~= "" then
return exe
else
return "${lib.getExe pkgs.rustfmt}"
end
end
})
end
'';
};
};
}

View file

@ -1,32 +0,0 @@
{
lib,
pkgs,
...
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.toml = {
__unkeyed-1 = "taplo";
lsp_format = "fallback";
};
formatters.taplo = {
__raw =
#lua
''
function()
local defaultFormatter = require("conform.formatters.taplo")
return vim.tbl_extend("force", defaultFormatter, {
command = function()
local exe = vim.fn["exepath"]("taplo")
if exe ~= "" then
return exe
else
return "${lib.getExe pkgs.taplo}"
end
end,
args = { "format", "-o", "reorder_keys=true", "-o", "reorder_inline_tables=true", "-" },
})
end
'';
};
};
}

View file

@ -1,30 +0,0 @@
{
lib,
pkgs,
...
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.yaml = {
__unkeyed-1 = "deno_fmt";
};
formatters.deno_fmt = {
__raw =
#lua
''
function()
local defaultFormatter = require("conform.formatters.deno_fmt")
return vim.tbl_extend("force", defaultFormatter, {
command = function()
local exe = vim.fn["exepath"]("deno")
if exe ~= "" then
return exe
else
return "${lib.getExe pkgs.deno}"
end
end
})
end
'';
};
};
}

View file

@ -1 +0,0 @@
{...}: {}

View file

@ -1,35 +0,0 @@
{...}: {
youthlic.plugins.lspconfig.enable = true;
lsp = {
inlayHints.enable = true;
luaConfig.post =
#lua
''
do
vim.diagnostic.config({
underline = true,
virtual_lines = {
current_line = true,
},
signs = true,
severity_sort = true,
float = {
scope = "cursor",
source = "if_many",
},
jump = {
on_jump = function(diagnostic, bufnr)
vim.diagnostic.open_float({
scope = "cursor",
severity_sort = true,
source = "if_many",
bufnr = bufnr,
})
end,
wrap = true,
},
})
end
'';
};
}

View file

@ -1,53 +0,0 @@
{
lib,
config,
options,
...
}: let
cfg = config.youthlic;
in {
options = {
youthlic.plugins = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{
name,
lib,
...
}: {
freeformType = lib.types.anything;
options = {
enable = lib.mkEnableOption "nvimPlugins.${name}";
};
}
)
);
default = {};
};
};
config = let
enabledPlugins = lib.filterAttrs (_name: value: value.enable) cfg.plugins;
in
lib.mkMerge [
{
plugins = enabledPlugins;
}
{
plugins = lib.pipe enabledPlugins [
builtins.attrNames
(lib.filter (name: options.plugins.${name} ? luaConfig))
(map (
name:
lib.nameValuePair name {
luaConfig.post =
#lua
''
_M.load("${name}")
'';
}
))
lib.listToAttrs
];
}
];
}

View file

@ -1,33 +0,0 @@
{...}: {
extraConfigLua =
#lua
''
if vim.g.neovide then
vim.o.guifont = [[MonoLisa,Source Han Sans SC,Noto Color Emoji:h16]]
vim.g.neovide_opacity = 0.9
vim.g.linespace = 0.2
vim.g.neovide_text_gamma = 0.8
vim.g.neovide_text_contrast = 0.1
vim.g.neovide_floating_shadow = true
vim.g.neovide_floating_z_height = 10
vim.g.neovide_light_angle_degrees = 45
vim.g.neovide_light_radius = 5
vim.g.neovide_position_animation_length = 0.1
vim.g.neovide_scroll_animation_length = 0.2
vim.g.neovide_scroll_animation_far_lines = 5
vim.g.neovide_hide_mouse_when_typing = true
vim.g.neovide_refresh_rate = 120
vim.g.neovide_confirm_quit = true
vim.g.neovide_input_ime = true
vim.g.neovide_cursor_animation_length = 0.1
vim.g.neovide_cursor_short_animation_length = 0.04
vim.g.neovide_cursor_antialiasing = true
vim.g.neovide_cursor_animate_in_insert_mode = true
vim.g.neovide_cursor_animate_command_line = true
vim.g.neovide_cursor_unfocused_outline_width = 0.125
end
'';
}

View file

@ -1,102 +0,0 @@
{...}: {
globals = {
mapleader = {
__raw =
#lua
''
vim.keycode("<Space>")
'';
};
};
opts = {
autoindent = true;
autoread = true;
backspace = [
"indent"
"eol"
"start"
];
backup = false;
breakindent = true;
breakindentopt = "sbr";
showbreak = "";
cdhome = true;
cedit = "<C-F>";
cmdheight = 1;
completeopt = [
"fuzzy"
"menuone"
"noselect"
"popup"
];
concealcursor = "v";
confirm = true;
cursorline = true;
diffopt = [
"algorithm:minimal"
"closeoff"
"context:20"
"followwrap"
"internal"
"linematch:40"
];
errorbells = true;
expandtab = true;
exrc = true;
foldcolumn = "auto";
fsync = true;
gdefault = false;
helplang = [
"zh"
"en"
];
history = 10000;
hlsearch = true;
ignorecase = true;
smartcase = true;
inccommand = "split";
list = true;
listchars = "tab:--,trail:·,multispace: ,nbsp:,space:·"; # eol:⏎
magic = true;
more = true;
mouse = "a";
number = true;
numberwidth = 4;
relativenumber = true;
scrollback = 100000;
scrolloff = 5;
shiftround = true;
shiftwidth = 2;
showmode = false;
signcolumn = "auto";
smoothscroll = true;
splitbelow = true;
splitright = true;
startofline = true;
swapfile = false;
tabclose = "uselast";
tabstop = 2;
termguicolors = true;
undofile = true;
undolevels = 100000;
virtualedit = [
"block"
"onemore"
];
whichwrap = "b,s,<,>";
wildmenu = true;
wildmode = ["full"];
wildoptions = [
"fuzzy"
"pum"
];
winborder = "rounded";
wrap = true;
};
}

View file

@ -1,36 +0,0 @@
{
makeNixvimWithModule,
pkgs,
lib,
nixvimPlugins,
neovim_git,
}:
makeNixvimWithModule {
inherit pkgs;
extraSpecialArgs = {
inherit nixvimPlugins;
};
module = {
imports = with lib;
youthlic.loadImports' ./. (filter (name: !hasSuffix "/package.nix" (toString name)));
enableMan = true;
enablePrintInit = true;
package = neovim_git;
performance = {
# combinePlugins = {
# enable = true;
# standalonePlugins = [];
# };
byteCompileLua = {
enable = true;
configs = true;
initLua = true;
luaLib = true;
nvimRuntime = true;
plugins = true;
};
};
wrapRc = true;
luaLoader.enable = true;
};
}

View file

@ -1,16 +0,0 @@
{...}: {
youthlic.plugins = {
treesitter = {
enable = true;
# folding = true;
nixvimInjections = true;
settings = {
highlight = {
enable = true;
additional_vim_regex_highlighting = true;
};
indent.enable = true;
};
};
};
}

View file

@ -1,69 +0,0 @@
{...}: {
youthlic.plugins.bufferline = {
enable = true;
settings = {
options = {
close_command = {
__raw =
#lua
''
function(n)
Snacks.bufdelete(n)
end
'';
};
right_mouse_command = {
__raw =
#lua
''
function(n)
Snacks.bufdelete(n)
end
'';
};
diagnostics = "nvim_lsp";
always_show_bufferline = false;
diagnostics_indicator = {
__raw =
#lua
''
function(_, _, diag)
local icons = {
Error = " ",
Warn = " ",
Hint = " ",
Info = " ",
}
local ret = (diag.error and icons.Error .. diag.error .. " " or "")
.. (diag.warning and icons.Warn .. diag.warning or "")
return vim.trim(ret)
end
'';
};
offsets = [
{
filetype = "neo-tree";
text = "Neo-tree";
highlight = "Directory";
text_align = "left";
}
{
filetype = "snacks_layout_box";
}
];
get_element_icon = {
__raw =
#lua
''
function(opts)
local icons = {
octo = "",
}
return icons[opts.filetype]
end
'';
};
};
};
};
}

View file

@ -1,7 +0,0 @@
{...}: {
colorschemes.gruvbox = {
enable = true;
settings = {
};
};
}

View file

@ -1,21 +0,0 @@
{...}: {
youthlic.plugins.lualine = {
enable = true;
luaConfig.pre =
#lua
''
do
vim.g.lualine_laststatus = vim.o.laststatus
if vim.fn.argc(-1) > 0 then
vim.o.statusline = " "
else
vim.o.laststatus = 0
end
end
do
vim.o.laststatus = vim.g.lualine_laststatus
end
'';
settings = {};
};
}

View file

@ -1,38 +0,0 @@
{...}: {
extraConfigLuaPre =
#lua
''
do
_M.plugins = {}
_M.load = function(name)
_M.plugins = vim.tbl_deep_extend("force", _M.plugins, {
name = {
loaded = true,
},
})
vim.schedule(function()
vim.api.nvim_exec_autocmds("User", { pattern = "LazyLoad", modeline = false, data = name })
end)
end
_M._is_loaded = function(name)
local plugins = _M.plugins
return plugins[name] and plugins[name].loaded
end
_M.on_load = function(name, fn)
if _M._is_loaded(name) then
fn(name)
else
vim.api.nvim_create_autocmd("User", {
pattern = "LazyLoad",
callback = function(event)
if event.data == name then
fn(name)
return true
end
end,
})
end
end
end
'';
}

View file

@ -1,85 +0,0 @@
{...}: {
youthlic.plugins.snacks = {
enable = true;
luaConfig.content =
#lua
''
-- Terminal Mappings
_M.__util_plugin_snacks_term_nav = function(direction)
---@param self snacks.terminal
return function(self)
return self:is_floating() and "<c-" .. direction .. ">"
or vim.schedule(function()
vim.cmd.wincmd(direction)
end)
end
end
'';
settings = {
bigfile = {
enabled = true;
};
quickfile = {
enabled = true;
};
terminal = {
win = {
keys = {
nav_h = {
__unkeyed-1 = "<C-w>h";
__unkeyed-2 = {
__raw =
#lua
''
_M.__util_plugin_snacks_term_nav("h")
'';
};
desc = "Go to Left Window";
expr = true;
mode = "t";
};
nav_j = {
__unkeyed-1 = "<C-w>j";
__unkeyed-2 = {
__raw =
#lua
''
_M.__util_plugin_snacks_term_nav("j")
'';
};
desc = "Go to Lower Window";
expr = true;
mode = "t";
};
nav_k = {
__unkeyed-1 = "<C-w>k";
__unkeyed-2 = {
__raw =
#lua
''
_M.__util_plugin_snacks_term_nav("k")
'';
};
desc = "Go to Upper Window";
expr = true;
mode = "t";
};
nav_l = {
__unkeyed-1 = "<C-w>l";
__unkeyed-2 = {
__raw =
#lua
''
_M.__util_plugin_snacks_term_nav("l")
'';
};
desc = "Go to Right Window";
expr = true;
mode = "t";
};
};
};
};
};
};
}

View file

@ -1,13 +0,0 @@
{nixvimPlugins, ...}: {
extraPlugins = [
{
config =
#vim
''
lua << EOF
EOF
'';
plugin = nixvimPlugins.vim-startuptime;
}
];
}