nixvim
install initial nixvim
This commit is contained in:
21
home/programs/nixvim-old/default.nix
Normal file
21
home/programs/nixvim-old/default.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{ inputs, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./plugins
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.nixvim = {
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
texliveFull
|
||||||
|
texlivePackages.standalone
|
||||||
|
texlivePackages.relsize # needed for BA
|
||||||
|
# papis-nvim
|
||||||
|
];
|
||||||
|
extraConfigVim = ''
|
||||||
|
filetype plugin on
|
||||||
|
set nocompatible
|
||||||
|
syntax on
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
54
home/programs/nixvim-old/plugins/default.nix
Normal file
54
home/programs/nixvim-old/plugins/default.nix
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./aerial.nix
|
||||||
|
./autopairs.nix
|
||||||
|
./barbar.nix
|
||||||
|
./bullets.nix
|
||||||
|
./cmp.nix
|
||||||
|
./comment-box.nix
|
||||||
|
./comment.nix
|
||||||
|
./conform.nix
|
||||||
|
./dap.nix
|
||||||
|
./diffview.nix
|
||||||
|
./dynomark.nix
|
||||||
|
./edgy.nix
|
||||||
|
./gitsigns.nix
|
||||||
|
./haskell-tools.nix
|
||||||
|
./knap.nix
|
||||||
|
./leap.nix
|
||||||
|
./lsp.nix
|
||||||
|
./ltex-extra.nix
|
||||||
|
./lualine.nix
|
||||||
|
./markdown-preview.nix
|
||||||
|
./mkdnflow.nix
|
||||||
|
./neoscroll.nix
|
||||||
|
./neotree.nix
|
||||||
|
./noice.nix
|
||||||
|
./notify.nix
|
||||||
|
./oil.nix
|
||||||
|
./openscad.nix
|
||||||
|
./otter.nix
|
||||||
|
./papis.nix
|
||||||
|
./peek.nix
|
||||||
|
./markdown-preview.nix
|
||||||
|
./smart-splits.nix
|
||||||
|
./snippets.nix
|
||||||
|
./sniprun.nix
|
||||||
|
./startup.nix
|
||||||
|
./surround.nix
|
||||||
|
./telescope.nix
|
||||||
|
./texpresso.nix
|
||||||
|
./todo-comments.nix
|
||||||
|
./toggleterm.nix
|
||||||
|
./treesitter.nix
|
||||||
|
./trouble.nix
|
||||||
|
./typst-preview.nix
|
||||||
|
./typst-vim.nix
|
||||||
|
./undotree.nix
|
||||||
|
./vimtex.nix
|
||||||
|
./web-devicons.nix
|
||||||
|
./which-key.nix
|
||||||
|
./yanky.nix
|
||||||
|
./zk.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
29
home/programs/nixvim-old/plugins/render-markdown.nix
Normal file
29
home/programs/nixvim-old/plugins/render-markdown.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [ python312Packages.pylatexenc ];
|
||||||
|
|
||||||
|
programs.nixvim.plugins = {
|
||||||
|
render-markdown = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
ft = [
|
||||||
|
"markdown"
|
||||||
|
"quarto"
|
||||||
|
];
|
||||||
|
latex = {
|
||||||
|
enabled = false;
|
||||||
|
};
|
||||||
|
completions = {
|
||||||
|
lsp = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
web-devicons = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
40
home/programs/nixvim-old/plugins/vimtex.nix
Normal file
40
home/programs/nixvim-old/plugins/vimtex.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins = {
|
||||||
|
vimtex = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
view_automatic = false;
|
||||||
|
mappings_disable = {
|
||||||
|
"n" = [ "K" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
autoGroups = {
|
||||||
|
"lazyvim_vimtex_conceal" = {
|
||||||
|
clear = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
autoCmd = [
|
||||||
|
{
|
||||||
|
event = [ "FileType" ];
|
||||||
|
group = "lazyvim_vimtex_conceal";
|
||||||
|
pattern = [
|
||||||
|
"bib"
|
||||||
|
"tex"
|
||||||
|
];
|
||||||
|
callback.__raw = # lua
|
||||||
|
''
|
||||||
|
function ()
|
||||||
|
vim.wo.conceallevel = 2
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ inputs, pkgs, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -6,38 +6,38 @@
|
|||||||
./plugins
|
./plugins
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables.EDITOR = "nvim";
|
||||||
EDITOR = "nvim";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
|
extraPackages = with pkgs; [ # TODO:
|
||||||
nixpkgs.useGlobalPackages = false;
|
|
||||||
|
|
||||||
clipboard = {
|
|
||||||
providers = {
|
|
||||||
wl-copy.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
viAlias = true;
|
|
||||||
vimAlias = true;
|
|
||||||
|
|
||||||
lualoader.enable = true;
|
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
texliveFull
|
texliveFull
|
||||||
texlivePackages.standalone
|
texlivePackages.standalone
|
||||||
texlivePackages.relsize # needed for BA
|
texlivePackages.relsize # needed for BA
|
||||||
# papis-nvim
|
# papis-nvim
|
||||||
];
|
];
|
||||||
extraConfigVim = ''
|
|
||||||
filetype plugin on
|
nixpkgs.useGlobalPackages = false;
|
||||||
set nocompatible
|
|
||||||
syntax on
|
clipboard.providers.wl-copy.enable = true;
|
||||||
'';
|
keymaps = [
|
||||||
|
{
|
||||||
|
key = "Y";
|
||||||
|
action = ''"+y'';
|
||||||
|
options.silent = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "P";
|
||||||
|
action = ''"+p'';
|
||||||
|
options.silent = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
|
||||||
|
lualoader.enable = true;
|
||||||
|
|
||||||
globals = {
|
globals = {
|
||||||
mapleader = " ";
|
mapleader = " ";
|
||||||
|
|||||||
8
home/programs/nixvim/plugins/css-color.nix
Normal file
8
home/programs/nixvim/plugins/css-color.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim.plugins.vim-css-color = {
|
||||||
|
enable = true;
|
||||||
|
lazyLoad.settings.filetypes = [ "css" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,54 +1,21 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./aerial.nix
|
./css-color.nix
|
||||||
./autopairs.nix
|
./img-clip.nix
|
||||||
./barbar.nix
|
./lz-n.nix
|
||||||
./bullets.nix
|
./rainbow.nix
|
||||||
./cmp.nix
|
./render-markdown.nix
|
||||||
./comment-box.nix
|
./rustaceanvim.nix
|
||||||
./comment.nix
|
|
||||||
./conform.nix
|
|
||||||
./dap.nix
|
|
||||||
./diffview.nix
|
|
||||||
./dynomark.nix
|
|
||||||
./edgy.nix
|
|
||||||
./gitsigns.nix
|
|
||||||
./haskell-tools.nix
|
|
||||||
./knap.nix
|
|
||||||
./leap.nix
|
|
||||||
./lsp.nix
|
|
||||||
./ltex-extra.nix
|
|
||||||
./lualine.nix
|
|
||||||
./markdown-preview.nix
|
|
||||||
./mkdnflow.nix
|
|
||||||
./neoscroll.nix
|
|
||||||
./neotree.nix
|
|
||||||
./noice.nix
|
|
||||||
./notify.nix
|
|
||||||
./oil.nix
|
|
||||||
./openscad.nix
|
|
||||||
./otter.nix
|
|
||||||
./papis.nix
|
|
||||||
./peek.nix
|
|
||||||
./markdown-preview.nix
|
|
||||||
./smart-splits.nix
|
|
||||||
./snippets.nix
|
|
||||||
./sniprun.nix
|
|
||||||
./startup.nix
|
|
||||||
./surround.nix
|
|
||||||
./telescope.nix
|
|
||||||
./texpresso.nix
|
|
||||||
./todo-comments.nix
|
|
||||||
./toggleterm.nix
|
./toggleterm.nix
|
||||||
./treesitter.nix
|
|
||||||
./trouble.nix
|
./trouble.nix
|
||||||
./typst-preview.nix
|
|
||||||
./typst-vim.nix
|
|
||||||
./undotree.nix
|
./undotree.nix
|
||||||
./vimtex.nix
|
./unified.nix
|
||||||
./web-devicons.nix
|
./web-devicons.nix
|
||||||
./which-key.nix
|
./which-key.nix
|
||||||
./yanky.nix
|
./wilder.nix
|
||||||
./zk.nix
|
./yazi.nix
|
||||||
|
./yuck.nix
|
||||||
|
|
||||||
|
./vimtex.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.nixvim = {
|
|
||||||
plugins = {
|
|
||||||
diffview = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
22
home/programs/nixvim/plugins/img-clip.nix
Normal file
22
home/programs/nixvim/plugins/img-clip.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins.img-clip = {
|
||||||
|
enable = true;
|
||||||
|
lazyLoad.settings.filetypes = [
|
||||||
|
"md"
|
||||||
|
"tex"
|
||||||
|
"typ"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
key = "<leader>p";
|
||||||
|
action = "<cmd>PasteImage<cr>";
|
||||||
|
options.desc = "Paste image";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
7
home/programs/nixvim/plugins/lz-n.nix
Normal file
7
home/programs/nixvim/plugins/lz-n.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim.plugins.lz-n = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.nixvim.plugins = {
|
|
||||||
peek = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
app = "firefox";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
100
home/programs/nixvim/plugins/rainbow.nix
Normal file
100
home/programs/nixvim/plugins/rainbow.nix
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins = {
|
||||||
|
rainbow = {
|
||||||
|
enable = true;
|
||||||
|
lazyLoad.settings.event = [
|
||||||
|
"BufReadPost"
|
||||||
|
"BufNewFile"
|
||||||
|
];
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
active = 1;
|
||||||
|
conf = {
|
||||||
|
guifgs = [
|
||||||
|
"#f5c2e7"
|
||||||
|
"#eba0ac"
|
||||||
|
"#a6e3a1"
|
||||||
|
"#74c7ec"
|
||||||
|
"#f5e0dc"
|
||||||
|
"#cba6f7"
|
||||||
|
"#fab387"
|
||||||
|
"#94e2d5"
|
||||||
|
"#89b4fa"
|
||||||
|
"#f2cdcd"
|
||||||
|
"#f38ba8"
|
||||||
|
"#f9e2af"
|
||||||
|
"#89dceb"
|
||||||
|
"#b4befe"
|
||||||
|
];
|
||||||
|
operators = "_,_";
|
||||||
|
parentheses = [
|
||||||
|
"start=/(/ end=/)/ fold"
|
||||||
|
"start=/{/ end=/}/ fold"
|
||||||
|
"start=/\\[/ end=/\\]/ fold"
|
||||||
|
"start=/\\begin/ end=/\\end/ fold"
|
||||||
|
];
|
||||||
|
separately = {
|
||||||
|
"*" = {
|
||||||
|
parentheses = [
|
||||||
|
"start=/(/ end=/)/ fold"
|
||||||
|
"start=/{/ end=/}/ fold"
|
||||||
|
"start=/\\[/ end=/\\]/ fold"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
css = 0;
|
||||||
|
haskell = {
|
||||||
|
parentheses = [
|
||||||
|
"start=/(/ end=/)/ fold"
|
||||||
|
"start=/\[/ end=/\]/ fold"
|
||||||
|
"start=/\v\{\ze[^-]/ end=/}/ fold"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
lisp = {
|
||||||
|
guifgs = [
|
||||||
|
"#f5c2e7"
|
||||||
|
"#eba0ac"
|
||||||
|
"#a6e3a1"
|
||||||
|
"#74c7ec"
|
||||||
|
"#f5e0dc"
|
||||||
|
"#cba6f7"
|
||||||
|
"#fab387"
|
||||||
|
"#94e2d5"
|
||||||
|
"#89b4fa"
|
||||||
|
"#f2cdcd"
|
||||||
|
"#f38ba8"
|
||||||
|
"#f9e2af"
|
||||||
|
"#89dceb"
|
||||||
|
"#b4befe"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
markdown = {
|
||||||
|
parentheses_options = "containedin=markdownCode contained";
|
||||||
|
};
|
||||||
|
nerdtree = 0;
|
||||||
|
perl = {
|
||||||
|
syn_name_prefix = "perlBlockFoldRainbow";
|
||||||
|
};
|
||||||
|
stylus = {
|
||||||
|
parentheses = [ "start=/{/ end=/}/ fold contains=@colorableGroup" ];
|
||||||
|
};
|
||||||
|
tex = {
|
||||||
|
parentheses = [
|
||||||
|
"start=/(/ end=/)/ fold"
|
||||||
|
"start=/{/ end=/}/ fold"
|
||||||
|
"start=/\\[/ end=/\\]/ fold"
|
||||||
|
"start=/\\begin/ end=/\\end/ fold"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
vim = {
|
||||||
|
parentheses_options = "containedin=vimFuncBody";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,27 +3,37 @@
|
|||||||
{
|
{
|
||||||
home.packages = with pkgs; [ python312Packages.pylatexenc ];
|
home.packages = with pkgs; [ python312Packages.pylatexenc ];
|
||||||
|
|
||||||
programs.nixvim.plugins = {
|
programs.nixvim = {
|
||||||
|
plugins = {
|
||||||
render-markdown = {
|
render-markdown = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
lazyLoad.settings.filetypes = [ "md" ];
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
ft = [
|
ft = [ "markdown" ];
|
||||||
"markdown"
|
latex.enabled = false;
|
||||||
"quarto"
|
completions.lsp.enabled = true;
|
||||||
];
|
|
||||||
latex = {
|
|
||||||
enabled = false;
|
|
||||||
};
|
|
||||||
completions = {
|
|
||||||
lsp = {
|
|
||||||
enabled = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
web-devicons = {
|
which-key.settings.spec = [
|
||||||
enable = true;
|
{
|
||||||
|
__unkeyed-1 = "<leader>m";
|
||||||
|
group = "Markdown";
|
||||||
|
icon = " ";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
action = "<CMD>RenderMarkdown toggle<CR>";
|
||||||
|
key = "<leader>mp";
|
||||||
|
mode = "n";
|
||||||
|
options = {
|
||||||
|
desc = "Toggle markdown preview";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
52
home/programs/nixvim/plugins/rustaceanvim.nix
Normal file
52
home/programs/nixvim/plugins/rustaceanvim.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
extraPackages = with pkgs; [ rust-analyzer ];
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
rustaceanvim = {
|
||||||
|
enable = true;
|
||||||
|
lazyload.settings.filetype = "rs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
files = {
|
||||||
|
"ftplugin/rust.lua" = {
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
action.__raw = ''
|
||||||
|
function()
|
||||||
|
vim.cmd.RustAnalyzer('codeAction')
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
key = "<leader>a";
|
||||||
|
mode = [
|
||||||
|
"n"
|
||||||
|
];
|
||||||
|
options = {
|
||||||
|
desc = "Code action";
|
||||||
|
silent = true;
|
||||||
|
buffer.__raw = "vim.api.nvim_get_current_buf()";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
action.__raw = ''
|
||||||
|
function()
|
||||||
|
vim.cmd.RustAnalyzer({'hover', 'actions'})
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
key = "K";
|
||||||
|
mode = [
|
||||||
|
"n"
|
||||||
|
];
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
buffer.__raw = "vim.api.nvim_get_current_buf()";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -5,18 +5,32 @@
|
|||||||
plugins = {
|
plugins = {
|
||||||
toggleterm = {
|
toggleterm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
lazyLoad.settings.cmd = [
|
||||||
|
"ToggleTermSendCurrentLine"
|
||||||
|
"ToggleTermSendVisualLines"
|
||||||
|
"ToggleTermSendVisualSelection"
|
||||||
|
];
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
open_mapping.__raw = "[[<c-,>]]";
|
open_mapping.__raw = "[[<c-,>]]";
|
||||||
insert_mappings = true;
|
insert_mappings = true;
|
||||||
shade_terminals = false;
|
shade_terminals = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
which-key.settings.spec = [
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>c";
|
||||||
|
group = "Terminal";
|
||||||
|
icon = " ";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
keymaps = [
|
keymaps = [
|
||||||
{
|
{
|
||||||
action = "<CMD>ToggleTermSendCurrentLine<CR>";
|
action = "<CMD>ToggleTermSendCurrentLine<CR>";
|
||||||
key = "<leader>sts";
|
key = "<leader>cl";
|
||||||
mode = "n";
|
mode = "n";
|
||||||
options = {
|
options = {
|
||||||
desc = "Send Current Line";
|
desc = "Send Current Line";
|
||||||
@@ -24,7 +38,7 @@
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
action = "<CMD>ToggleTermSendVisualLines<CR>";
|
action = "<CMD>ToggleTermSendVisualLines<CR>";
|
||||||
key = "<leader>stv";
|
key = "<leader>cv";
|
||||||
mode = "x";
|
mode = "x";
|
||||||
options = {
|
options = {
|
||||||
desc = "Send all the (whole) lines in selection";
|
desc = "Send all the (whole) lines in selection";
|
||||||
@@ -32,7 +46,7 @@
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
action = "<CMD>ToggleTermSendVisualSelection<CR>";
|
action = "<CMD>ToggleTermSendVisualSelection<CR>";
|
||||||
key = "<leader>sts";
|
key = "<leader>cs";
|
||||||
mode = "x";
|
mode = "x";
|
||||||
options = {
|
options = {
|
||||||
desc = "Send selection";
|
desc = "Send selection";
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
plugins = {
|
plugins = {
|
||||||
trouble = {
|
trouble = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
lazyLoad.settings.cmd = "Trouble";
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
modes = {
|
modes = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
|
|||||||
@@ -5,7 +5,38 @@
|
|||||||
plugins = {
|
plugins = {
|
||||||
undotree = {
|
undotree = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
lazyLoad.settings.cmd = "UndotreeShow";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
which-key.settings.spec = [
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>t";
|
||||||
|
group = "Undotree";
|
||||||
|
icon = " ";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
key = "<leader>th";
|
||||||
|
action = "<cmd>UndotreeHide<cr>";
|
||||||
|
options.desc = "Hide undotree";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>tf";
|
||||||
|
action = "<cmd>UndotreeFocus<cr>";
|
||||||
|
options.desc = "Focus undotree";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>tp";
|
||||||
|
action = "<cmd>UndotreePersistUndo<cr>";
|
||||||
|
options.desc = "Persist undo";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>ts";
|
||||||
|
action = "<cmd>UndotreeShow<cr>";
|
||||||
|
options.desc = "Show undotree";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
32
home/programs/nixvim/plugins/unified.nix
Normal file
32
home/programs/nixvim/plugins/unified.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins = {
|
||||||
|
unified = {
|
||||||
|
enable = true;
|
||||||
|
lazyLoad.settings.cmd = "Unified";
|
||||||
|
};
|
||||||
|
|
||||||
|
which-key.settings.spec = [
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>u";
|
||||||
|
group = "Unified";
|
||||||
|
icon = " ";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
key = "<leader>us";
|
||||||
|
action = "<cmd>Unified<cr>";
|
||||||
|
options.desc = "Start Unified";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>uq";
|
||||||
|
action = "<cmd>Unified reset<cr><cmd>Unified reset<cr>";
|
||||||
|
options.desc = "Stop Unified";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.nixvim = {
|
programs.nixvim.plugins.web-devicons = {
|
||||||
plugins = {
|
enable = true;
|
||||||
web-devicons.enable = true;
|
lazyLoad.settings.event = [
|
||||||
};
|
"BufReadPost"
|
||||||
|
"BufNewFile"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.nixvim.plugins = {
|
programs.nixvim.plugins.which-key = {
|
||||||
which-key = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
lazyLoad.settings.event = [
|
||||||
|
"BufReadPost"
|
||||||
|
"BufNewFile"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
51
home/programs/nixvim/plugins/wilder.nix
Normal file
51
home/programs/nixvim/plugins/wilder.nix
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim.plugins.wilder = {
|
||||||
|
enable = true;
|
||||||
|
lazyLoad.settings.event = [
|
||||||
|
"BufReadPost"
|
||||||
|
"BufNewFile"
|
||||||
|
];
|
||||||
|
|
||||||
|
settings.modes = [
|
||||||
|
":"
|
||||||
|
"/"
|
||||||
|
"?"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Configure the wilder engine
|
||||||
|
options = {
|
||||||
|
pipeline.__raw = ''
|
||||||
|
wilder.branch(
|
||||||
|
wilder.cmdline_pipeline({
|
||||||
|
fuzzy = 1,
|
||||||
|
set_device = 1,
|
||||||
|
}),
|
||||||
|
wilder.vim_search_pipeline()
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
renderer.__raw = ''
|
||||||
|
wilder.popupmenu_renderer(
|
||||||
|
wilder.popupmenu_border_theme({
|
||||||
|
highlighter = wilder.basic_highlighter(),
|
||||||
|
highlights = {
|
||||||
|
accent = "WilderAccent",
|
||||||
|
},
|
||||||
|
border = "rounded",
|
||||||
|
left = { " ", wilder.popupmenu_devicons() },
|
||||||
|
right = { " ", wilder.popupmenu_scrollbar() },
|
||||||
|
})
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Define the custom highlight group for the accent color
|
||||||
|
programs.nixvim.highlight = {
|
||||||
|
WilderAccent = {
|
||||||
|
fg = "#f5c2e7";
|
||||||
|
bold = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.nixvim = {
|
|
||||||
plugins = {
|
|
||||||
yanky = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
ring = {
|
|
||||||
storage = "sqlite";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sqlite-lua = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
keymaps = [
|
|
||||||
{
|
|
||||||
key = "p";
|
|
||||||
action = "<Plug>(YankyPutAfter)";
|
|
||||||
mode = [
|
|
||||||
"n"
|
|
||||||
"x"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "P";
|
|
||||||
action = "<Plug>(YankyPutBefore)";
|
|
||||||
mode = [
|
|
||||||
"n"
|
|
||||||
"x"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "gp";
|
|
||||||
action = "<Plug>(YankyGPutAfter)";
|
|
||||||
mode = [
|
|
||||||
"n"
|
|
||||||
"x"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "gP";
|
|
||||||
action = "<Plug>(YankyGPutBefore)";
|
|
||||||
mode = [
|
|
||||||
"n"
|
|
||||||
"x"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<c-p>";
|
|
||||||
action = "<Plug>(YankyPreviousEntry)";
|
|
||||||
mode = [
|
|
||||||
"n"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<c-n>";
|
|
||||||
action = "<Plug>(YankyNextEntry)";
|
|
||||||
mode = [
|
|
||||||
"n"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
40
home/programs/nixvim/plugins/yazi.nix
Normal file
40
home/programs/nixvim/plugins/yazi.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins = {
|
||||||
|
yazi = {
|
||||||
|
enable = true;
|
||||||
|
lazyLoad.settings.event = [
|
||||||
|
"BufReadPost"
|
||||||
|
"BufNewFile"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
which-key.settings.spec = [
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>y";
|
||||||
|
group = "Yazi";
|
||||||
|
icon = " ";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
key = "<leader>yf";
|
||||||
|
action = "<cmd>Yazi<cr>";
|
||||||
|
options.desc = "Open yazi at the current file";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>yw";
|
||||||
|
action = "<cmd>Yazi cwd<cr>";
|
||||||
|
options.desc = "Open yazi at the current working directory";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>yl";
|
||||||
|
action = "<cmd>Yazi toggle<cr>";
|
||||||
|
options.desc = "Resume the last session";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
10
home/programs/nixvim/plugins/yuck.nix
Normal file
10
home/programs/nixvim/plugins/yuck.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim.plugins.yuck = {
|
||||||
|
enable = true;
|
||||||
|
lazyLoad.settings.filetypes = [
|
||||||
|
"yuck"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.nixvim = {
|
|
||||||
plugins = {
|
|
||||||
zk = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
picker = "telescope";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
which-key.settings.spec = [
|
|
||||||
{
|
|
||||||
__unkeyed-1 = "<leader>z";
|
|
||||||
group = "Zettelkasten";
|
|
||||||
icon = " ";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
keymaps = [
|
|
||||||
{
|
|
||||||
key = "<leader>zn";
|
|
||||||
action = "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>";
|
|
||||||
mode = [ "n" ];
|
|
||||||
options = {
|
|
||||||
desc = "Create";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>zo";
|
|
||||||
action = "<Cmd>ZkNotes { sort = { 'modified' } }<CR>";
|
|
||||||
mode = [ "n" ];
|
|
||||||
options = {
|
|
||||||
desc = "Open";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>zt";
|
|
||||||
action = "<Cmd>ZkTags<CR>";
|
|
||||||
mode = [ "n" ];
|
|
||||||
options = {
|
|
||||||
desc = "Open Tags";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>zf";
|
|
||||||
action = "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>";
|
|
||||||
mode = [ "n" ];
|
|
||||||
options = {
|
|
||||||
desc = "Search";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
key = "<leader>zf";
|
|
||||||
action = ":'<,'>ZkMatch<CR>";
|
|
||||||
mode = [ "v" ];
|
|
||||||
options = {
|
|
||||||
desc = "Search (Matching the Selection)";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
files = {
|
|
||||||
# TODO: Add descriptions
|
|
||||||
# TODO: Did the sytnax change?
|
|
||||||
"ftplugin/markdown.lua" = {
|
|
||||||
extraConfigLua = # lua
|
|
||||||
''
|
|
||||||
-- Add the key mappings only for Markdown files in a zk notebook.
|
|
||||||
if require("zk.util").notebook_root(vim.fn.expand('%:p')) ~= nil then
|
|
||||||
local function map(...) vim.api.nvim_buf_set_keymap(0, ...) end
|
|
||||||
local opts = { noremap=true, silent=false }
|
|
||||||
|
|
||||||
-- Create a new note after asking for its title.
|
|
||||||
-- This overrides the global `<leader>zn` mapping to create the note in the same directory as the current buffer.
|
|
||||||
map("n", "<leader>zn", "<Cmd>ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
|
|
||||||
-- Create a new note in the same directory as the current buffer, using the current selection for title.
|
|
||||||
map("v", "<leader>znt", ":'<,'>ZkNewFromTitleSelection { dir = vim.fn.expand('%:p:h') }<CR>", opts)
|
|
||||||
-- Create a new note in the same directory as the current buffer, using the current selection for note content and asking for its title.
|
|
||||||
map("v", "<leader>znc", ":'<,'>ZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
|
|
||||||
|
|
||||||
-- Open notes linking to the current buffer.
|
|
||||||
map("n", "<leader>zb", "<Cmd>ZkBacklinks<CR>", opts)
|
|
||||||
-- Open notes linked by the current buffer.
|
|
||||||
map("n", "<leader>zl", "<Cmd>ZkLinks<CR>", opts)
|
|
||||||
|
|
||||||
-- Preview a linked note.
|
|
||||||
map("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
|
||||||
-- Open the code actions for a visual selection.
|
|
||||||
map("v", "<leader>za", ":'<,'>lua vim.lsp.buf.range_code_action()<CR>", opts)
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user