moved nixvim into own home-manager module.
moved pass store location.
This commit is contained in:
parent
bbc6beb3da
commit
2253c6c34a
28 changed files with 24 additions and 11 deletions
|
@ -44,7 +44,6 @@
|
|||
./git.nix
|
||||
./starship.nix
|
||||
./voice.nix
|
||||
./nvim
|
||||
./zellij
|
||||
./tiny-irc.nix
|
||||
./pass.nix
|
||||
|
@ -64,6 +63,4 @@
|
|||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.syncthing.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
host.nvim.enable-completions =
|
||||
(lib.mkEnableOption "basic completion in nvim")
|
||||
// {
|
||||
default = config.host.nvim.enable-treesitter || config.host.nvim.enable-lsp;
|
||||
};
|
||||
};
|
||||
config =
|
||||
lib.mkIf config.host.nvim.enable-completions
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.luasnip.enable = true;
|
||||
plugins.friendly-snippets.enable = true;
|
||||
plugins.cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
settings = {
|
||||
sources = [
|
||||
{name = "luasnip";}
|
||||
{name = "treesitter";}
|
||||
{name = "path";}
|
||||
{name = "emoji";}
|
||||
{name = "buffer";}
|
||||
{name = "latex_symbols";}
|
||||
{name = "digraphs";}
|
||||
{name = "spell";}
|
||||
];
|
||||
snippet = {
|
||||
expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
};
|
||||
mapping = {
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = false })";
|
||||
"<Tab>" = ''
|
||||
function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif require("luasnip").expand_or_jumpable() then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "")
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
'';
|
||||
"<S-Tab>" = ''
|
||||
function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif require("luasnip").jumpable(-1) then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
configs,
|
||||
pkgs,
|
||||
helpers,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
colorschemes.base16 = {
|
||||
colorscheme = "gruvbox-dark-medium";
|
||||
enable = true;
|
||||
};
|
||||
|
||||
clipboard.providers.xsel.enable = true;
|
||||
};
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
};
|
||||
|
||||
programs.nushell.extraEnv = ''
|
||||
$env.EDITOR = nvim
|
||||
$env.VISUAL = nvim
|
||||
'';
|
||||
|
||||
imports = [
|
||||
./keybinds.nix
|
||||
./options.nix
|
||||
./simpleplugins.nix
|
||||
./lualine.nix
|
||||
./nvim-tree.nix
|
||||
./toggleterm.nix
|
||||
./gitsigns.nix
|
||||
./which-key.nix
|
||||
./telescope.nix
|
||||
./treesitter
|
||||
./cmp
|
||||
./lsp
|
||||
];
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
configs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
plugins.gitsigns = {
|
||||
enable = true;
|
||||
};
|
||||
plugins.which-key.registrations = {
|
||||
"<leader>g" = "+git";
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
action = ":Gitsigns toggle_current_line_blame<CR>";
|
||||
key = "<leader>gb";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "toggle git blame";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,97 +0,0 @@
|
|||
{
|
||||
configs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
globals = {
|
||||
mapleader = ";";
|
||||
};
|
||||
plugins.which-key.registrations = {
|
||||
"<leader>c" = "+check";
|
||||
};
|
||||
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";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.file = {
|
||||
".clangd".text = ''
|
||||
# keeps clangd from choking when it sees a compiler flag for a different
|
||||
# compiler. (sutch as when acting as an lsp for a project that uses GCC.)
|
||||
CompileFlags:
|
||||
Add: -Wno-unknown-warning-option
|
||||
Remove: [-m*, -f*]
|
||||
'';
|
||||
".clang-format".text = ''
|
||||
---
|
||||
#this syncronizes with settings used by neovims treesitters so that the lsp formatting and treesitter formatting do not fight eatch other.
|
||||
PointerAlignment: Left
|
||||
ColumnLimit: 80
|
||||
IndentWidth: 4
|
||||
TabWidth: 4
|
||||
UseCRLF: false
|
||||
UseTab: Never
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
BreakBeforeBraces: Attach
|
||||
AlignOperands: Align
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
...
|
||||
'';
|
||||
"work/.clang-format" = lib.mkIf config.host.git.workProfile.enable {
|
||||
text = ''
|
||||
---
|
||||
#this syncronizes with settings used by neovims treesitters so that the lsp formatting and treesitter formatting do not fight eatch other.
|
||||
PointerAlignment: Left
|
||||
ColumnLimit: 80
|
||||
IndentWidth: 4
|
||||
TabWidth: 4
|
||||
UseCRLF: false
|
||||
UseTab: Never
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
BreakBeforeBraces: Allman
|
||||
BreakBeforeBinaryOperators: None
|
||||
...
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,208 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
host.nvim.enable-lsp = lib.mkEnableOption "nvim lsp";
|
||||
};
|
||||
|
||||
config =
|
||||
lib.mkIf config.host.nvim.enable-lsp
|
||||
{
|
||||
host.nvim.enable-completions = true;
|
||||
programs.nixvim = {
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
bashls.enable = true;
|
||||
clangd.enable = true;
|
||||
lua-ls.enable = true;
|
||||
nil_ls.enable = true;
|
||||
nil_ls.settings.formatting.command = ["alejandra"];
|
||||
nushell.enable = true;
|
||||
pyright.enable = true;
|
||||
ruff-lsp.enable = true;
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
texlab.enable = true;
|
||||
typst-lsp.enable = true;
|
||||
taplo.enable = true;
|
||||
yamlls.enable = true;
|
||||
marksman.enable = true;
|
||||
jsonls.enable = true;
|
||||
hls.enable = true;
|
||||
};
|
||||
};
|
||||
plugins.cmp.settings.sources = [
|
||||
{name = "nvim_lsp";}
|
||||
];
|
||||
plugins.which-key.registrations = {
|
||||
"<leader>l" = "+lsp";
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
action = "vim.lsp.buf.declaration";
|
||||
key = "<leader>lc";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "declaration";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.definition";
|
||||
key = "<leader>ld";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "definition";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.hover";
|
||||
key = "<leader>lh";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "hover";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.implementation";
|
||||
key = "<leader>li";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "implementation";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.signature_help";
|
||||
key = "<leader>ls";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "signature_help";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.add_workspace_folder";
|
||||
key = "<leader>lwa";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "add folder";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.remove_workspace_folder";
|
||||
key = "<leader>lwr";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "remove folder";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.list_workspace_folders";
|
||||
key = "<leader>lw";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "workspace";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.rename";
|
||||
key = "<leader>lr";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "rename";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.code_action";
|
||||
key = "<leader>la";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "code action";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.lsp.buf.references";
|
||||
key = "<leader>le";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "list references";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "function() vim.lsp.buf.format{async=true} end";
|
||||
key = "<leader>lm";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "format buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.diagnostic.open_float";
|
||||
key = "<leader>lo";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "open float";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.diagnostic.goto_next";
|
||||
key = "]d";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "next diagnostic";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "vim.diagnostic.goto_prev";
|
||||
key = "[d";
|
||||
lua = true;
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "prev diagnostic";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
alejandra
|
||||
];
|
||||
};
|
||||
imports = [
|
||||
./rust-tools.nix
|
||||
./clangd.nix
|
||||
];
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config =
|
||||
lib.mkIf config.host.nvim.enable-lsp
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.rust-tools = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
{
|
||||
configs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
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 = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
configs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
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";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
{
|
||||
configs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
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 = lib.mkDefault "indent";
|
||||
foldcolumn = "auto:4";
|
||||
foldenable = true;
|
||||
# display whitespace as other chars
|
||||
list = true;
|
||||
listchars = {
|
||||
tab = ">-";
|
||||
eol = "↲";
|
||||
nbsp = "␣";
|
||||
trail = "•";
|
||||
extends = "⟩";
|
||||
precedes = "⟨";
|
||||
};
|
||||
showbreak = "↪";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
configs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
plugins.comment-nvim.enable = true;
|
||||
plugins.marks.enable = true;
|
||||
plugins.surround.enable = true;
|
||||
plugins.todo-comments.enable = true;
|
||||
plugins.leap = {
|
||||
enable = true;
|
||||
addDefaultMappings = true;
|
||||
};
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
vim-numbertoggle
|
||||
dressing-nvim
|
||||
];
|
||||
extraConfigLua = ''require("dressing").setup({})'';
|
||||
};
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
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
|
|
@ -1,116 +0,0 @@
|
|||
{
|
||||
configs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
};
|
||||
plugins.which-key.registrations = {
|
||||
"<leader>f" = "+telescope";
|
||||
"<leader>fg" = "+telescope git";
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
action = ":Telescope find_files<CR>";
|
||||
key = "<leader>ff";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "files";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":Telescope live_grep<CR>";
|
||||
key = "<leader>fg";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "grep";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":Telescope buffers<CR>";
|
||||
key = "<leader>fb";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "buffers";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":Telescope marks<CR>";
|
||||
key = "<leader>fm";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "marks";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":Telescope registers<CR>";
|
||||
key = "<leader>fr";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "registers";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":Telescope keymaps<CR>";
|
||||
key = "<leader>fk";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "keymaps";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":Telescope current_buffer_fuzzy_find<CR>";
|
||||
key = "<leader>fz";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "fuzzy find";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":Telescope git_commits<CR>";
|
||||
key = "<leader>fgc";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "commits";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":Telescope git_branches<CR>";
|
||||
key = "<leader>fgb";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "branches";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":Telescope git_stash<CR>";
|
||||
key = "<leader>fgs";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "stash";
|
||||
};
|
||||
}
|
||||
{
|
||||
action = ":Telescope git_commits<CR>";
|
||||
key = "<leader>fgc";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "commits";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
configs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
plugins.toggleterm = {
|
||||
enable = true;
|
||||
direction = "horizontal";
|
||||
insertMappings = false;
|
||||
openMapping = ''<c-\>'';
|
||||
terminalMappings = 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"
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config =
|
||||
lib.mkIf config.host.nvim.enable-treesitter
|
||||
{
|
||||
programs.nixvim = {
|
||||
keymaps = [
|
||||
{
|
||||
action = ":AerialToggle!<CR>";
|
||||
key = "<leader>o";
|
||||
mode = "n";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "toggle outline";
|
||||
};
|
||||
}
|
||||
];
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
aerial-nvim
|
||||
];
|
||||
extraConfigLua = ''require("aerial").setup({})'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
host.nvim.enable-treesitter = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
enable nvim treesitter
|
||||
'';
|
||||
};
|
||||
};
|
||||
config =
|
||||
lib.mkIf config.host.nvim.enable-treesitter
|
||||
{
|
||||
host.nvim.enable-completions = true;
|
||||
programs.nixvim = {
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
folding = true;
|
||||
indent = true;
|
||||
nixvimInjections = true;
|
||||
};
|
||||
plugins.treesitter-context.enable = true;
|
||||
plugins.indent-blankline.enable = true;
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
treesj
|
||||
];
|
||||
extraConfigLua = ''require("treesj").setup({})'';
|
||||
};
|
||||
};
|
||||
imports = [
|
||||
./rainbow-delimiters.nix
|
||||
./arial.nix
|
||||
./tree-sitter-nu.nix
|
||||
];
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config =
|
||||
lib.mkIf config.host.nvim.enable-treesitter
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.rainbow-delimiters = {
|
||||
enable = true;
|
||||
highlight = [
|
||||
"RainbowDelimiterYellow"
|
||||
"RainbowDelimiterBlue"
|
||||
"RainbowDelimiterOrange"
|
||||
"RainbowDelimiterGreen"
|
||||
"RainbowDelimiterViolet"
|
||||
"RainbowDelimiterCyan"
|
||||
# "RainbowDelimiterRed"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config =
|
||||
lib.mkIf config.host.nvim.enable-treesitter
|
||||
{
|
||||
programs.nixvim = let
|
||||
nu-grammar = pkgs.tree-sitter.buildGrammar {
|
||||
language = "nu";
|
||||
version = "0.0.0+rev=358c4f5";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nushell";
|
||||
repo = "tree-sitter-nu";
|
||||
rev = "c5b7816043992b1cdc1462a889bc74dc08576fa6";
|
||||
hash = "sha256-P+ixE359fAW7R5UJLwvMsmju7UFmJw5SN+kbMEw7Kz0=";
|
||||
};
|
||||
};
|
||||
in {
|
||||
# Set filetype to "nu" for files named "*.nu"
|
||||
filetype.extension.nu = "nu";
|
||||
|
||||
# Add our nu parser to treesitter and associate it with nu filetype.
|
||||
extraConfigLua = ''
|
||||
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||
parser_config.nu = {
|
||||
filetype = "nu",
|
||||
}
|
||||
'';
|
||||
|
||||
# Add the nu injections
|
||||
extraFiles = {
|
||||
"/queries/nu/highlights.scm" = builtins.readFile "${nu-grammar}/queries/nu/highlights.scm";
|
||||
"/queries/nu/injections.scm" = builtins.readFile "${nu-grammar}/queries/nu/injections.scm";
|
||||
"/queries/nu/indents.scm" = builtins.readFile "${nu-grammar}/queries/nu/indents.scm";
|
||||
};
|
||||
|
||||
plugins = {
|
||||
treesitter = {
|
||||
# Register the nu parser for files with "nu" filetype
|
||||
languageRegister.nu = "nu";
|
||||
grammarPackages =
|
||||
[
|
||||
nu-grammar
|
||||
]
|
||||
++ pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
configs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
options = {
|
||||
timeout = true;
|
||||
timeoutlen = 300;
|
||||
};
|
||||
plugins.which-key = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -6,6 +6,9 @@
|
|||
}: {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
settings={
|
||||
PASSWORD_STORE_DIR = "$HOME/keys/password-store";
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
@ -13,6 +16,6 @@
|
|||
];
|
||||
|
||||
programs.nushell.extraEnv = ''
|
||||
$env.PASSWORD_STORE_DIR = ($env.XDG_DATA_HOME | path join "password-store")
|
||||
$env.PASSWORD_STORE_DIR = ($env.HOME | path join "keys" "password-store")
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue