disable plymouth, change kernel, update neovim config
This commit is contained in:
parent
7b62ce1e32
commit
43ffa50146
187
home/programs/nvim/autocmds.nix
Normal file
187
home/programs/nvim/autocmds.nix
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
autoGroups = {
|
||||||
|
auto_quit.clear = true;
|
||||||
|
autoview.clear = true;
|
||||||
|
bufferline.clear = true;
|
||||||
|
checktime.clear = true;
|
||||||
|
create_dir.clear = true;
|
||||||
|
editorconfig_filetype.clear = true;
|
||||||
|
file_user_events.clear = true;
|
||||||
|
highlighturl.clear = true;
|
||||||
|
highlightyank.clear = true;
|
||||||
|
large_buf_settings.clear = true;
|
||||||
|
q_close_windows.clear = true;
|
||||||
|
terminal_settings.clear = true;
|
||||||
|
unlist_quickfix.clear = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
autoCmd = [
|
||||||
|
# auto_quit
|
||||||
|
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L18-L46
|
||||||
|
{
|
||||||
|
desc =
|
||||||
|
"Quit neovim if more than one window is open and only sidebar windows are list";
|
||||||
|
event = "BufEnter";
|
||||||
|
group = "auto_quit";
|
||||||
|
|
||||||
|
callback.__raw = ''
|
||||||
|
function()
|
||||||
|
local wins = vim.api.nvim_tabpage_list_wins(0)
|
||||||
|
-- Both neo-tree and aerial will auto-quit if there is only a single window left
|
||||||
|
if #wins <= 1 then return end
|
||||||
|
local sidebar_fts = { aerial = true, ["neo-tree"] = true }
|
||||||
|
for _, winid in ipairs(wins) do
|
||||||
|
if vim.api.nvim_win_is_valid(winid) then
|
||||||
|
local bufnr = vim.api.nvim_win_get_buf(winid)
|
||||||
|
local filetype = vim.bo[bufnr].filetype
|
||||||
|
-- If any visible windows are not sidebars, early return
|
||||||
|
if not sidebar_fts[filetype] then
|
||||||
|
return
|
||||||
|
-- If the visible window is a sidebar
|
||||||
|
else
|
||||||
|
-- only count filetypes once, so remove a found sidebar from the detection
|
||||||
|
sidebar_fts[filetype] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #vim.api.nvim_list_tabpages() > 1 then
|
||||||
|
vim.cmd.tabclose()
|
||||||
|
else
|
||||||
|
vim.cmd.qall()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
# autoview
|
||||||
|
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L49-L70
|
||||||
|
{
|
||||||
|
desc = "Save view with mkview for real files";
|
||||||
|
event = [ "BufWinLeave" "BufWritePost" "WinLeave" ];
|
||||||
|
group = "autoview";
|
||||||
|
|
||||||
|
callback.__raw = ''
|
||||||
|
function(event)
|
||||||
|
if vim.b[event.buf].view_activated then vim.cmd.mkview { mods = { emsg_silent = true } } end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
desc =
|
||||||
|
"Try to load file view if available and enable view saving for real files";
|
||||||
|
event = "BufWinEnter";
|
||||||
|
group = "autoview";
|
||||||
|
|
||||||
|
callback.__raw = ''
|
||||||
|
function(event)
|
||||||
|
if not vim.b[event.buf].view_activated then
|
||||||
|
local filetype = vim.bo[event.buf].filetype
|
||||||
|
local buftype = vim.bo[event.buf].buftype
|
||||||
|
local ignore_filetypes = { "gitcommit", "gitrebase", "svg", "hgcommit" }
|
||||||
|
if buftype == "" and filetype and filetype ~= "" and not vim.tbl_contains(ignore_filetypes, filetype) then
|
||||||
|
vim.b[event.buf].view_activated = true
|
||||||
|
vim.cmd.loadview { mods = { emsg_silent = true } }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
# checktime
|
||||||
|
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L118-L122
|
||||||
|
{
|
||||||
|
desc = "Check if buffers changed on editor focus";
|
||||||
|
event = [ "FocusGained" "TermClose" "TermLeave" ];
|
||||||
|
group = "checktime";
|
||||||
|
command = "checktime";
|
||||||
|
}
|
||||||
|
|
||||||
|
# editorconfig_filetype
|
||||||
|
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L135-L144
|
||||||
|
{
|
||||||
|
desc =
|
||||||
|
"Configure editorconfig after filetype detection to override `ftplugin`s";
|
||||||
|
event = "FileType";
|
||||||
|
group = "editorconfig_filetype";
|
||||||
|
|
||||||
|
callback.__raw = ''
|
||||||
|
function(args)
|
||||||
|
if vim.F.if_nil(vim.b.editorconfig, vim.g.editorconfig, true) then
|
||||||
|
local editorconfig_avail, editorconfig = pcall(require, "editorconfig")
|
||||||
|
if editorconfig_avail then editorconfig.config(args.buf) end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
# highlightyank
|
||||||
|
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L206-L211
|
||||||
|
{
|
||||||
|
desc = "Highlight yanked text";
|
||||||
|
event = "TextYankPost";
|
||||||
|
group = "highlightyank";
|
||||||
|
pattern = "*";
|
||||||
|
|
||||||
|
callback.__raw = ''
|
||||||
|
function()
|
||||||
|
vim.highlight.on_yank()
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
# q_close_windows
|
||||||
|
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L242-L255
|
||||||
|
{
|
||||||
|
desc = "Make q close help, man, quickfix, dap floats";
|
||||||
|
event = "BufWinEnter";
|
||||||
|
group = "q_close_windows";
|
||||||
|
|
||||||
|
callback.__raw = ''
|
||||||
|
function(event)
|
||||||
|
if vim.tbl_contains({ "help", "nofile", "quickfix" }, vim.bo[event.buf].buftype) then
|
||||||
|
vim.keymap.set("n", "q", "<Cmd>close<CR>", {
|
||||||
|
desc = "Close window",
|
||||||
|
buffer = event.buf,
|
||||||
|
silent = true,
|
||||||
|
nowait = true,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
# terminal_settings
|
||||||
|
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L258-L266
|
||||||
|
{
|
||||||
|
desc = "Disable line number/fold column/sign column for terminals";
|
||||||
|
event = "TermOpen";
|
||||||
|
group = "terminal_settings";
|
||||||
|
|
||||||
|
callback.__raw = ''
|
||||||
|
function()
|
||||||
|
vim.opt_local.number = false
|
||||||
|
vim.opt_local.relativenumber = false
|
||||||
|
vim.opt_local.foldcolumn = "0"
|
||||||
|
vim.opt_local.signcolumn = "no"
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
# unlist_quickfix
|
||||||
|
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L270-L275
|
||||||
|
{
|
||||||
|
desc = "Unlist quickfix buffers";
|
||||||
|
event = "FileType";
|
||||||
|
group = "unlist_quickfix";
|
||||||
|
pattern = "qf";
|
||||||
|
|
||||||
|
callback.__raw = ''
|
||||||
|
function()
|
||||||
|
vim.opt_local.buflisted = false
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -8,15 +8,17 @@
|
|||||||
./plugins/markdown.nix
|
./plugins/markdown.nix
|
||||||
./plugins/tree.nix
|
./plugins/tree.nix
|
||||||
./plugins/ui.nix
|
./plugins/ui.nix
|
||||||
|
./plugins/lualine.nix
|
||||||
./plugins/utils.nix
|
./plugins/utils.nix
|
||||||
./plugins/dap.nix
|
./plugins/dap.nix
|
||||||
./plugins/telescope.nix
|
./plugins/telescope.nix
|
||||||
./plugins/zenmode.nix
|
# ./plugins/zenmode.nix
|
||||||
./plugins/project.nix
|
./plugins/project.nix
|
||||||
./plugins/treesitter.nix
|
./plugins/treesitter.nix
|
||||||
|
|
||||||
./options.nix
|
./options.nix
|
||||||
./keymaps.nix
|
./keymaps.nix
|
||||||
|
./autocmds.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.nixvim.enable = true;
|
programs.nixvim.enable = true;
|
||||||
|
|||||||
@ -313,6 +313,16 @@
|
|||||||
action = "<cmd>lua require('dap').toggle_breakpoint()<CR>";
|
action = "<cmd>lua require('dap').toggle_breakpoint()<CR>";
|
||||||
options.desc = "Toggle breakpoint";
|
options.desc = "Toggle breakpoint";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
key = "<S-l>";
|
||||||
|
action = "<cmd>BufferLineCycleNext<CR>";
|
||||||
|
options.desc = "Go to next buffer";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<S-h>";
|
||||||
|
action = "<cmd>BufferLineCyclePrev<CR>";
|
||||||
|
options.desc = "Go to previous buffer";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,40 +1,152 @@
|
|||||||
{
|
{
|
||||||
programs.nixvim.globals.mapleader = " ";
|
programs.nixvim = {
|
||||||
programs.nixvim.opts = {
|
globals.mapleader = " ";
|
||||||
updatetime = 50; # Faster completion
|
opts = {
|
||||||
|
|
||||||
number = true;
|
|
||||||
relativenumber = true;
|
|
||||||
|
|
||||||
autoindent = true;
|
autoindent = true;
|
||||||
clipboard = "unnamed,unnamedplus";
|
|
||||||
|
|
||||||
expandtab = true;
|
|
||||||
tabstop = 2;
|
|
||||||
softtabstop = 2;
|
|
||||||
shiftwidth = 2;
|
|
||||||
smartindent = true;
|
smartindent = true;
|
||||||
breakindent = true;
|
|
||||||
|
|
||||||
ignorecase = true;
|
|
||||||
incsearch = true;
|
incsearch = true;
|
||||||
hlsearch = true;
|
hlsearch = true;
|
||||||
smartcase = true;
|
|
||||||
wildmode = "list:longest";
|
wildmode = "list:longest";
|
||||||
completeopt = [ "menuone" "noselect" "noinsert" ];
|
|
||||||
signcolumn = "yes";
|
|
||||||
cursorline = false;
|
|
||||||
scrolloff = 8;
|
scrolloff = 8;
|
||||||
mouse = "a";
|
|
||||||
termguicolors = true;
|
|
||||||
showmode = false;
|
|
||||||
|
|
||||||
wrap = false;
|
|
||||||
linebreak = true;
|
|
||||||
|
|
||||||
swapfile = false;
|
swapfile = false;
|
||||||
undofile = true;
|
|
||||||
conceallevel = 3;
|
conceallevel = 3;
|
||||||
|
clipboard = "unnamed,unnamedplus";
|
||||||
|
|
||||||
|
# Don't stop backspace at insert
|
||||||
|
backspace.__raw = ''
|
||||||
|
vim.list_extend(vim.opt.backspace:get(), { "nostop" })
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Keep visual indentation on wrapped lines
|
||||||
|
breakindent = true;
|
||||||
|
|
||||||
|
# Hide command line unless needed
|
||||||
|
cmdheight = 0;
|
||||||
|
|
||||||
|
# Insert mode completion options
|
||||||
|
completeopt = [ "menu" "menuone" "noselect" ];
|
||||||
|
|
||||||
|
# Raise a dialog asking if you wish to save the current file(s)
|
||||||
|
confirm = true;
|
||||||
|
|
||||||
|
# Copy previous indentation on autoindenting
|
||||||
|
copyindent = true;
|
||||||
|
|
||||||
|
# Highlight current line
|
||||||
|
cursorline = true;
|
||||||
|
|
||||||
|
# Enable linematch diff algorithm
|
||||||
|
diffopt.__raw = ''
|
||||||
|
vim.list_extend(vim.opt.diffopt:get(), { "algorithm:histogram", "linematch:60" })
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Expand <Tab> to spaces
|
||||||
|
expandtab = true;
|
||||||
|
|
||||||
|
# Disable `~` on nonexistent lines
|
||||||
|
fillchars = { eob = " "; };
|
||||||
|
|
||||||
|
# Enable fold with all code unfolded
|
||||||
|
foldcolumn = "1";
|
||||||
|
foldenable = true;
|
||||||
|
foldlevel = 99;
|
||||||
|
foldlevelstart = 99;
|
||||||
|
|
||||||
|
# Ignore case in search patterns
|
||||||
|
ignorecase = true;
|
||||||
|
|
||||||
|
# Show substitution preview in split window
|
||||||
|
inccommand = "split";
|
||||||
|
|
||||||
|
# Infer casing on word completion
|
||||||
|
infercase = true;
|
||||||
|
|
||||||
|
# Global statusline
|
||||||
|
laststatus = 3;
|
||||||
|
|
||||||
|
# Wrap lines at 'breakat'
|
||||||
|
linebreak = true;
|
||||||
|
|
||||||
|
# Enable mouse support
|
||||||
|
mouse = "a";
|
||||||
|
|
||||||
|
# Show line numbers
|
||||||
|
number = true;
|
||||||
|
|
||||||
|
# Preserve indentation as much as possible
|
||||||
|
preserveindent = true;
|
||||||
|
|
||||||
|
# Height of the popup menu
|
||||||
|
pumheight = 10;
|
||||||
|
|
||||||
|
# Display line numbers relative to current line
|
||||||
|
relativenumber = true;
|
||||||
|
|
||||||
|
# Minimal number of lines to keep around the cursor
|
||||||
|
# This has the effect to move the view along with current line
|
||||||
|
#scrolloff = 999;
|
||||||
|
|
||||||
|
# Number of spaces to use for indentation
|
||||||
|
shiftwidth = 2;
|
||||||
|
|
||||||
|
# Disable search count wrap and startup messages
|
||||||
|
shortmess.__raw = ''
|
||||||
|
vim.tbl_deep_extend("force", vim.opt.shortmess:get(), { s = true, I = true })
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Disable showing modes in command line
|
||||||
|
showmode = false;
|
||||||
|
|
||||||
|
# Always show tabline
|
||||||
|
showtabline = 2;
|
||||||
|
|
||||||
|
# Show signs column
|
||||||
|
signcolumn = "yes";
|
||||||
|
|
||||||
|
# Override ignorecase if search pattern contains uppercase characters
|
||||||
|
smartcase = true;
|
||||||
|
|
||||||
|
# Number of spaces input on <Tab>
|
||||||
|
softtabstop = 2;
|
||||||
|
|
||||||
|
# Open horizontal split below (:split)
|
||||||
|
splitbelow = true;
|
||||||
|
|
||||||
|
# Open vertical split to the right (:vsplit)
|
||||||
|
splitright = true;
|
||||||
|
|
||||||
|
# Number of spaces to represent a <Tab>
|
||||||
|
tabstop = 2;
|
||||||
|
|
||||||
|
# Enables 24-bit RGB color
|
||||||
|
termguicolors = true;
|
||||||
|
|
||||||
|
# Shorter timeout duration
|
||||||
|
timeoutlen = 500;
|
||||||
|
|
||||||
|
# Set window title to the filename
|
||||||
|
title = true;
|
||||||
|
|
||||||
|
# Save undo history to undo file (in $XDG_STATE_HOME/nvim/undo)
|
||||||
|
undofile = true;
|
||||||
|
|
||||||
|
viewoptions.__raw = ''
|
||||||
|
vim.tbl_filter(function(val) return val ~= "curdir" end, vim.opt.viewoptions:get())
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Enable virtual edit in visual block mode
|
||||||
|
# This has the effect of selecting empty cells beyond lines boundaries
|
||||||
|
virtualedit = "block";
|
||||||
|
|
||||||
|
# Disable line wrapping
|
||||||
|
wrap = false;
|
||||||
|
|
||||||
|
# Disable making a backup before overwriting a file
|
||||||
|
writebackup = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
programs.nixvim.extraConfigLuaPost = ''
|
programs.nixvim.extraConfigLuaPost = ''
|
||||||
vim.g.neovide_scale_factor = 1.0
|
vim.g.neovide_scale_factor = 1.0
|
||||||
|
|||||||
@ -111,6 +111,5 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,7 +50,17 @@ in {
|
|||||||
val = " Find file";
|
val = " Find file";
|
||||||
on_press.__raw = "function() vim.cmd[[Telescope find_files]] end";
|
on_press.__raw = "function() vim.cmd[[Telescope find_files]] end";
|
||||||
opts = {
|
opts = {
|
||||||
shortcut = "nf";
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"f"
|
||||||
|
":Telescope find_files <CR>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "f";
|
||||||
position = "center";
|
position = "center";
|
||||||
cursor = 3;
|
cursor = 3;
|
||||||
width = 50;
|
width = 50;
|
||||||
@ -64,7 +74,17 @@ in {
|
|||||||
val = " New file";
|
val = " New file";
|
||||||
on_press.__raw = "function() vim.cmd[[ene]] end";
|
on_press.__raw = "function() vim.cmd[[ene]] end";
|
||||||
opts = {
|
opts = {
|
||||||
shortcut = "nn";
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"n"
|
||||||
|
":ene <CR>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "n";
|
||||||
position = "center";
|
position = "center";
|
||||||
cursor = 3;
|
cursor = 3;
|
||||||
width = 50;
|
width = 50;
|
||||||
@ -78,7 +98,17 @@ in {
|
|||||||
val = " NixOs Config";
|
val = " NixOs Config";
|
||||||
on_press.__raw = "function() vim.cmd[[Neotree ${configDir}]] end";
|
on_press.__raw = "function() vim.cmd[[Neotree ${configDir}]] end";
|
||||||
opts = {
|
opts = {
|
||||||
shortcut = "nc";
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"c"
|
||||||
|
":Neotree ${configDir} <CR>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "c";
|
||||||
position = "center";
|
position = "center";
|
||||||
cursor = 3;
|
cursor = 3;
|
||||||
width = 50;
|
width = 50;
|
||||||
@ -93,7 +123,17 @@ in {
|
|||||||
on_press.__raw =
|
on_press.__raw =
|
||||||
"function() vim.cmd[[e ${configDir}/docs/KEYBINDINGS.md]] end";
|
"function() vim.cmd[[e ${configDir}/docs/KEYBINDINGS.md]] end";
|
||||||
opts = {
|
opts = {
|
||||||
shortcut = "nc";
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"b"
|
||||||
|
":e ${configDir}/docs/KEYBINDINGS.md <CR>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "b";
|
||||||
position = "center";
|
position = "center";
|
||||||
cursor = 3;
|
cursor = 3;
|
||||||
width = 50;
|
width = 50;
|
||||||
@ -107,7 +147,17 @@ in {
|
|||||||
val = " Recently used";
|
val = " Recently used";
|
||||||
on_press.__raw = "function() vim.cmd[[Telescope oldfiles]] end";
|
on_press.__raw = "function() vim.cmd[[Telescope oldfiles]] end";
|
||||||
opts = {
|
opts = {
|
||||||
shortcut = "no";
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"o"
|
||||||
|
":Telescope oldfiles <CR>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "o";
|
||||||
position = "center";
|
position = "center";
|
||||||
cursor = 3;
|
cursor = 3;
|
||||||
width = 50;
|
width = 50;
|
||||||
@ -121,7 +171,17 @@ in {
|
|||||||
val = " Find text";
|
val = " Find text";
|
||||||
on_press.__raw = "function() vim.cmd[[Telescope live_grep]] end";
|
on_press.__raw = "function() vim.cmd[[Telescope live_grep]] end";
|
||||||
opts = {
|
opts = {
|
||||||
shortcut = "nt";
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"t"
|
||||||
|
":Telescope live_grep <CR>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "t";
|
||||||
position = "center";
|
position = "center";
|
||||||
cursor = 3;
|
cursor = 3;
|
||||||
width = 50;
|
width = 50;
|
||||||
@ -135,7 +195,17 @@ in {
|
|||||||
val = " Quit Neovim";
|
val = " Quit Neovim";
|
||||||
on_press.__raw = "function() vim.cmd[[qa]] end";
|
on_press.__raw = "function() vim.cmd[[qa]] end";
|
||||||
opts = {
|
opts = {
|
||||||
shortcut = "nq";
|
keymap = [
|
||||||
|
"n"
|
||||||
|
"q"
|
||||||
|
":qa <CR>"
|
||||||
|
{
|
||||||
|
noremap = true;
|
||||||
|
silent = true;
|
||||||
|
nowait = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
shortcut = "q";
|
||||||
position = "center";
|
position = "center";
|
||||||
cursor = 3;
|
cursor = 3;
|
||||||
width = 50;
|
width = 50;
|
||||||
|
|||||||
31
home/programs/nvim/plugins/lualine.nix
Normal file
31
home/programs/nvim/plugins/lualine.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
programs.nixvim.plugins.lualine = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
options.disabled_filetypes.statusline =
|
||||||
|
[ "dashboard" "alpha" "neo-tree" ];
|
||||||
|
|
||||||
|
alwaysDivideMiddle = true;
|
||||||
|
globalstatus = true;
|
||||||
|
ignoreFocus = [ "neo-tree" ];
|
||||||
|
extensions = [ "fzf" ];
|
||||||
|
theme = "auto";
|
||||||
|
componentSeparators = {
|
||||||
|
left = "|";
|
||||||
|
right = "|";
|
||||||
|
};
|
||||||
|
sectionSeparators = {
|
||||||
|
left = ""; #
|
||||||
|
right = ""; #
|
||||||
|
};
|
||||||
|
sections = {
|
||||||
|
lualine_a = [ "mode" ];
|
||||||
|
lualine_b = [ "branch" "diff" "diagnostics" ];
|
||||||
|
lualine_c = [ "filename" ];
|
||||||
|
lualine_x = [ "filetype" ];
|
||||||
|
lualine_y = [ "progress" "selectioncount" ];
|
||||||
|
lualine_z = [ ''" " .. os.date("%R")'' ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -1,4 +1,3 @@
|
|||||||
# The render-markdown.nvim plugin is a plugin that renders markdown files in a neovim in a more readable way.
|
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
accent = "#${config.lib.stylix.colors.base0D}";
|
accent = "#${config.lib.stylix.colors.base0D}";
|
||||||
@ -11,7 +10,6 @@ in {
|
|||||||
plugins.mkdnflow = {
|
plugins.mkdnflow = {
|
||||||
enable = true;
|
enable = true;
|
||||||
modules = { conceal = false; };
|
modules = { conceal = false; };
|
||||||
|
|
||||||
toDo.symbols = [ " " "-" "x" "!" "/" ];
|
toDo.symbols = [ " " "-" "x" "!" "/" ];
|
||||||
mappings = {
|
mappings = {
|
||||||
MkdnCreateLink = false;
|
MkdnCreateLink = false;
|
||||||
@ -132,8 +130,9 @@ in {
|
|||||||
RenderMarkdownH4.fg = accent-alt;
|
RenderMarkdownH4.fg = accent-alt;
|
||||||
RenderMarkdownH5.fg = accent-alt;
|
RenderMarkdownH5.fg = accent-alt;
|
||||||
RenderMarkdownH6.fg = accent-alt;
|
RenderMarkdownH6.fg = accent-alt;
|
||||||
RenderMarkdownTodo.fg = muted;
|
RenderMarkdownTodo.fg = "#f78c6c";
|
||||||
RenderMarkdownWarning.fg = accent;
|
RenderMarkdownWarning.fg = "#ff5370";
|
||||||
|
RenderMarkdownDone.fg = muted;
|
||||||
};
|
};
|
||||||
plugins.headlines = {
|
plugins.headlines = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -156,6 +155,7 @@ in {
|
|||||||
settings = {
|
settings = {
|
||||||
heading = {
|
heading = {
|
||||||
icons = [ "# " " " " " " " " " " " ];
|
icons = [ "# " " " " " " " " " " " ];
|
||||||
|
sign = false;
|
||||||
backgrounds = [ "RenderMarkdownBg" ];
|
backgrounds = [ "RenderMarkdownBg" ];
|
||||||
foregrounds = [
|
foregrounds = [
|
||||||
"RenderMarkdownH1"
|
"RenderMarkdownH1"
|
||||||
@ -168,7 +168,7 @@ in {
|
|||||||
};
|
};
|
||||||
checkbox = {
|
checkbox = {
|
||||||
unchecked = { highlight = "RenderMarkdownTodo"; };
|
unchecked = { highlight = "RenderMarkdownTodo"; };
|
||||||
checked = { highlight = "RenderMarkdownTodo"; };
|
checked = { highlight = "RenderMarkdownDone"; };
|
||||||
custom = {
|
custom = {
|
||||||
pending = {
|
pending = {
|
||||||
raw = "[-]";
|
raw = "[-]";
|
||||||
@ -177,13 +177,13 @@ in {
|
|||||||
};
|
};
|
||||||
important = {
|
important = {
|
||||||
raw = "[!]";
|
raw = "[!]";
|
||||||
rendered = " ";
|
rendered = " ";
|
||||||
highlight = "RenderMarkdownWarning";
|
highlight = "RenderMarkdownWarning";
|
||||||
};
|
};
|
||||||
cancel = {
|
cancel = {
|
||||||
raw = "[/]";
|
raw = "[/]";
|
||||||
rendered = " ";
|
rendered = " ";
|
||||||
highlight = "RenderMarkdownTodo";
|
highlight = "RenderMarkdownWarning";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,54 +1,13 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home.packages = with pkgs; [ ctags ];
|
home.packages = with pkgs; [ ctags ];
|
||||||
|
programs.nixvim.plugins = {
|
||||||
programs.nixvim = {
|
|
||||||
plugins = {
|
|
||||||
lualine = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
options.disabled_filetypes.statusline =
|
|
||||||
[ "dashboard" "alpha" "neo-tree" ];
|
|
||||||
|
|
||||||
alwaysDivideMiddle = true;
|
|
||||||
globalstatus = true;
|
|
||||||
ignoreFocus = [ "neo-tree" ];
|
|
||||||
extensions = [ "fzf" ];
|
|
||||||
theme = "auto";
|
|
||||||
componentSeparators = {
|
|
||||||
left = "|";
|
|
||||||
right = "|";
|
|
||||||
};
|
|
||||||
sectionSeparators = {
|
|
||||||
left = ""; #
|
|
||||||
right = ""; #
|
|
||||||
};
|
|
||||||
sections = {
|
|
||||||
lualine_a = [ "mode" ];
|
|
||||||
lualine_b = [ "branch" "diff" "diagnostics" ];
|
|
||||||
lualine_c = [ "filename" ];
|
|
||||||
lualine_x = [ "filetype" ];
|
|
||||||
lualine_y = [ "progress" "selectioncount" ];
|
|
||||||
lualine_z = [ ''" " .. os.date("%R")'' ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
web-devicons.enable = true;
|
web-devicons.enable = true;
|
||||||
noice.enable = true;
|
noice.enable = true;
|
||||||
notify = {
|
|
||||||
enable = true;
|
|
||||||
level = "warn";
|
|
||||||
};
|
|
||||||
gitsigns = {
|
gitsigns = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.current_line_blame = false;
|
settings.current_line_blame = false;
|
||||||
};
|
};
|
||||||
trouble.enable = true;
|
trouble.enable = true;
|
||||||
indent-blankline.enable = true;
|
bufferline.enable = true;
|
||||||
colorizer.enable = true;
|
|
||||||
tagbar = {
|
|
||||||
enable = true;
|
|
||||||
tagsPackage = pkgs.universal-ctags;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
tmux-navigator.enable = true;
|
tmux-navigator.enable = true;
|
||||||
comment.enable = true;
|
comment.enable = true;
|
||||||
nvim-autopairs.enable = true;
|
nvim-autopairs.enable = true;
|
||||||
friendly-snippets.enable = true;
|
|
||||||
todo-comments.enable = true;
|
todo-comments.enable = true;
|
||||||
harpoon = {
|
harpoon = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@ -18,11 +18,12 @@
|
|||||||
"float, class:^(.*blueman-manager.*)$"
|
"float, class:^(.*blueman-manager.*)$"
|
||||||
"size 530 300, class:^(.*blueman-manager.*)$"
|
"size 530 300, class:^(.*blueman-manager.*)$"
|
||||||
"move 100%-w-20 40, class:^(.*blueman-manager.*)$"
|
"move 100%-w-20 40, class:^(.*blueman-manager.*)$"
|
||||||
"noborder, class:^(.*dg-desktop-portal-.*)$"
|
"tag +portal, class:^(.*desktop-portal.*)$"
|
||||||
"noblur, class:^(.*dg-desktop-portal-.*)$"
|
"noborder, tag:portal"
|
||||||
"noshadow, class:^(.*dg-desktop-portal-.*)$"
|
"noblur, class:portal"
|
||||||
"float, class:^(*.dg-desktop-portal-.*)$"
|
"noshadow, class:portal"
|
||||||
"pin, class:^(*.dg-desktop-portal-.*)$"
|
"float, class:portal"
|
||||||
|
"pin, class:portal"
|
||||||
"pin, class:^(gcr-prompter)$"
|
"pin, class:^(gcr-prompter)$"
|
||||||
"float, title:^(Volume Control)$"
|
"float, title:^(Volume Control)$"
|
||||||
"pin, title:^(Volume Control)$"
|
"pin, title:^(Volume Control)$"
|
||||||
|
|||||||
@ -13,14 +13,13 @@ let
|
|||||||
inherit (config.var.theme) rounding border-size gaps-in gaps-out;
|
inherit (config.var.theme) rounding border-size gaps-in gaps-out;
|
||||||
inherit (config.var.theme.bar)
|
inherit (config.var.theme.bar)
|
||||||
floating transparentButtons transparent position;
|
floating transparentButtons transparent position;
|
||||||
inherit (config.var) cpuTempSensor location username weatherapikey;
|
inherit (config.var) location username weatherapikey;
|
||||||
in {
|
in {
|
||||||
imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ];
|
imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ];
|
||||||
|
|
||||||
programs.hyprpanel = {
|
programs.hyprpanel = {
|
||||||
enable = true;
|
enable = true;
|
||||||
overlay.enable = true;
|
overlay.enable = true;
|
||||||
systemd.enable = true;
|
|
||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
overwrite.enable = true;
|
overwrite.enable = true;
|
||||||
layout = {
|
layout = {
|
||||||
@ -34,7 +33,7 @@ in {
|
|||||||
"hyprsunset"
|
"hyprsunset"
|
||||||
"battery"
|
"battery"
|
||||||
"network"
|
"network"
|
||||||
"cputemp"
|
"cpu"
|
||||||
"clock"
|
"clock"
|
||||||
"notifications"
|
"notifications"
|
||||||
];
|
];
|
||||||
@ -51,7 +50,6 @@ in {
|
|||||||
bar.battery.hideLabelWhenFull = true;
|
bar.battery.hideLabelWhenFull = true;
|
||||||
bar.bluetooth.label = false;
|
bar.bluetooth.label = false;
|
||||||
bar.clock.format = "%a, %d %b %H:%M";
|
bar.clock.format = "%a, %d %b %H:%M";
|
||||||
bar.customModules.cpuTemp.sensor = cpuTempSensor;
|
|
||||||
bar.customModules.hypridle.label = false;
|
bar.customModules.hypridle.label = false;
|
||||||
bar.customModules.hyprsunset.label = false;
|
bar.customModules.hyprsunset.label = false;
|
||||||
bar.launcher.icon = "";
|
bar.launcher.icon = "";
|
||||||
@ -120,7 +118,7 @@ in {
|
|||||||
theme.bar.buttons.workspaces.occupied = accent;
|
theme.bar.buttons.workspaces.occupied = accent;
|
||||||
theme.bar.buttons.y_margins =
|
theme.bar.buttons.y_margins =
|
||||||
if floating && transparent then "0" else "8";
|
if floating && transparent then "0" else "8";
|
||||||
theme.bar.dropdownGap = "4.5em";
|
theme.bar.dropdownGap = "3em";
|
||||||
theme.bar.floating = if floating then "true" else "false";
|
theme.bar.floating = if floating then "true" else "false";
|
||||||
theme.bar.location = position;
|
theme.bar.location = position;
|
||||||
theme.bar.margin_bottom =
|
theme.bar.margin_bottom =
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
};
|
};
|
||||||
tmp.cleanOnBoot = true;
|
tmp.cleanOnBoot = true;
|
||||||
kernelPackages =
|
kernelPackages =
|
||||||
pkgs.linuxPackages_zen; # _zen, _hardened, _rt, _rt_latest, etc.
|
pkgs.linuxPackages_latest; # _zen, _hardened, _rt, _rt_latest, etc.
|
||||||
|
|
||||||
# Silent boot
|
# Silent boot
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
@ -24,6 +24,5 @@
|
|||||||
];
|
];
|
||||||
consoleLogLevel = 0;
|
consoleLogLevel = 0;
|
||||||
initrd.verbose = false;
|
initrd.verbose = false;
|
||||||
plymouth = { enable = true; };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user