split to minimal, small, all-plugs
This commit is contained in:
parent
4b6b24e361
commit
83ed6ec5e0
13 changed files with 321 additions and 440 deletions
209
flake.lock
209
flake.lock
|
|
@ -90,38 +90,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1747046372,
|
||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_3": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1747046372,
|
||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
|
|
@ -158,27 +126,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"neovim-nightly-overlay",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1756770412,
|
||||
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "4524271976b625a4a605beefd893f270620fd751",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
|
|
@ -259,29 +206,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks_2": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_3",
|
||||
"gitignore": "gitignore_2",
|
||||
"nixpkgs": [
|
||||
"neovim-nightly-overlay",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758108966,
|
||||
"narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -304,53 +228,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"neovim-nightly-overlay",
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hercules-ci-effects": {
|
||||
"inputs": {
|
||||
"flake-parts": [
|
||||
"neovim-nightly-overlay",
|
||||
"flake-parts"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"neovim-nightly-overlay",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758022363,
|
||||
"narHash": "sha256-ENUhCRWgSX4ni751HieNuQoq06dJvApV/Nm89kh+/A0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"rev": "1a3667d33e247ad35ca250698d63f49a5453d824",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hlargs-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
|
@ -415,46 +292,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neovim-nightly-overlay": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-parts": "flake-parts_3",
|
||||
"git-hooks": "git-hooks_2",
|
||||
"hercules-ci-effects": "hercules-ci-effects",
|
||||
"neovim-src": "neovim-src",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758931509,
|
||||
"narHash": "sha256-NFOXeqUwhH+V+XXJP3Z8RRzjulOzokwOPQ2kbDuFvX8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"rev": "93318bab5ce403a60a694ad1b6219760935553f7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neovim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1758863424,
|
||||
"narHash": "sha256-fYY8JrOuqovlOcXfryf2xiahBPTXHQExFpMIsur69/A=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "a0c60e819df1b4d4ae5ac631d48e874fa1cf9b92",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1741865919,
|
||||
|
|
@ -532,27 +369,11 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1758763312,
|
||||
"narHash": "sha256-puBMviZhYlqOdUUgEmMVJpXqC/ToEqSvkyZ30qQ09xM=",
|
||||
"lastModified": 1758690382,
|
||||
"narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e57b3b16ad8758fd681511a078f35c416a8cc939",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1758427187,
|
||||
"narHash": "sha256-pHpxZ/IyCwoTQPtFIAG2QaxuSm8jWzrzBGjwQZIttJc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "554be6495561ff07b6c724047bdd7e0716aa7b46",
|
||||
"rev": "e643668fd71b949c53f8626614b21ff71a07379d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -589,8 +410,7 @@
|
|||
"hlargs-nvim": "hlargs-nvim",
|
||||
"local-highlight-nvim": "local-highlight-nvim",
|
||||
"namu-nvim": "namu-nvim",
|
||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nvim-yati": "nvim-yati",
|
||||
"stay-in-place-nvim": "stay-in-place-nvim",
|
||||
"whatthejump-nvim": "whatthejump-nvim",
|
||||
|
|
@ -645,27 +465,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"neovim-nightly-overlay",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758728421,
|
||||
"narHash": "sha256-ySNJ008muQAds2JemiyrWYbwbG+V7S5wg3ZVKGHSFu8=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "5eda4ee8121f97b218f7cc73f5172098d458f1d1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"whatthejump-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
description = "Neovim derivation";
|
||||
|
||||
inputs = {
|
||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
gen-luarc.url = "github:mrcjkb/nix-gen-luarc-json";
|
||||
|
|
@ -79,7 +78,6 @@
|
|||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
inputs.neovim-nightly-overlay.overlays.default
|
||||
# Import the overlay, so that the final Neovim derivation(s) can be accessed via pkgs.<nvim-pkg>
|
||||
neovim-overlay
|
||||
# This adds a function can be used to generate a .luarc.json
|
||||
|
|
@ -108,8 +106,10 @@
|
|||
in
|
||||
{
|
||||
packages = rec {
|
||||
default = nvim;
|
||||
nvim = pkgs.nvim-pkg;
|
||||
nvim-small = pkgs.nvim-small;
|
||||
nvim-minimal = pkgs.nvim-minimal;
|
||||
default = nvim;
|
||||
};
|
||||
devShells = {
|
||||
default = shell;
|
||||
|
|
|
|||
|
|
@ -36,9 +36,33 @@ with final.pkgs.lib; let
|
|||
# optional = <true|false>; # Default: false
|
||||
# ...
|
||||
# }
|
||||
all-plugins = with pkgs.vimPlugins; [
|
||||
|
||||
stayinpalce = (mkNvimPlugin inputs.stay-in-place-nvim "stay-in-place.nvim");
|
||||
|
||||
toggle_plugins = val: /*vim*/''
|
||||
let g:did_load_ai_plugin = v:${val}
|
||||
let g:did_load_blink_plugin = v:${val}
|
||||
let g:did_load_comment_plugin = v:${val}
|
||||
let g:did_load_format_plugin = v:${val}
|
||||
let g:did_load_git_plugin = v:${val}
|
||||
let g:did_load_jumps_plugin = v:${val}
|
||||
let g:did_load_keyhelper_plugin = v:${val}
|
||||
let g:did_load_lint_plugin = v:${val}
|
||||
let g:did_load_lspconfig_plugin = v:${val}
|
||||
let g:did_load_mini_plugin = v:${val}
|
||||
let g:did_load_snacks_plugin = v:${val}
|
||||
let g:did_load_smart_plugin = v:${val}
|
||||
let g:did_load_split_join_plugin = v:${val}
|
||||
let g:did_load_tags_plugin = v:${val}
|
||||
let g:did_load_treesitter_plugin = v:${val}
|
||||
let g:did_load_ui_plugins = v:${val}
|
||||
'';
|
||||
|
||||
|
||||
minimal-plugins = with pkgs.vimPlugins; [
|
||||
# кастыль для neovim/nix там init.vim чтобы всё обернуть в lua << END
|
||||
# последний плагин в конце должен содержать END
|
||||
vim-polyglot
|
||||
{
|
||||
plugin = lze;
|
||||
optional = false;
|
||||
|
|
@ -46,76 +70,38 @@ with final.pkgs.lib; let
|
|||
lua << END
|
||||
_G.lze = require("lze")
|
||||
END
|
||||
|
||||
${toggle_plugins "true"}
|
||||
lua << END
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = alpha-nvim;
|
||||
optional = false;
|
||||
config = /*lua*/''
|
||||
require("dash")
|
||||
'';
|
||||
}
|
||||
]
|
||||
++ langs.plugins
|
||||
++ (callPackage ./treesitter.nix)
|
||||
++ (callPackage ./autocomplete.nix)
|
||||
++ (callPackage ./statusline.nix)
|
||||
++ (callPackage ./quickfix.nix)
|
||||
++ (callPackage ./blink-pairs.nix)
|
||||
++ (callPackage ./ui.nix)
|
||||
++ (callPackage ./avante.nix)
|
||||
|
||||
++ [
|
||||
vim-polyglot
|
||||
diffview-nvim
|
||||
gitsigns-nvim
|
||||
vim-fugitive
|
||||
|
||||
which-key-nvim
|
||||
better-escape-nvim
|
||||
{
|
||||
plugin = plenary-nvim;
|
||||
plugin = smartyank-nvim;
|
||||
optional = true;
|
||||
type = "lua";
|
||||
config = /*lua*/''
|
||||
lze.load {
|
||||
"plenary.nvim",
|
||||
on_require = {"plenary.job", "plenary.path"},
|
||||
"${smartyank-nvim.pname}",
|
||||
event = "ModeChanged",
|
||||
after = function()
|
||||
require("smartyank").setup({
|
||||
highlight = {
|
||||
enabled = true, -- highlight yanked text
|
||||
timeout = 100,
|
||||
},
|
||||
})
|
||||
vim.api.nvim_create_autocmd("FocusGained", {
|
||||
callback = function()
|
||||
local loaded_content = vim.fn.getreg("+")
|
||||
if loaded_content ~= "" then
|
||||
vim.fn.setreg('"', loaded_content)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
||||
fzf-lua
|
||||
smart-splits-nvim
|
||||
|
||||
eyeliner-nvim
|
||||
demicolon-nvim
|
||||
flash-nvim
|
||||
|
||||
comment-nvim
|
||||
|
||||
|
||||
vim-easy-align
|
||||
treesj
|
||||
mini-splitjoin
|
||||
mini-ai
|
||||
{
|
||||
plugin = mini-misc;
|
||||
optional = false;
|
||||
type = "lua";
|
||||
}
|
||||
{
|
||||
plugin = mini-icons;
|
||||
optional = false;
|
||||
type = "lua";
|
||||
config = /*lua*/''
|
||||
require("mini.icons").setup()
|
||||
MiniIcons.mock_nvim_web_devicons()
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = vim-suda;
|
||||
optional = true;
|
||||
|
|
@ -128,12 +114,12 @@ with final.pkgs.lib; let
|
|||
'';
|
||||
}
|
||||
{
|
||||
plugin = (mkNvimPlugin inputs.stay-in-place-nvim "stay-in-place.nvim");
|
||||
plugin = stayinpalce;
|
||||
optional = true;
|
||||
type = "lua";
|
||||
config = /*lua*/''
|
||||
lze.load({
|
||||
"stay-in-place.nvim",
|
||||
"${stayinpalce.pname}",
|
||||
after=function()
|
||||
require("stay-in-place").setup{
|
||||
set_keymaps = true,
|
||||
|
|
@ -146,40 +132,74 @@ with final.pkgs.lib; let
|
|||
}
|
||||
|
||||
{
|
||||
plugin = nvim-scissors;
|
||||
type = "lua";
|
||||
plugin = oil-nvim;
|
||||
optional = false;
|
||||
|
||||
config = /*vim*/''
|
||||
END
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
smallset-plugins = minimal-plugins
|
||||
++ (with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = vim-fugitive;
|
||||
optional = true;
|
||||
config = /*lua*/''
|
||||
type = "lua";
|
||||
config = /*vim*/''
|
||||
let g:did_load_mini_plugin = v:false
|
||||
let g:did_load_smart_plugin = v:false
|
||||
let g:did_load_snacks_plugin = v:false
|
||||
let g:did_load_comment_plugin = v:false
|
||||
let g:did_load_treesitter_plugin = v:false
|
||||
|
||||
lua << END
|
||||
lze.load {
|
||||
"${nvim-scissors.pname}",
|
||||
after = function()
|
||||
require("scissors").setup{
|
||||
snippetDir = vim.fn.stdpath("config") .. "/snippets",
|
||||
jsonFormatter = "jaq",
|
||||
}
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>Se",
|
||||
function()
|
||||
require("scissors").editSnippet()
|
||||
end,
|
||||
desc = "Snippet: Edit",
|
||||
},
|
||||
{
|
||||
"<leader>Sn",
|
||||
function()
|
||||
require("scissors").addNewSnippet()
|
||||
end,
|
||||
mode = { "n", "x", "v" },
|
||||
desc = "Snippet: New",
|
||||
},
|
||||
"${vim-fugitive.pname}",
|
||||
cmd = {
|
||||
"Git",
|
||||
},
|
||||
}
|
||||
'';
|
||||
}
|
||||
])
|
||||
++ (callPackage ./treesitter.nix)
|
||||
++ (callPackage ./statusline.nix)
|
||||
++ (callPackage ./quickfix.nix)
|
||||
|
||||
{ plugin = oil-nvim; optional = false; }
|
||||
++ (with pkgs.vimPlugins; [
|
||||
|
||||
|
||||
{
|
||||
plugin = plenary-nvim;
|
||||
optional = true;
|
||||
type = "lua";
|
||||
config = /*lua*/''
|
||||
lze.load {
|
||||
"${plenary-nvim.pname}",
|
||||
on_require = {"plenary.job", "plenary.path"},
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
||||
smart-splits-nvim
|
||||
comment-nvim
|
||||
{
|
||||
plugin = mini-misc;
|
||||
optional = false;
|
||||
type = "lua";
|
||||
}
|
||||
mini-ai
|
||||
{
|
||||
plugin = mini-icons;
|
||||
optional = false;
|
||||
type = "lua";
|
||||
config = /*lua*/''
|
||||
require("mini.icons").setup()
|
||||
MiniIcons.mock_nvim_web_devicons()
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = snacks-nvim;
|
||||
|
|
@ -190,7 +210,80 @@ with final.pkgs.lib; let
|
|||
'';
|
||||
}
|
||||
|
||||
];
|
||||
]);
|
||||
|
||||
all-plugins = smallset-plugins ++ (
|
||||
with pkgs.vimPlugins;
|
||||
[
|
||||
{
|
||||
plugin = alpha-nvim;
|
||||
optional = false;
|
||||
config = /*vim*/''
|
||||
${toggle_plugins "false"}
|
||||
|
||||
lua << END
|
||||
require("dash")
|
||||
'';
|
||||
}
|
||||
]
|
||||
)
|
||||
++ (callPackage ./ai.nix)
|
||||
++ (callPackage ./autocomplete.nix)
|
||||
++ (callPackage ./blink-pairs.nix)
|
||||
++ (callPackage ./ui.nix)
|
||||
++ langs.plugins
|
||||
++ (
|
||||
with pkgs.vimPlugins; [
|
||||
eyeliner-nvim
|
||||
demicolon-nvim
|
||||
flash-nvim
|
||||
|
||||
vim-easy-align
|
||||
treesj
|
||||
mini-splitjoin
|
||||
|
||||
which-key-nvim
|
||||
better-escape-nvim
|
||||
|
||||
diffview-nvim
|
||||
gitsigns-nvim
|
||||
|
||||
{
|
||||
plugin = nvim-scissors;
|
||||
type = "lua";
|
||||
optional = true;
|
||||
config = /*lua*/''
|
||||
lze.load {
|
||||
"${nvim-scissors.pname}",
|
||||
after = function()
|
||||
require("scissors").setup{
|
||||
snippetDir = vim.fn.stdpath("config") .. "/snippets",
|
||||
jsonFormatter = "jaq",
|
||||
}
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>Se",
|
||||
function()
|
||||
require("scissors").editSnippet()
|
||||
end,
|
||||
desc = "Snippet: Edit",
|
||||
},
|
||||
{
|
||||
"<leader>Sn",
|
||||
function()
|
||||
require("scissors").addNewSnippet()
|
||||
end,
|
||||
mode = { "n", "x", "v" },
|
||||
desc = "Snippet: New",
|
||||
},
|
||||
},
|
||||
}
|
||||
END
|
||||
'';
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
extraPackages = langs.packages ++ [
|
||||
pkgs.jaq
|
||||
|
|
@ -209,6 +302,20 @@ in
|
|||
inherit extraPackages;
|
||||
};
|
||||
|
||||
nvim-small = mkNeovim {
|
||||
plugins = smallset-plugins;
|
||||
ignoreConfigRegexes = [
|
||||
"^lsp/.*.lua"
|
||||
];
|
||||
};
|
||||
|
||||
nvim-minimal = mkNeovim {
|
||||
plugins = minimal-plugins;
|
||||
ignoreConfigRegexes = [
|
||||
"^lsp/.*.lua"
|
||||
];
|
||||
};
|
||||
|
||||
# This is meant to be used within a devshell.
|
||||
# Instead of loading the lua Neovim configuration from
|
||||
# the Nix store, it is loaded from $XDG_CONFIG_HOME/nvim-dev
|
||||
|
|
@ -219,6 +326,24 @@ in
|
|||
wrapRc = true;
|
||||
};
|
||||
|
||||
nvim-dev-small = mkNeovim {
|
||||
plugins = smallset-plugins;
|
||||
appName = "nvim-dev-small";
|
||||
wrapRc = true;
|
||||
ignoreConfigRegexes = [
|
||||
"^lsp/.*.lua"
|
||||
];
|
||||
};
|
||||
|
||||
nvim-dev-minimal = mkNeovim {
|
||||
plugins = minimal-plugins;
|
||||
appName = "nvim-dev-minimal";
|
||||
wrapRc = true;
|
||||
ignoreConfigRegexes = [
|
||||
"^lsp/.*.lua"
|
||||
];
|
||||
};
|
||||
|
||||
# This can be symlinked in the devShell's shellHook
|
||||
nvim-luarc-json = final.mk-luarc-json {
|
||||
plugins = all-plugins;
|
||||
|
|
|
|||
60
nix/ui.nix
60
nix/ui.nix
|
|
@ -11,64 +11,8 @@ with pkgs.vimPlugins; [
|
|||
}
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = smartyank-nvim;
|
||||
optional = true;
|
||||
type = "lua";
|
||||
config = /*lua*/''
|
||||
lze.load {
|
||||
"${smartyank-nvim.pname}",
|
||||
event = "ModeChanged",
|
||||
after = function()
|
||||
require("smartyank").setup({
|
||||
highlight = {
|
||||
enabled = true, -- highlight yanked text
|
||||
timeout = 100,
|
||||
},
|
||||
})
|
||||
vim.api.nvim_create_autocmd("FocusGained", {
|
||||
callback = function()
|
||||
local loaded_content = vim.fn.getreg("+")
|
||||
if loaded_content ~= "" then
|
||||
vim.fn.setreg('"', loaded_content)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
}
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = (mkNvimPlugin inputs.local-highlight-nvim "local-highlight.nvim");
|
||||
optional = true;
|
||||
type = "lua";
|
||||
config = /*lua*/''
|
||||
lze.load({
|
||||
"local-highlight.nvim",
|
||||
on_require="local-highlight",
|
||||
after = function()
|
||||
vim.api.nvim_set_hl(0, "LocalHighlight", { underline = true })
|
||||
require("local-highlight").setup({
|
||||
insert_mode = false,
|
||||
file_types = {},
|
||||
hlgroup = "LocalHighlight",
|
||||
})
|
||||
end,
|
||||
})
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = (mkNvimPlugin inputs.whatthejump-nvim "whatthejump.nvim");
|
||||
optional = true;
|
||||
type = "lua";
|
||||
config = /*lua*/''
|
||||
lze.load({
|
||||
"whatthejump.nvim",
|
||||
keys = { "<C-i>", "<C-o>" },
|
||||
})
|
||||
'';
|
||||
}
|
||||
|
||||
(mkNvimPlugin inputs.local-highlight-nvim "local-highlight.nvim")
|
||||
(mkNvimPlugin inputs.whatthejump-nvim "whatthejump.nvim")
|
||||
{
|
||||
plugin = render-markdown-nvim;
|
||||
optional = true;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ g.snips_email = vim.env.EMAIL or
|
|||
g.snips_github = vim.env.GITHUB or "https://github.com/JMarkin"
|
||||
|
||||
|
||||
opt.cmdheight = 0
|
||||
opt.cmdheight = 1
|
||||
-- opt.colorcolumn = '+1'
|
||||
opt.cursorlineopt = 'both'
|
||||
opt.cursorline = true
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ fn.augroup("cursoronlyactivate", {
|
|||
},
|
||||
})
|
||||
|
||||
|
||||
-- Persistent Folds
|
||||
fn.augroup("auto_view", {
|
||||
{ "BufWinLeave", "BufWritePost", "WinLeave" },
|
||||
|
|
@ -209,19 +208,6 @@ fn.augroup("checktime", {
|
|||
},
|
||||
})
|
||||
|
||||
|
||||
fn.augroup("local-highlight-attach", {
|
||||
vim.g.post_load_events,
|
||||
{
|
||||
pattern = "*",
|
||||
callback = function(data)
|
||||
if not lf.is_large_file(data.buf, true) then
|
||||
require("local-highlight").attach(data.buf)
|
||||
end
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
if vim.env.TERM == "alacritty" then
|
||||
vim.api.nvim_create_autocmd("ExitPre", {
|
||||
once = true,
|
||||
|
|
|
|||
|
|
@ -3,61 +3,3 @@ if vim.g.did_load_bar_plugin then
|
|||
end
|
||||
vim.g.did_load_bar_plugin = true
|
||||
|
||||
local lf = require("largefiles")
|
||||
|
||||
lze.load({
|
||||
"dropbar.nvim",
|
||||
event = "BufAdd",
|
||||
after = function()
|
||||
require("dropbar").setup({
|
||||
bar = {
|
||||
enable = function(buf, win, _)
|
||||
buf = vim._resolve_bufnr(buf)
|
||||
if not vim.api.nvim_buf_is_valid(buf) or not vim.api.nvim_win_is_valid(win) then
|
||||
return false
|
||||
end
|
||||
|
||||
if
|
||||
not vim.api.nvim_buf_is_valid(buf)
|
||||
or not vim.api.nvim_win_is_valid(win)
|
||||
or vim.fn.win_gettype(win) ~= ""
|
||||
or vim.wo[win].winbar ~= ""
|
||||
or vim.bo[buf].ft == "help"
|
||||
then
|
||||
return false
|
||||
end
|
||||
|
||||
if lf.is_large_file(buf, true) then
|
||||
return false
|
||||
end
|
||||
|
||||
return vim.bo[buf].bt == "terminal"
|
||||
or vim.bo[buf].ft == "markdown"
|
||||
or pcall(vim.treesitter.get_parser, buf)
|
||||
or not vim.tbl_isempty(vim.lsp.get_clients({
|
||||
bufnr = buf,
|
||||
method = vim.lsp.protocol.Methods.textDocument_documentSymbol,
|
||||
}))
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
path = {
|
||||
relative_to = function(buf, win)
|
||||
-- Show full path in oil or fugitive buffers
|
||||
local bufname = vim.api.nvim_buf_get_name(buf)
|
||||
if vim.startswith(bufname, "oil://") or vim.startswith(bufname, "fugitive://") then
|
||||
local root = bufname:gsub("^%S+://", "", 1)
|
||||
while root and root ~= vim.fs.dirname(root) do
|
||||
root = vim.fs.dirname(root)
|
||||
end
|
||||
return root
|
||||
end
|
||||
|
||||
local ok, cwd = pcall(vim.fn.getcwd, win)
|
||||
return ok and cwd or vim.fn.getcwd()
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ if vim.g.did_load_fzf_plugin then
|
|||
end
|
||||
vim.g.did_load_fzf_plugin = true
|
||||
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
local augroup = vim.api.nvim_create_augroup
|
||||
|
||||
lze.load({
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ if vim.g.did_load_git_plugin then
|
|||
end
|
||||
vim.g.did_load_git_plugin = true
|
||||
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
local augroup = vim.api.nvim_create_augroup
|
||||
function DiffviewToggle()
|
||||
local lib = require("diffview.lib")
|
||||
|
|
@ -84,12 +83,6 @@ lze.load({
|
|||
{ "ih", ":<C-U>Gitsigns select_hunk<CR>", desc = "Git: select hunk", mode = { "o", "x" } },
|
||||
},
|
||||
},
|
||||
{
|
||||
"vim-fugitive",
|
||||
cmd = {
|
||||
"Git",
|
||||
},
|
||||
},
|
||||
{
|
||||
"diffview.nvim",
|
||||
keys = {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ vim.keymap.set({ "n" }, { "<leader>q", "<space>q" }, ":q<cr>", { desc = "Quit",
|
|||
vim.keymap.set({ "n", "v" }, "<C-d>", "10jzz")
|
||||
vim.keymap.set({ "n", "v" }, "<C-u>", "10kzz")
|
||||
vim.keymap.set({ "n", "v" }, "<C-e>", "<C-u>")
|
||||
vim.keymap.set({ "n" }, "<C-w>>", "10<C-w>>")
|
||||
vim.keymap.set({ "n" }, "<C-w><", "10<C-w><")
|
||||
vim.keymap.set({ "n" }, "<C-w>+", "5<C-w>+")
|
||||
vim.keymap.set({ "n" }, "<C-w>-", "5<C-w>-")
|
||||
|
||||
vim.keymap.set({ "v" }, "p", "pgvy", { desc = "Disable yank on paste" })
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,6 @@ if vim.g.did_load_lspconfig_plugin then
|
|||
end
|
||||
vim.g.did_load_lspconfig_plugin = true
|
||||
|
||||
if vim.env.NVIM_MINI ~= nil then
|
||||
return
|
||||
end
|
||||
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
local augroup = vim.api.nvim_create_augroup
|
||||
|
||||
|
|
|
|||
93
nvim/plugin/ui.lua
Normal file
93
nvim/plugin/ui.lua
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
if vim.g.did_load_ui_plugins then
|
||||
return
|
||||
end
|
||||
vim.g.did_load_ui_plugins = true
|
||||
|
||||
local lf = require("largefiles")
|
||||
local fn = require("funcs")
|
||||
|
||||
lze.load({
|
||||
"local-highlight.nvim",
|
||||
on_require = "local-highlight",
|
||||
after = function()
|
||||
vim.api.nvim_set_hl(0, "LocalHighlight", { underline = true })
|
||||
require("local-highlight").setup({
|
||||
insert_mode = false,
|
||||
file_types = {},
|
||||
hlgroup = "LocalHighlight",
|
||||
})
|
||||
end,
|
||||
})
|
||||
fn.augroup("local-highlight-attach", {
|
||||
vim.g.post_load_events,
|
||||
{
|
||||
pattern = "*",
|
||||
callback = function(data)
|
||||
if not lf.is_large_file(data.buf, true) then
|
||||
require("local-highlight").attach(data.buf)
|
||||
end
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
lze.load({
|
||||
"whatthejump.nvim",
|
||||
keys = { "<C-i>", "<C-o>" },
|
||||
})
|
||||
|
||||
lze.load({
|
||||
"dropbar.nvim",
|
||||
event = "BufAdd",
|
||||
after = function()
|
||||
require("dropbar").setup({
|
||||
bar = {
|
||||
enable = function(buf, win, _)
|
||||
buf = vim._resolve_bufnr(buf)
|
||||
if not vim.api.nvim_buf_is_valid(buf) or not vim.api.nvim_win_is_valid(win) then
|
||||
return false
|
||||
end
|
||||
|
||||
if
|
||||
not vim.api.nvim_buf_is_valid(buf)
|
||||
or not vim.api.nvim_win_is_valid(win)
|
||||
or vim.fn.win_gettype(win) ~= ""
|
||||
or vim.wo[win].winbar ~= ""
|
||||
or vim.bo[buf].ft == "help"
|
||||
then
|
||||
return false
|
||||
end
|
||||
|
||||
if lf.is_large_file(buf, true) then
|
||||
return false
|
||||
end
|
||||
|
||||
return vim.bo[buf].bt == "terminal"
|
||||
or vim.bo[buf].ft == "markdown"
|
||||
or pcall(vim.treesitter.get_parser, buf)
|
||||
or not vim.tbl_isempty(vim.lsp.get_clients({
|
||||
bufnr = buf,
|
||||
method = vim.lsp.protocol.Methods.textDocument_documentSymbol,
|
||||
}))
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
path = {
|
||||
relative_to = function(buf, win)
|
||||
-- Show full path in oil or fugitive buffers
|
||||
local bufname = vim.api.nvim_buf_get_name(buf)
|
||||
if vim.startswith(bufname, "oil://") or vim.startswith(bufname, "fugitive://") then
|
||||
local root = bufname:gsub("^%S+://", "", 1)
|
||||
while root and root ~= vim.fs.dirname(root) do
|
||||
root = vim.fs.dirname(root)
|
||||
end
|
||||
return root
|
||||
end
|
||||
|
||||
local ok, cwd = pcall(vim.fn.getcwd, win)
|
||||
return ok and cwd or vim.fn.getcwd()
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
})
|
||||
Loading…
Reference in a new issue