neovim updates
This commit is contained in:
parent
57c3bb3e61
commit
308bdbebf9
10 changed files with 102 additions and 47 deletions
|
|
@ -2,7 +2,8 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
# enable ExecShield protection
|
# enable ExecShield protection
|
||||||
# 2 enables ExecShield by default unless applications bits are set to disabled
|
# 2 enables ExecShield by default unless applications bits are set to disabled
|
||||||
|
|
@ -29,6 +30,7 @@
|
||||||
# - 1: only a parent process can be debugged
|
# - 1: only a parent process can be debugged
|
||||||
# - 2: only admins can use ptrace (CAP_SYS_PTRACE capability required)
|
# - 2: only admins can use ptrace (CAP_SYS_PTRACE capability required)
|
||||||
# - 3: disables ptrace completely, reboot is required to re-enable ptrace
|
# - 3: disables ptrace completely, reboot is required to re-enable ptrace
|
||||||
|
# If you need ptrace to work, then avoid non-ancestor ptrace access to running processes and their credentials, and use value "1".
|
||||||
"kernel.yama.ptrace_scope" = 3;
|
"kernel.yama.ptrace_scope" = 3;
|
||||||
|
|
||||||
# restrict kernel logs to root only
|
# restrict kernel logs to root only
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
kubernetes.enable = lib.mkEnableOption "Enables Kubernetes and tooling";
|
kubernetes.enable = lib.mkEnableOption "Enables Kubernetes and tooling";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@
|
||||||
portal
|
portal
|
||||||
atac
|
atac
|
||||||
dblab
|
dblab
|
||||||
|
gobang
|
||||||
|
|
||||||
# TUI Apps
|
# TUI Apps
|
||||||
#ncdu_2
|
#ncdu_2
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,13 @@ _: {
|
||||||
./mini-indentscope.nix
|
./mini-indentscope.nix
|
||||||
./glow.nix
|
./glow.nix
|
||||||
./navic.nix
|
./navic.nix
|
||||||
|
./neoscroll.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
./noice.nix
|
./noice.nix
|
||||||
./notify.nix
|
./notify.nix
|
||||||
./precognition.nix
|
./precognition.nix
|
||||||
./spectre.nix
|
./spectre.nix
|
||||||
|
./snacks.nix
|
||||||
./refactoring.nix
|
./refactoring.nix
|
||||||
./render-markdown.nix
|
./render-markdown.nix
|
||||||
./telescope.nix
|
./telescope.nix
|
||||||
|
|
@ -48,5 +50,6 @@ _: {
|
||||||
./yazi.nix
|
./yazi.nix
|
||||||
./yanky.nix
|
./yanky.nix
|
||||||
./vimtex.nix
|
./vimtex.nix
|
||||||
|
./zenmode.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,32 +34,6 @@
|
||||||
silent = true;
|
silent = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>bc";
|
|
||||||
action.__raw =
|
|
||||||
# lua
|
|
||||||
''
|
|
||||||
function ()
|
|
||||||
local current = vim.api.nvim_get_current_buf()
|
|
||||||
|
|
||||||
local get_listed_bufs = function()
|
|
||||||
return vim.tbl_filter(function(bufnr)
|
|
||||||
return vim.api.nvim_buf_get_option(bufnr, "buflisted")
|
|
||||||
end, vim.api.nvim_list_bufs())
|
|
||||||
end
|
|
||||||
|
|
||||||
for _, bufnr in ipairs(get_listed_bufs()) do
|
|
||||||
if bufnr ~= current
|
|
||||||
then require("mini.bufremove").delete(bufnr)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
options = {
|
|
||||||
desc = "Close all buffers but current";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
plugins = {
|
plugins = {
|
||||||
mini = {
|
mini = {
|
||||||
|
|
|
||||||
8
home-manager/modules/neovim/plugins/neoscroll.nix
Normal file
8
home-manager/modules/neovim/plugins/neoscroll.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins.neoscroll = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
73
home-manager/modules/neovim/plugins/snacks.nix
Normal file
73
home-manager/modules/neovim/plugins/snacks.nix
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins.snacks = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
bigfile.enabled = true;
|
||||||
|
bufdelete.enabled = true;
|
||||||
|
gitbrowse.enabled = true;
|
||||||
|
lazygit.enabled = true;
|
||||||
|
statuscolumn = {
|
||||||
|
enabled = true;
|
||||||
|
|
||||||
|
folds = {
|
||||||
|
open = true;
|
||||||
|
git_hl = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>gg";
|
||||||
|
action = "<cmd>lua Snacks.lazygit()<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Open Lazygit";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>go";
|
||||||
|
action = "<cmd>lua Snacks.gitbrowse()<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Open file in browser";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>gl";
|
||||||
|
action = "<cmd>lua Snacks.lazygit.log()<CR>";
|
||||||
|
options = {
|
||||||
|
desc = "Open Lazygit Log (cwd)";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>c";
|
||||||
|
action = ''<cmd>lua Snacks.bufdelete.delete()<cr>'';
|
||||||
|
options = {
|
||||||
|
desc = "Close buffer";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>bc";
|
||||||
|
action = ''<cmd>lua Snacks.bufdelete.other()<cr>'';
|
||||||
|
options = {
|
||||||
|
desc = "Close all buffers but current";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>bC";
|
||||||
|
action = ''<cmd>lua Snacks.bufdelete.all()<cr>'';
|
||||||
|
options = {
|
||||||
|
desc = "Close all buffers";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
plugins.toggleterm = {
|
plugins.toggleterm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -35,23 +36,6 @@
|
||||||
silent = true;
|
silent = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>gg";
|
|
||||||
action.__raw =
|
|
||||||
# lua
|
|
||||||
''
|
|
||||||
function()
|
|
||||||
local toggleterm = require('toggleterm.terminal')
|
|
||||||
|
|
||||||
toggleterm.Terminal:new({cmd = 'lazygit',hidden = true}):toggle()
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
options = {
|
|
||||||
desc = "Open Lazygit";
|
|
||||||
silent = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
8
home-manager/modules/neovim/plugins/zenmode.nix
Normal file
8
home-manager/modules/neovim/plugins/zenmode.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins.zen-mode = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue