mirror of
https://github.com/Dichgrem/DCGOS.git
synced 2025-12-17 03:31:59 -05:00
feat:add_nixvim
This commit is contained in:
5
home/nixvim/plugins/util/colorizer.nix
Normal file
5
home/nixvim/plugins/util/colorizer.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
plugins.colorizer = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
34
home/nixvim/plugins/util/debugprint.nix
Normal file
34
home/nixvim/plugins/util/debugprint.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
plugins.debugprint = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
commands = {
|
||||
toggle_comment_debug_prints = "ToggleCommentDebugPrints";
|
||||
delete_debug_prints = "DeleteDebugPrints";
|
||||
};
|
||||
|
||||
display_counter = true;
|
||||
display_snippet = true;
|
||||
|
||||
keymaps = {
|
||||
normal = {
|
||||
plain_below = "<leader>pb";
|
||||
plain_above = "<leader>pB";
|
||||
variable_below = "<leader>pv";
|
||||
variable_above = "<leader>pV";
|
||||
variable_below_alwaysprompt.__raw = "nil";
|
||||
variable_above_alwaysprompt.__raw = "nil";
|
||||
textobj_below = "<leader>po";
|
||||
textobj_above = "<leader>pO";
|
||||
toggle_comment_debug_prints.__raw = "nil";
|
||||
delete_debug_prints.__raw = "nil";
|
||||
};
|
||||
visual = {
|
||||
variable_below = "<leader>pv";
|
||||
variable_above = "<leader>pV";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
17
home/nixvim/plugins/util/harpoon.nix
Normal file
17
home/nixvim/plugins/util/harpoon.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
plugins.harpoon = {
|
||||
enable = true;
|
||||
enableTelescope = true;
|
||||
# keymapsSilent = true;
|
||||
# keymaps = {
|
||||
# addFile = "<leader>ha";
|
||||
# toggleQuickMenu = "<C-e>";
|
||||
# navFile = {
|
||||
# "1" = "<leader>hj";
|
||||
# "2" = "<leader>hk";
|
||||
# "3" = "<leader>hl";
|
||||
# "4" = "<leader>hm";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
5
home/nixvim/plugins/util/kulala.nix
Normal file
5
home/nixvim/plugins/util/kulala.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
plugins.kulala = {
|
||||
enable = false;
|
||||
};
|
||||
}
|
||||
28
home/nixvim/plugins/util/mini.nix
Normal file
28
home/nixvim/plugins/util/mini.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
plugins = {
|
||||
mini = {
|
||||
enable = true;
|
||||
modules = {
|
||||
comment = {
|
||||
options = {
|
||||
customCommentString = ''
|
||||
<cmd>lua require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring<cr>
|
||||
'';
|
||||
};
|
||||
};
|
||||
# Highlight word under cursor
|
||||
cursorword = {
|
||||
delay = 0;
|
||||
};
|
||||
|
||||
# Show indent lines
|
||||
indentscope = {
|
||||
symbol = "│";
|
||||
draw.delay = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ts-context-commentstring.enable = true;
|
||||
};
|
||||
}
|
||||
5
home/nixvim/plugins/util/nvim-autopairs.nix
Normal file
5
home/nixvim/plugins/util/nvim-autopairs.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
plugins.nvim-autopairs = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
5
home/nixvim/plugins/util/nvim-surround.nix
Normal file
5
home/nixvim/plugins/util/nvim-surround.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
plugins.nvim-surround = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
5
home/nixvim/plugins/util/persistence.nix
Normal file
5
home/nixvim/plugins/util/persistence.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
plugins.persistence = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
5
home/nixvim/plugins/util/plenary.nix
Normal file
5
home/nixvim/plugins/util/plenary.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
plenary-nvim
|
||||
];
|
||||
}
|
||||
6
home/nixvim/plugins/util/project-nvim.nix
Normal file
6
home/nixvim/plugins/util/project-nvim.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
plugins.project-nvim = {
|
||||
enable = true;
|
||||
enableTelescope = true;
|
||||
};
|
||||
}
|
||||
103
home/nixvim/plugins/util/snacks.nix
Normal file
103
home/nixvim/plugins/util/snacks.nix
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
extraConfigLuaPre = lib.mkOrder 1 (
|
||||
lib.optionalString
|
||||
(config.plugins.snacks.enable && config.plugins.snacks.settings.profiler.enabled) # Lua
|
||||
|
||||
''
|
||||
if vim.env.PROF then
|
||||
local snacks = "${pkgs.vimPlugins.snacks-nvim}"
|
||||
vim.opt.rtp:append(snacks)
|
||||
require("snacks.profiler").startup({
|
||||
startup = {
|
||||
-- event = "VimEnter", -- stop profiler on this event. Defaults to `VimEnter`
|
||||
event = "UIEnter",
|
||||
-- event = "VeryLazy",
|
||||
},
|
||||
})
|
||||
end
|
||||
''
|
||||
);
|
||||
|
||||
plugins = {
|
||||
snacks = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
bigfile = {
|
||||
enabled = true;
|
||||
size = 1024 * 1024; # 1MB
|
||||
setup.__raw = ''
|
||||
function(ctx)
|
||||
${lib.optionalString config.plugins.indent-blankline.enable ''require("ibl").setup_buffer(0, { enabled = false })''}
|
||||
${lib.optionalString (lib.hasAttr "indentscope" config.plugins.mini.modules) ''vim.b.miniindentscope_disable = true''}
|
||||
${lib.optionalString config.plugins.illuminate.enable ''require("illuminate").pause_buf()''}
|
||||
|
||||
-- Disable line numbers and relative line numbers
|
||||
vim.cmd("setlocal nonumber norelativenumber")
|
||||
|
||||
-- Syntax highlighting
|
||||
vim.schedule(function()
|
||||
vim.bo[ctx.buf].syntax = ctx.ft
|
||||
end)
|
||||
|
||||
-- Disable matchparen
|
||||
vim.cmd("let g:loaded_matchparen = 1")
|
||||
|
||||
-- Disable cursor line and column
|
||||
vim.cmd("setlocal nocursorline nocursorcolumn")
|
||||
|
||||
-- Disable folding
|
||||
vim.cmd("setlocal nofoldenable")
|
||||
|
||||
-- Disable sign column
|
||||
vim.cmd("setlocal signcolumn=no")
|
||||
|
||||
-- Disable swap file and undo file
|
||||
vim.cmd("setlocal noswapfile noundofile")
|
||||
|
||||
-- Disable mini animate
|
||||
vim.b.minianimate_disable = true
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
gitbrowse.enabled = true;
|
||||
gitui.enabled = true;
|
||||
lazygit.enabled = true;
|
||||
profiler.enabled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>go";
|
||||
action = "<cmd>lua Snacks.gitbrowse()<CR>";
|
||||
options = {
|
||||
desc = "Open file in browser";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>gg";
|
||||
action = "<cmd>lua Snacks.lazygit()<CR>";
|
||||
options = {
|
||||
desc = "Open lazygit";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>gG";
|
||||
action = "<cmd>lua Snacks.terminal({'gitui'})<CR>";
|
||||
options = {
|
||||
desc = "Open Gitui";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
5
home/nixvim/plugins/util/wakatime.nix
Normal file
5
home/nixvim/plugins/util/wakatime.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
plugins.wakatime = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user