feat: neovim plugins update
This commit is contained in:
parent
6e8014e0b5
commit
eaf110c96f
13 changed files with 1195 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = [
|
||||
|
|
|
|||
41
home-manager/modules/neovim/plugins/luasnip.nix
Normal file
41
home-manager/modules/neovim/plugins/luasnip.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
37
home-manager/modules/neovim/plugins/mini-indentscope.nix
Normal file
37
home-manager/modules/neovim/plugins/mini-indentscope.nix
Normal 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 = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
23
home-manager/modules/neovim/plugins/mini-surround.nix
Normal file
23
home-manager/modules/neovim/plugins/mini-surround.nix
Normal 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`
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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 = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue