feat: neovim plugins update

This commit is contained in:
gwg313 2024-09-26 11:35:37 -04:00
parent 6e8014e0b5
commit eaf110c96f
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
13 changed files with 1195 additions and 6 deletions

View file

@ -16,9 +16,12 @@ _: {
./illuminate.nix
./lightbulb.nix
./lualine.nix
./luasnip.nix
./lean.nix
./lsp.nix
./mini-bufremove.nix
./mini-surround.nix
./mini-indentscope.nix
./navic.nix
./nix.nix
./noice.nix

View file

@ -76,6 +76,32 @@
leanls.enable = true;
texlab.enable = true;
html.enable = true;
cmake = {
enable = true;
filetypes = ["cmake"];
};
# ccls = {
# enable = true;
# filetypes = [
# "c"
# "cpp"
# "objc"
# "objcpp"
# ];
#
# initOptions.compilationDatabaseDirectory = "build";
# };
clangd = {
enable = true;
filetypes = [
"c"
"cpp"
"objc"
"objcpp"
];
};
};
};
which-key.settings.spec = [

View file

@ -0,0 +1,41 @@
{pkgs, ...}: {
programs.nixvim = {
plugins.luasnip = {
enable = true;
settings = {
enable_autosnippets = true;
store_selection_keys = "<Tab>";
};
fromVscode = [
{
lazyLoad = true;
paths = "${pkgs.vimPlugins.friendly-snippets}";
}
];
fromLua = [{paths = [../snippets];}];
};
extraFiles = {
"personal/luasnip-helper-funcs.lua".text = ''
local M = {}
local ls = require("luasnip")
local sn = ls.snippet_node
local i = ls.insert_node
function M.get_ISO_8601_date()
return os.date("%Y-%m-%d")
end
function M.get_visual(args, parent)
if (#parent.snippet.env.LS_SELECT_RAW > 0) then
return sn(nil, i(1, parent.snippet.env.LS_SELECT_RAW))
else
return sn(nil, i(1, '''))
end
end
return M
'';
};
};
}

View file

@ -0,0 +1,37 @@
{...}: {
programs.nixvim = {
autoCmd = [
{
event = ["FileType"];
pattern = [
"help"
"alpha"
"dashboard"
"neo-tree"
"Trouble"
"trouble"
"lazy"
"mason"
"notify"
"toggleterm"
"lazyterm"
];
callback.__raw = ''
function()
vim.b.miniindentscope_disable = true
end
'';
}
];
plugins = {
mini = {
enable = true;
modules = {
indentscope = {};
};
};
};
};
}

View file

@ -0,0 +1,23 @@
{...}: {
programs.nixvim = {
plugins = {
mini = {
enable = true;
modules = {
surround = {
mappings = {
add = "gsa"; # -- Add surrounding in Normal and Visual modes
delete = "gsd"; # -- Delete surrounding
find = "gsf"; # -- Find surrounding (to the right)
find_left = "gsF"; # -- Find surrounding (to the left)
highlight = "gsh"; # -- Highlight surrounding
replace = "gsr"; # -- Replace surrounding
update_n_lines = "gsn"; # -- Update `n_lines`
};
};
};
};
};
};
}

View file

@ -9,6 +9,56 @@
keywords = "TODO,FIX,HACK";
};
};
keywords = {
FIX = {
alt = [
"FIXME"
"BUG"
"FIXIT"
"ISSUE"
];
color = "error";
icon = " ";
};
HACK = {
color = "warning";
icon = " ";
};
NOTE = {
alt = ["INFO"];
color = "hint";
icon = " ";
};
PERF = {
alt = [
"OPTIM"
"PERFORMANCE"
"OPTIMIZE"
];
icon = " ";
};
TEST = {
alt = [
"TESTING"
"PASSED"
"FAILED"
];
color = "test";
icon = " ";
};
TODO = {
color = "info";
icon = " ";
};
WARN = {
alt = [
"WARNING"
"XXX"
];
color = "warning";
icon = " ";
};
};
};
};
}