start of a nixvim setup.
This commit is contained in:
parent
507d4a3d08
commit
030822d6c1
13 changed files with 635 additions and 6 deletions
77
nix/nvim/lualine.nix
Normal file
77
nix/nvim/lualine.nix
Normal file
|
@ -0,0 +1,77 @@
|
|||
{
|
||||
configs,
|
||||
pkg,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
plugins.lualine = {
|
||||
enable = true;
|
||||
alwaysDivideMiddle = true;
|
||||
iconsEnabled = true;
|
||||
sections = {
|
||||
lualine_a = [
|
||||
{name = "mode";}
|
||||
];
|
||||
lualine_b = [
|
||||
{name = "branch";}
|
||||
{name = "diff";}
|
||||
{name = "diagnostics";}
|
||||
];
|
||||
lualine_c = [
|
||||
{
|
||||
name = "filename";
|
||||
extraConfig = {path = 1;};
|
||||
}
|
||||
];
|
||||
lualine_x = [
|
||||
{name = "encoding";}
|
||||
{name = "fileformat";}
|
||||
{name = "filetype";}
|
||||
];
|
||||
lualine_y = [
|
||||
{name = "progress";}
|
||||
];
|
||||
lualine_z = [
|
||||
{name = "location";}
|
||||
];
|
||||
};
|
||||
|
||||
inactiveSections = {
|
||||
lualine_a = [];
|
||||
lualine_b = [];
|
||||
lualine_c = [{name = "filename";}];
|
||||
lualine_x = [{name = "filetype";}];
|
||||
lualine_y = [];
|
||||
lualine_z = [];
|
||||
};
|
||||
|
||||
tabline = {
|
||||
lualine_a = [
|
||||
{
|
||||
name = "buffers";
|
||||
extraConfig = {mode = 4;};
|
||||
}
|
||||
];
|
||||
lualine_b = [];
|
||||
lualine_c = [];
|
||||
lualine_x = [];
|
||||
lualine_y = [];
|
||||
lualine_z = [
|
||||
{
|
||||
name = "tabs";
|
||||
extraConfig = {mode = 2;};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
winbar = {
|
||||
lualine_a = [];
|
||||
lualine_b = [];
|
||||
lualine_c = [];
|
||||
lualine_x = [];
|
||||
lualine_y = [];
|
||||
lualine_z = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
31
nix/nvim/nvim-tree.nix
Normal file
31
nix/nvim/nvim-tree.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
configs,
|
||||
pkg,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
plugins.nvim-tree = {
|
||||
enable = true;
|
||||
disableNetrw = true;
|
||||
hijackCursor = true;
|
||||
hijackNetrw = true;
|
||||
hijackUnnamedBufferWhenOpening = true;
|
||||
actions = {
|
||||
useSystemClipboard = true;
|
||||
changeDir.enable = true;
|
||||
};
|
||||
filesystemWatchers.enable = true;
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
action = ":NvimTreeToggle<CR>";
|
||||
key = "<leader>t";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "toggle file browser";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
173
nix/nvim/nvim.nix
Normal file
173
nix/nvim/nvim.nix
Normal file
|
@ -0,0 +1,173 @@
|
|||
{
|
||||
configs,
|
||||
pkg,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
colorschemes.base16 = {
|
||||
colorscheme = "gruvbox-dark-medium";
|
||||
enable = true;
|
||||
};
|
||||
|
||||
options = {
|
||||
mouse = "a";
|
||||
lazyredraw = true;
|
||||
termguicolors = true;
|
||||
autoread = true;
|
||||
swapfile = false;
|
||||
history = 500;
|
||||
formatoptions = "rojq";
|
||||
# dont hard wrap
|
||||
textwidth = 0;
|
||||
wrapmargin = 0;
|
||||
breakindent = true;
|
||||
# highlight after col
|
||||
colorcolumn = "80,100,120";
|
||||
# add ruler to side of screen
|
||||
number = true;
|
||||
numberwidth = 3;
|
||||
#display cursor cordinates
|
||||
ruler = true;
|
||||
#always leave 5 cells between cursor and side of window
|
||||
scrolloff = 5;
|
||||
# better command line completion
|
||||
wildmenu = true;
|
||||
# ignore case if all lowercase
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
# show unfinished keycombos in statusbar
|
||||
showcmd = true;
|
||||
# regex stuff
|
||||
magic = true;
|
||||
# always show statusline
|
||||
laststatus = 2;
|
||||
# tab stuff
|
||||
tabstop = 4;
|
||||
shiftwidth = 0;
|
||||
autoindent = true;
|
||||
smartindent = true;
|
||||
smarttab = true;
|
||||
# for true tabs, change to false
|
||||
expandtab = true;
|
||||
softtabstop = -1;
|
||||
# highlight search results as you type
|
||||
hlsearch = true;
|
||||
incsearch = true;
|
||||
# folding stuff
|
||||
foldlevelstart = 5;
|
||||
foldmethod = "indent";
|
||||
foldcolumn = "auto:4";
|
||||
foldenable = true;
|
||||
# display whitespace as other chars
|
||||
list = true;
|
||||
listchars = {
|
||||
tab = ">-";
|
||||
eol = "↲";
|
||||
nbsp = "␣";
|
||||
trail = "•";
|
||||
extends = "⟩";
|
||||
precedes = "⟨";
|
||||
};
|
||||
showbreak = "↪";
|
||||
};
|
||||
|
||||
clipboard.providers.xsel.enable = true;
|
||||
|
||||
globals = {
|
||||
mapleader = ";";
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
action = ":setlocal spell!<CR>";
|
||||
key = "<leader>cs";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "toggle spell check";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":bnext<CR>";
|
||||
key = "gf";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "next buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":bprevious<CR>";
|
||||
key = "gF";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "prev buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<C-w>h";
|
||||
key = "<C-h>";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "move to right split";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<C-w>j";
|
||||
key = "<C-j>";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "move to below split";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<C-w>k";
|
||||
key = "<C-k>";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "move to above split";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<C-w>l";
|
||||
key = "<C-l>";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "move to left split";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "za";
|
||||
key = "<Space>";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "toggle fold";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":nohls<CR>";
|
||||
key = "<leader>h";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "clear highlighting";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
imports = [
|
||||
./lualine.nix
|
||||
./nvim-tree.nix
|
||||
./toggleterm.nix
|
||||
];
|
||||
}
|
52
nix/nvim/spell/en.utf-8.add
Normal file
52
nix/nvim/spell/en.utf-8.add
Normal file
|
@ -0,0 +1,52 @@
|
|||
asciidoc
|
||||
ASCIISite
|
||||
asciidoctor
|
||||
ASCIIsite
|
||||
asciiDoc
|
||||
nextcloud
|
||||
filesystem
|
||||
zsh
|
||||
backend
|
||||
Incrementals
|
||||
incrementals
|
||||
Ransomware
|
||||
ransomware
|
||||
hypervisor
|
||||
offsite
|
||||
FTL
|
||||
superintelligent
|
||||
homeworld
|
||||
toolchain
|
||||
Kata
|
||||
ctl
|
||||
NDSU
|
||||
rebasing
|
||||
posix
|
||||
tmux
|
||||
keybinds
|
||||
dotfile
|
||||
dotfiles
|
||||
ctrl
|
||||
sed
|
||||
NGINX
|
||||
timezones
|
||||
Proxmox
|
||||
Gabe
|
||||
Venberg
|
||||
Github
|
||||
dotfiles
|
||||
config
|
||||
nvim
|
||||
neovim
|
||||
config
|
||||
Syncthing
|
||||
homelab
|
||||
microcontrollers
|
||||
nushell
|
||||
datatypes
|
||||
datetimes
|
||||
filesizes
|
||||
filetypes
|
||||
datastructures
|
||||
footguns
|
||||
csv
|
32
nix/nvim/toggleterm.nix
Normal file
32
nix/nvim/toggleterm.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
configs,
|
||||
pkg,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
plugins.toggleterm={
|
||||
enable=true;
|
||||
direction="horizontal";
|
||||
insertMappings=false;
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
action = "function() Floatingterm:toggle() end";
|
||||
key = "<leader>s";
|
||||
lua=true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "toggle scratch terminal";
|
||||
};
|
||||
}
|
||||
];
|
||||
extraConfigLuaPre = ''
|
||||
local Terminal = require('toggleterm.terminal').Terminal
|
||||
Floatingterm = Terminal:new({
|
||||
hidden = true,
|
||||
direction = "float"
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue