Compare commits
75 Commits
lspsaga-re
...
main
Author | SHA1 | Date |
---|---|---|
Dmitriy Pleshevskiy | 6bbb562216 | |
Dmitriy Pleshevskiy | 40bc84d1f8 | |
Dmitriy Pleshevskiy | d280679b14 | |
Dmitriy Pleshevskiy | dfef2d38b1 | |
Dmitriy Pleshevskiy | 542364e035 | |
Dmitriy Pleshevskiy | ddc7c23ef6 | |
Dmitriy Pleshevskiy | 41585809d7 | |
Dmitriy Pleshevskiy | e4411e7378 | |
Dmitriy Pleshevskiy | c414c1d302 | |
Dmitriy Pleshevskiy | 23a3e4c52e | |
Dmitriy Pleshevskiy | c4374c0037 | |
Dmitriy Pleshevskiy | c3a3fe588f | |
Dmitriy Pleshevskiy | e572ba6d78 | |
Dmitriy Pleshevskiy | b4a93f588f | |
Dmitriy Pleshevskiy | 91b9f31c3f | |
Dmitriy Pleshevskiy | 45117804e7 | |
Dmitriy Pleshevskiy | 3717b5002d | |
Dmitriy Pleshevskiy | 54333ac0a6 | |
Dmitriy Pleshevskiy | ecd458f1d3 | |
Dmitriy Pleshevskiy | dc2181a344 | |
Dmitriy Pleshevskiy | 06b4e995bf | |
Dmitriy Pleshevskiy | b7a44b014a | |
Dmitriy Pleshevskiy | db6fc1b83b | |
Dmitriy Pleshevskiy | 904a97ea5f | |
Dmitriy Pleshevskiy | 6942284275 | |
Dmitriy Pleshevskiy | 020520b007 | |
Dmitriy Pleshevskiy | ecd8cd11ed | |
Dmitriy Pleshevskiy | 2a44c3e661 | |
Dmitriy Pleshevskiy | 5c5878a64f | |
Dmitriy Pleshevskiy | a84098dd91 | |
Dmitriy Pleshevskiy | efd4f06e0d | |
Dmitriy Pleshevskiy | 6dd623dd38 | |
Dmitriy Pleshevskiy | 69355e6429 | |
Dmitriy Pleshevskiy | d576379760 | |
Dmitriy Pleshevskiy | 70c85a004f | |
Dmitriy Pleshevskiy | ad87fe9316 | |
Dmitriy Pleshevskiy | 1504ad1ad0 | |
Dmitriy Pleshevskiy | d317a7c665 | |
Dmitriy Pleshevskiy | 99e095d919 | |
Dmitriy Pleshevskiy | 437e0e05cf | |
Dmitriy Pleshevskiy | 005ddc0b9e | |
Dmitriy Pleshevskiy | 2de32b283e | |
Dmitriy Pleshevskiy | d991c749c2 | |
Dmitriy Pleshevskiy | dc805ab062 | |
Dmitriy Pleshevskiy | ae6faa78c5 | |
Dmitriy Pleshevskiy | 7d91e495dc | |
Dmitriy Pleshevskiy | aa9f2ccb68 | |
Dmitriy Pleshevskiy | 4edf3f4d64 | |
Dmitriy Pleshevskiy | 465f27ac0c | |
Dmitriy Pleshevskiy | ea2231f615 | |
Dmitriy Pleshevskiy | 42e6ef422f | |
Dmitriy Pleshevskiy | 1067059290 | |
Dmitriy Pleshevskiy | 4811c8054c | |
Dmitriy Pleshevskiy | 93b5f04284 | |
Dmitriy Pleshevskiy | 91e0909ac6 | |
Dmitriy Pleshevskiy | a44c17c95a | |
Dmitriy Pleshevskiy | f8d8c99ac5 | |
Dmitriy Pleshevskiy | 2b24da8720 | |
Dmitriy Pleshevskiy | 3463a6c419 | |
Dmitriy Pleshevskiy | 23fce1be6c | |
Dmitriy Pleshevskiy | 0d27956624 | |
Dmitriy Pleshevskiy | 019d8ae991 | |
Dmitriy Pleshevskiy | 621f99403b | |
Dmitriy Pleshevskiy | 9dca04d9b2 | |
Dmitriy Pleshevskiy | b6f33bfb03 | |
Dmitriy Pleshevskiy | 116764c3a0 | |
Dmitriy Pleshevskiy | cf97347ae5 | |
Dmitriy Pleshevskiy | 5225154c6c | |
Dmitriy Pleshevskiy | 8957cc62e6 | |
Dmitriy Pleshevskiy | b22dfff883 | |
Dmitriy Pleshevskiy | ccc489bbbd | |
Dmitriy Pleshevskiy | 1e9bae6c7b | |
Dmitriy Pleshevskiy | 89665d9a4a | |
Dmitriy Pleshevskiy | 27b6718d38 | |
Dmitriy Pleshevskiy | 6f09704969 |
|
@ -17,7 +17,6 @@ vim.opt.encoding = "utf-8"
|
|||
vim.opt.termguicolors = true
|
||||
|
||||
-- Other options
|
||||
vim.cmd("syntax on")
|
||||
vim.opt.backspace = { "indent", "eol", "start" }
|
||||
vim.opt.laststatus = 2
|
||||
vim.opt.showmode = false
|
||||
|
@ -88,6 +87,10 @@ vim.opt.foldlevel = 99
|
|||
vim.opt.foldlevelstart = 99
|
||||
vim.opt.foldminlines = 3
|
||||
vim.opt.foldnestmax = 5
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.cmd([[
|
||||
set foldexpr=nvim_treesitter#foldexpr()
|
||||
]])
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
--
|
||||
|
@ -126,32 +129,6 @@ set_line_limiter(81, {
|
|||
"*.css",
|
||||
})
|
||||
|
||||
-- Spell check for markdown files
|
||||
local spell_check_augroup = vim.api.nvim_create_augroup("spell_check", {})
|
||||
vim.api.nvim_create_autocmd(bufReadFile, {
|
||||
pattern = { "*.md" },
|
||||
group = spell_check_augroup,
|
||||
callback = function()
|
||||
vim.wo.spell = true
|
||||
end,
|
||||
})
|
||||
|
||||
-- Set up fold method for each lang
|
||||
local folding_augroup = vim.api.nvim_create_augroup("folding", {})
|
||||
vim.api.nvim_create_autocmd(bufReadFile, {
|
||||
group = folding_augroup,
|
||||
pattern = {
|
||||
"*.js",
|
||||
"*.jsx",
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
},
|
||||
callback = function()
|
||||
vim.cmd("syntax on")
|
||||
vim.wo.foldmethod = "syntax"
|
||||
end,
|
||||
})
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
--
|
||||
-- Bindings
|
||||
|
|
62
default.nix
62
default.nix
|
@ -1,59 +1,3 @@
|
|||
{ enableDevIcons ? false
|
||||
, enableBarBar ? false
|
||||
, enableTabby ? false
|
||||
, viAlias ? false
|
||||
, vimAlias ? false
|
||||
, theme ? { }
|
||||
, wrapNeovim
|
||||
, neovim-unwrapped
|
||||
, tree-sitter
|
||||
, vimPlugins
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
lib = import ./lib.nix;
|
||||
|
||||
pluginParams = vimPlugins // { inherit lib; };
|
||||
|
||||
callPlugin = op: if builtins.isFunction op then op pluginParams else import op pluginParams;
|
||||
callPlugins = list: builtins.map callPlugin list;
|
||||
|
||||
plugins = callPlugins [
|
||||
./plugins/config
|
||||
(import ./plugins/syntax {
|
||||
inherit tree-sitter;
|
||||
})
|
||||
./plugins/git
|
||||
./plugins/explorer
|
||||
(import ./plugins/theme {
|
||||
inherit enableDevIcons enableTabby;
|
||||
inherit theme;
|
||||
})
|
||||
./plugins/lsp
|
||||
./plugins/formatter
|
||||
./plugins/ux
|
||||
];
|
||||
|
||||
basePlugins = [ vimPlugins.plenary-nvim ];
|
||||
customPlugins = builtins.catAttrs "plugins" plugins;
|
||||
allPlugins = basePlugins ++ customPlugins;
|
||||
|
||||
basicConfigs = builtins.map builtins.readFile [ ./config/basic.lua ];
|
||||
pluginConfigs = builtins.catAttrs "luaConfig" plugins;
|
||||
allConfigs = basicConfigs ++ pluginConfigs;
|
||||
in
|
||||
wrapNeovim neovim-unwrapped {
|
||||
inherit viAlias;
|
||||
inherit vimAlias;
|
||||
|
||||
withPython3 = false;
|
||||
withNodeJs = false;
|
||||
withRuby = false;
|
||||
|
||||
configure = {
|
||||
customRC = lib.mkLuaRc allConfigs;
|
||||
|
||||
packages.myVimPackages = { start = allPlugins; };
|
||||
};
|
||||
}
|
||||
(import (fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz") {
|
||||
src = builtins.fetchGit ./.;
|
||||
}).defaultNix
|
||||
|
|
319
flake.lock
319
flake.lock
|
@ -3,85 +3,131 @@
|
|||
"cmp-luasnip": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1651433493,
|
||||
"narHash": "sha256-8ocJY5qeAJXFSuTnavXX6NvZyAB0EEn2Y+amrWp8B1Y=",
|
||||
"lastModified": 1666943769,
|
||||
"narHash": "sha256-Z5SPy3j2oHFxJ7bK8DP8Q/oRyLEMlnWyIfDaQcNVIS0=",
|
||||
"owner": "saadparwaiz1",
|
||||
"repo": "cmp_luasnip",
|
||||
"rev": "a9de941bcbda508d0a45d28ae366bb3f08db2e36",
|
||||
"rev": "18095520391186d634a0045dacaa346291096566",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "saadparwaiz1",
|
||||
"repo": "cmp_luasnip",
|
||||
"rev": "a9de941bcbda508d0a45d28ae366bb3f08db2e36",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cmp-nvim-lsp": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1652705110,
|
||||
"narHash": "sha256-19Ka4EQhqo//IMjJ/DnXiHsevVWFy2M90oSjmBFfCO0=",
|
||||
"lastModified": 1687494203,
|
||||
"narHash": "sha256-mU0soCz79erJXMMqD/FyrJZ0mu2n6fE0deymPzQlxts=",
|
||||
"owner": "hrsh7th",
|
||||
"repo": "cmp-nvim-lsp",
|
||||
"rev": "affe808a5c56b71630f17aa7c38e15c59fd648a8",
|
||||
"rev": "44b16d11215dce86f253ce0c30949813c0a90765",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hrsh7th",
|
||||
"repo": "cmp-nvim-lsp",
|
||||
"rev": "affe808a5c56b71630f17aa7c38e15c59fd648a8",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cmp-tabby": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1681450408,
|
||||
"narHash": "sha256-0swK9LV91SeZO0SQl8zVs7GmQNMYwQm7XyQE0iPbc/w=",
|
||||
"owner": "nzlov",
|
||||
"repo": "cmp-tabby",
|
||||
"rev": "c0cb81024ee1500a722b3c35f64dd282c11bc7ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nzlov",
|
||||
"repo": "cmp-tabby",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"editorconfig-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663509832,
|
||||
"narHash": "sha256-+eLoPckZdsXqsyBGeM726P9WtR/pu0q7IEhKufulOxM=",
|
||||
"lastModified": 1673364897,
|
||||
"narHash": "sha256-pR57tITdVGF4luEmmRYv/XFb35E3KDfcgYRijkPAc+Y=",
|
||||
"owner": "gpanders",
|
||||
"repo": "editorconfig.nvim",
|
||||
"rev": "7d10fe6bc340fd783c0b61cf627dd235100284db",
|
||||
"rev": "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gpanders",
|
||||
"repo": "editorconfig.nvim",
|
||||
"rev": "7d10fe6bc340fd783c0b61cf627dd235100284db",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitsigns-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663543397,
|
||||
"narHash": "sha256-FgNSwvW7Bk+eKutMj0zqEorJ3+ijCALtOXs2OYiSX1I=",
|
||||
"lastModified": 1695571272,
|
||||
"narHash": "sha256-VJCtDnPSo5RgSC+czSIOvqGhpUT0dzvCzbLtup+Ctyo=",
|
||||
"owner": "lewis6991",
|
||||
"repo": "gitsigns.nvim",
|
||||
"rev": "f98c85e7c3d65a51f45863a34feb4849c82f240f",
|
||||
"rev": "bdeba1cec3faddd89146690c10b9a87949c0ee66",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lewis6991",
|
||||
"repo": "gitsigns.nvim",
|
||||
"rev": "f98c85e7c3d65a51f45863a34feb4849c82f240f",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hop-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1694283445,
|
||||
"narHash": "sha256-SnuFeD/lrMxKtpBRPgIwdG0kVF7BWe02PiV7URVDASI=",
|
||||
"owner": "phaazon",
|
||||
"repo": "hop.nvim",
|
||||
"rev": "1a1eceafe54b5081eae4cb91c723abd1d450f34b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "phaazon",
|
||||
"repo": "hop.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lspsaga-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1664704370,
|
||||
"narHash": "sha256-f0pwssdEI5mAO/Ov8E9DpT/E+5Xi3DvMjo4ui+TX3go=",
|
||||
"lastModified": 1665291018,
|
||||
"narHash": "sha256-jkoEP5jeIZDAK/27gpNTXtW10/Ev9nB5RqUahPhja2Y=",
|
||||
"owner": "glepnir",
|
||||
"repo": "lspsaga.nvim",
|
||||
"rev": "381900d932db058aa3236ba66cc9f45747c0df71",
|
||||
"rev": "f33bc99d0ed3ed691a58b3339decf4e1933c3f9e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "glepnir",
|
||||
"repo": "lspsaga.nvim",
|
||||
"rev": "381900d932db058aa3236ba66cc9f45747c0df71",
|
||||
"rev": "f33bc99d0ed3ed691a58b3339decf4e1933c3f9e",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
@ -98,68 +144,79 @@
|
|||
"original": {
|
||||
"owner": "arkav",
|
||||
"repo": "lualine-lsp-progress",
|
||||
"rev": "56842d097245a08d77912edf5f2a69ba29f275d7",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lualine-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1662921346,
|
||||
"narHash": "sha256-bGVozEoffFxjiLACTfnDGX11yIHGhLawQWn80Nbd6TM=",
|
||||
"lastModified": 1691046210,
|
||||
"narHash": "sha256-v8finXk+sLNaFMA7pSHhEu0WF5mhPYWHEKhl0IKBv8c=",
|
||||
"owner": "nvim-lualine",
|
||||
"repo": "lualine.nvim",
|
||||
"rev": "a52f078026b27694d2290e34efa61a6e4a690621",
|
||||
"rev": "45e27ca739c7be6c49e5496d14fcf45a303c3a63",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-lualine",
|
||||
"repo": "lualine.nvim",
|
||||
"rev": "a52f078026b27694d2290e34efa61a6e4a690621",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"luaship": {
|
||||
"luasnip": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663664003,
|
||||
"narHash": "sha256-56x4Eke/7Cdn4/8T0SM73WpDqBSFq1vFY5VdkNlUBwI=",
|
||||
"lastModified": 1695621384,
|
||||
"narHash": "sha256-5rr5F1PJMqKvIgGPqYx27Id0xW97lZZU1FoEA1rVfjI=",
|
||||
"owner": "L3MON4D3",
|
||||
"repo": "LuaSnip",
|
||||
"rev": "d36c063b7f6e701852f7880f1314656592a61b4f",
|
||||
"rev": "480b032f6708573334f4437d3f83307d143f1a72",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "L3MON4D3",
|
||||
"repo": "LuaSnip",
|
||||
"rev": "d36c063b7f6e701852f7880f1314656592a61b4f",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neoformat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1661997045,
|
||||
"narHash": "sha256-x+TDVvH0DgmCCjOjhbE2/YaxnjCd4fcPxuQD6bhwVNs=",
|
||||
"lastModified": 1695341413,
|
||||
"narHash": "sha256-b1IHXoRvQu4QCTR+A+KQAhj6wUD5jinjdkxu9w8ukyY=",
|
||||
"owner": "sbdchd",
|
||||
"repo": "neoformat",
|
||||
"rev": "0ae951121da29a157d80db70c32679b428afffdc",
|
||||
"rev": "aedb6f9d3f53d5da229095f7d761d749f8c5c7e0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sbdchd",
|
||||
"repo": "neoformat",
|
||||
"rev": "0ae951121da29a157d80db70c32679b428afffdc",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix2lua": {
|
||||
"locked": {
|
||||
"lastModified": 1709128456,
|
||||
"narHash": "sha256-tRduS+XFI6VceWPQzjkuvlyn/Oe5NsQUS/wyEC69dvk=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "f152767145e61fea96eddb1b550ab3f25701e0ad",
|
||||
"revCount": 18,
|
||||
"type": "git",
|
||||
"url": "https://git.pleshevski.ru/mynix/nix2lua"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.pleshevski.ru/mynix/nix2lua"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1663146586,
|
||||
"narHash": "sha256-VCGdyEc5TF0uq+gdU+jesjZcNxptomDunvGtElmAD9I=",
|
||||
"lastModified": 1701237617,
|
||||
"narHash": "sha256-Ryd8xpNDY9MJnBFDYhB37XSFIxCPVVVXAbInNPa95vs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "125efbd96af28ea5d60e00a3eed832ea3f49a93b",
|
||||
"rev": "85306ef2470ba705c97ce72741d56e42d0264015",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -169,99 +226,143 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nlsp-settings-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1692758329,
|
||||
"narHash": "sha256-Jj74rwBpqdXXykNuvJfESUOL+ntPLtzSSHqh2NcUzDo=",
|
||||
"owner": "tamago324",
|
||||
"repo": "nlsp-settings.nvim",
|
||||
"rev": "2a52e793d4f293c0e1d61ee5794e3ff62bfbbb5d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tamago324",
|
||||
"repo": "nlsp-settings.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-cmp": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663990701,
|
||||
"narHash": "sha256-gpkPMlOUMfTlef5WRFHLkmKEDZ9TRA/yRPqb6UXnKOA=",
|
||||
"lastModified": 1693063902,
|
||||
"narHash": "sha256-WGck3By9GhnBUmzLGi2wnKjDreQx5kBOmHCbC5BZhfo=",
|
||||
"owner": "hrsh7th",
|
||||
"repo": "nvim-cmp",
|
||||
"rev": "17a55b3d5498c617855d015bbcad0c872d10c879",
|
||||
"rev": "5dce1b778b85c717f6614e3f4da45e9f19f54435",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hrsh7th",
|
||||
"repo": "nvim-cmp",
|
||||
"rev": "17a55b3d5498c617855d015bbcad0c872d10c879",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-colorizer": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1591879145,
|
||||
"narHash": "sha256-6YrnItxExL2C8pNIdLd+hXCjsB2MbZANwWkah6dreD8=",
|
||||
"owner": "norcalli",
|
||||
"repo": "nvim-colorizer.lua",
|
||||
"rev": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "norcalli",
|
||||
"repo": "nvim-colorizer.lua",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-lspconfig": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663921594,
|
||||
"narHash": "sha256-uCFhwcR4oW+4wrSt6rx5G8k75dOLeqmYzW1G1CYlLkM=",
|
||||
"lastModified": 1695879754,
|
||||
"narHash": "sha256-eUyyB/P52AZz3rl2n9ntGIp3b0x0s/TF/fQZ/30UeC0=",
|
||||
"owner": "neovim",
|
||||
"repo": "nvim-lspconfig",
|
||||
"rev": "d4eb971db353ccf78cefb3be1b05483b69ec1e69",
|
||||
"rev": "c7077400d004c1a424d210af76ce198250db72fd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "neovim",
|
||||
"repo": "nvim-lspconfig",
|
||||
"rev": "d4eb971db353ccf78cefb3be1b05483b69ec1e69",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-orgmode": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1669843678,
|
||||
"narHash": "sha256-zut3orH6okjb9NLvpoQ/S0jDTKGEe41ULXOKjBPqYO0=",
|
||||
"owner": "nvim-orgmode",
|
||||
"repo": "orgmode",
|
||||
"rev": "fc9bb0f5823d01e4008e4b86663772d4148aa9ce",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-orgmode",
|
||||
"repo": "orgmode",
|
||||
"rev": "fc9bb0f5823d01e4008e4b86663772d4148aa9ce",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-tree-lua": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663823703,
|
||||
"narHash": "sha256-QY60TDUVmKcFzCAojReZEAbQcyEYgCG4nhgsx74OtVM=",
|
||||
"lastModified": 1695716495,
|
||||
"narHash": "sha256-Fkchn7UuIHPmVFFrx1kzsE2lviJrAFAe9tHu73HnS/w=",
|
||||
"owner": "kyazdani42",
|
||||
"repo": "nvim-tree.lua",
|
||||
"rev": "0417d9148b6546bf4883b6e9750f992f980afbfe",
|
||||
"rev": "934469b9b6df369e198fb3016969e56393b0dc07",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kyazdani42",
|
||||
"repo": "nvim-tree.lua",
|
||||
"rev": "0417d9148b6546bf4883b6e9750f992f980afbfe",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-treesitter": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1664008557,
|
||||
"narHash": "sha256-hZqZkXrIw9OfXLqioSqagmEPoIz8gcT+WpEhVURdeHw=",
|
||||
"owner": "nvim-treesitter",
|
||||
"repo": "nvim-treesitter",
|
||||
"rev": "a60aa7b2e1dd9219c6356f65ba48bdbd50090abd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-treesitter",
|
||||
"repo": "nvim-treesitter",
|
||||
"rev": "a60aa7b2e1dd9219c6356f65ba48bdbd50090abd",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-web-devicons": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663532214,
|
||||
"narHash": "sha256-e8FP68mEmPAEbk+rYEKKGi0ZTJHDCPxrulnivkzInXk=",
|
||||
"lastModified": 1695598844,
|
||||
"narHash": "sha256-k1oq5TBF0ZAfC1aihw/HLrvOHwZSX8ToDU3aZ3YXdzE=",
|
||||
"owner": "kyazdani42",
|
||||
"repo": "nvim-web-devicons",
|
||||
"rev": "969728506c0175644a1d448f55e311ccdada7eaf",
|
||||
"rev": "45d0237c427baba8cd05e0ab26d30e2ee58c2c82",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kyazdani42",
|
||||
"repo": "nvim-web-devicons",
|
||||
"rev": "969728506c0175644a1d448f55e311ccdada7eaf",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"org-bullets-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1679902360,
|
||||
"narHash": "sha256-x6S4WdgfUr7HGEHToSDy3pSHEwOPQalzWhBUipqMtnw=",
|
||||
"owner": "akinsho",
|
||||
"repo": "org-bullets.nvim",
|
||||
"rev": "6e0d60e901bb939eb526139cb1f8d59065132fd9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "akinsho",
|
||||
"repo": "org-bullets.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plenary-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663402373,
|
||||
"narHash": "sha256-d06QP5JGhpH6UUVF9STYzfJMzvg5HrJfDqlAoVXaLeM=",
|
||||
"lastModified": 1694526433,
|
||||
"narHash": "sha256-s3qsKf05X5W1VdZT1vYXGQNK0UaiI+umWUf06Spe4hw=",
|
||||
"owner": "nvim-lua",
|
||||
"repo": "plenary.nvim",
|
||||
"rev": "62dc2a7acd2fb2581871a36c1743b29e26c60390",
|
||||
"rev": "9ce85b0f7dcfe5358c0be937ad23e456907d410b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -274,107 +375,109 @@
|
|||
"inputs": {
|
||||
"cmp-luasnip": "cmp-luasnip",
|
||||
"cmp-nvim-lsp": "cmp-nvim-lsp",
|
||||
"cmp-tabby": "cmp-tabby",
|
||||
"editorconfig-nvim": "editorconfig-nvim",
|
||||
"flake-utils": "flake-utils",
|
||||
"gitsigns-nvim": "gitsigns-nvim",
|
||||
"hop-nvim": "hop-nvim",
|
||||
"lspsaga-nvim": "lspsaga-nvim",
|
||||
"lualine-lsp-progress": "lualine-lsp-progress",
|
||||
"lualine-nvim": "lualine-nvim",
|
||||
"luaship": "luaship",
|
||||
"luasnip": "luasnip",
|
||||
"neoformat": "neoformat",
|
||||
"nix2lua": "nix2lua",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nlsp-settings-nvim": "nlsp-settings-nvim",
|
||||
"nvim-cmp": "nvim-cmp",
|
||||
"nvim-colorizer": "nvim-colorizer",
|
||||
"nvim-lspconfig": "nvim-lspconfig",
|
||||
"nvim-orgmode": "nvim-orgmode",
|
||||
"nvim-tree-lua": "nvim-tree-lua",
|
||||
"nvim-treesitter": "nvim-treesitter",
|
||||
"nvim-web-devicons": "nvim-web-devicons",
|
||||
"org-bullets-nvim": "org-bullets-nvim",
|
||||
"plenary-nvim": "plenary-nvim",
|
||||
"tabby-nvim": "tabby-nvim",
|
||||
"telescope-live-grep-args-nvim": "telescope-live-grep-args-nvim",
|
||||
"telescope-nvim": "telescope-nvim",
|
||||
"theme": "theme",
|
||||
"utils": "utils"
|
||||
"theme": "theme"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tabby-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663040953,
|
||||
"narHash": "sha256-QmqRKFuukm4Vn531TEoejxX3yx0ofzymExOp9c9ybDg=",
|
||||
"lastModified": 1695278537,
|
||||
"narHash": "sha256-yzFOD1ERAcZx+PQmBC/aMhHTBUBCccOxRF3x0S6c9nM=",
|
||||
"owner": "nanozuki",
|
||||
"repo": "tabby.nvim",
|
||||
"rev": "916c9e56d043906a441cd9f905e2ca1f5c4dddb0",
|
||||
"rev": "9e537762cbb7647357eab22c61c7c5dda00138dd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nanozuki",
|
||||
"repo": "tabby.nvim",
|
||||
"rev": "916c9e56d043906a441cd9f905e2ca1f5c4dddb0",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"telescope-live-grep-args-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1661594012,
|
||||
"narHash": "sha256-T5j2qgoDtVkk1uCLjoNeyw4eTu6eLbTXQHUuvHs3Tls=",
|
||||
"lastModified": 1693245982,
|
||||
"narHash": "sha256-L2STMQude8DalHF4fYaJZNjvQHB1UtnQx8Gx2fPKcDA=",
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope-live-grep-args.nvim",
|
||||
"rev": "32b633b062d1168a2d18ad27994e5b4ef97f0a74",
|
||||
"rev": "851c0997d55601f2afd7290db0f90dc364e29f58",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope-live-grep-args.nvim",
|
||||
"rev": "32b633b062d1168a2d18ad27994e5b4ef97f0a74",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"telescope-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663402536,
|
||||
"narHash": "sha256-hIOg0rFAek9p6/k2USBAPQwIoVdSJ+Tw6A0jrup9xto=",
|
||||
"lastModified": 1695796462,
|
||||
"narHash": "sha256-ZNkDZLR3oHe/tkAOpWwN3CF5M+3xooYlUuBT2Hndauw=",
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope.nvim",
|
||||
"rev": "30e2dc5232d0dd63709ef8b44a5d6184005e8602",
|
||||
"rev": "84d53dfdbefbdf84e861a288abc71ef8ccafd04e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope.nvim",
|
||||
"rev": "30e2dc5232d0dd63709ef8b44a5d6184005e8602",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1663990749,
|
||||
"narHash": "sha256-EdmZ5qXY10jkYBgtd/qe23Ccl5qwFm3bwXNQIG8Qn5A=",
|
||||
"lastModified": 1695478950,
|
||||
"narHash": "sha256-SV5DTVwcVv6YIb7TGNYwq6rtIG5pFKubK07snXhV7z8=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nvim",
|
||||
"rev": "9ac18414f0446478024b19018d73b7ea14f6fc96",
|
||||
"rev": "3d9a5ed556e289bce6c1fb0af89ec838360641b2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "catppuccin",
|
||||
"repo": "nvim",
|
||||
"rev": "9ac18414f0446478024b19018d73b7ea14f6fc96",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
|
|
213
flake.nix
213
flake.nix
|
@ -1,7 +1,9 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
nix2lua.url = "git+https://git.pleshevski.ru/mynix/nix2lua";
|
||||
|
||||
# Plenary (required by crates-nvim)
|
||||
plenary-nvim = {
|
||||
|
@ -13,7 +15,7 @@
|
|||
|
||||
# https://github.com/gpanders/editorconfig.nvim
|
||||
editorconfig-nvim = {
|
||||
url = "github:gpanders/editorconfig.nvim?rev=7d10fe6bc340fd783c0b61cf627dd235100284db";
|
||||
url = "github:gpanders/editorconfig.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
|
@ -21,19 +23,19 @@
|
|||
|
||||
# https://github.com/kyazdani42/nvim-tree.lua
|
||||
nvim-tree-lua = {
|
||||
url = "github:kyazdani42/nvim-tree.lua?rev=0417d9148b6546bf4883b6e9750f992f980afbfe";
|
||||
url = "github:kyazdani42/nvim-tree.lua";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/nvim-telescope/telescope.nvim
|
||||
telescope-nvim = {
|
||||
url = "github:nvim-telescope/telescope.nvim?rev=30e2dc5232d0dd63709ef8b44a5d6184005e8602";
|
||||
url = "github:nvim-telescope/telescope.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/nvim-telescope/telescope-live-grep-args.nvim
|
||||
telescope-live-grep-args-nvim = {
|
||||
url = "github:nvim-telescope/telescope-live-grep-args.nvim?rev=32b633b062d1168a2d18ad27994e5b4ef97f0a74";
|
||||
url = "github:nvim-telescope/telescope-live-grep-args.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
|
@ -41,7 +43,7 @@
|
|||
|
||||
# https://github.com/sbdchd/neoformat
|
||||
neoformat = {
|
||||
url = "github:sbdchd/neoformat?rev=0ae951121da29a157d80db70c32679b428afffdc";
|
||||
url = "github:sbdchd/neoformat";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
|
@ -49,7 +51,7 @@
|
|||
|
||||
# https://github.com/lewis6991/gitsigns.nvim
|
||||
gitsigns-nvim = {
|
||||
url = "github:lewis6991/gitsigns.nvim?rev=f98c85e7c3d65a51f45863a34feb4849c82f240f";
|
||||
url = "github:lewis6991/gitsigns.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
|
@ -57,45 +59,43 @@
|
|||
|
||||
# https://github.com/neovim/nvim-lspconfig
|
||||
nvim-lspconfig = {
|
||||
url = "github:neovim/nvim-lspconfig?rev=d4eb971db353ccf78cefb3be1b05483b69ec1e69";
|
||||
url = "github:neovim/nvim-lspconfig";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/tamago324/nlsp-settings.nvim
|
||||
nlsp-settings-nvim = {
|
||||
url = "github:tamago324/nlsp-settings.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/glepnir/lspsaga.nvim
|
||||
lspsaga-nvim = {
|
||||
url = "github:glepnir/lspsaga.nvim?rev=381900d932db058aa3236ba66cc9f45747c0df71";
|
||||
url = "github:glepnir/lspsaga.nvim?rev=f33bc99d0ed3ed691a58b3339decf4e1933c3f9e";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/L3MON4D3/LuaSnip
|
||||
luaship = {
|
||||
url = "github:L3MON4D3/LuaSnip?rev=d36c063b7f6e701852f7880f1314656592a61b4f";
|
||||
luasnip = {
|
||||
url = "github:L3MON4D3/LuaSnip";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/hrsh7th/nvim-cmp
|
||||
nvim-cmp = {
|
||||
url = "github:hrsh7th/nvim-cmp?rev=17a55b3d5498c617855d015bbcad0c872d10c879";
|
||||
url = "github:hrsh7th/nvim-cmp";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/hrsh7th/cmp-nvim-lsp
|
||||
cmp-nvim-lsp = {
|
||||
url = "github:hrsh7th/cmp-nvim-lsp?rev=affe808a5c56b71630f17aa7c38e15c59fd648a8";
|
||||
url = "github:hrsh7th/cmp-nvim-lsp";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/saadparwaiz1/cmp_luasnip
|
||||
cmp-luasnip = {
|
||||
url = "github:saadparwaiz1/cmp_luasnip?rev=a9de941bcbda508d0a45d28ae366bb3f08db2e36";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# syntax
|
||||
|
||||
# https://github.com/nvim-treesitter/nvim-treesitter
|
||||
nvim-treesitter = {
|
||||
url = "github:nvim-treesitter/nvim-treesitter?rev=a60aa7b2e1dd9219c6356f65ba48bdbd50090abd";
|
||||
url = "github:saadparwaiz1/cmp_luasnip";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
|
@ -103,36 +103,68 @@
|
|||
|
||||
# https://github.com/nanozuki/tabby.nvim
|
||||
tabby-nvim = {
|
||||
url = "github:nanozuki/tabby.nvim?rev=916c9e56d043906a441cd9f905e2ca1f5c4dddb0";
|
||||
url = "github:nanozuki/tabby.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/nvim-lualine/lualine.nvim
|
||||
lualine-nvim = {
|
||||
url = "github:nvim-lualine/lualine.nvim?rev=a52f078026b27694d2290e34efa61a6e4a690621";
|
||||
url = "github:nvim-lualine/lualine.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/arkav/lualine-lsp-progress
|
||||
lualine-lsp-progress = {
|
||||
url = "github:/arkav/lualine-lsp-progress?rev=56842d097245a08d77912edf5f2a69ba29f275d7";
|
||||
url = "github:/arkav/lualine-lsp-progress";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/kyazdani42/nvim-web-devicons
|
||||
nvim-web-devicons = {
|
||||
url = "github:kyazdani42/nvim-web-devicons?rev=969728506c0175644a1d448f55e311ccdada7eaf";
|
||||
url = "github:kyazdani42/nvim-web-devicons";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/catppuccin/nvim
|
||||
theme = {
|
||||
url = "github:catppuccin/nvim?rev=9ac18414f0446478024b19018d73b7ea14f6fc96";
|
||||
url = "github:catppuccin/nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# ux
|
||||
|
||||
# https://github.com/phaazon/hop.nvim
|
||||
hop-nvim = {
|
||||
url = "github:phaazon/hop.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/nvim-orgmode/orgmode
|
||||
nvim-orgmode = {
|
||||
url = "github:nvim-orgmode/orgmode?rev=fc9bb0f5823d01e4008e4b86663772d4148aa9ce";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/akinsho/org-bullets.nvim
|
||||
org-bullets-nvim = {
|
||||
url = "github:akinsho/org-bullets.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/norcalli/nvim-colorizer.lua
|
||||
nvim-colorizer = {
|
||||
url = "github:norcalli/nvim-colorizer.lua";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# https://github.com/nzlov/cmp-tabby
|
||||
cmp-tabby = {
|
||||
url = "github:nzlov/cmp-tabby";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ { self, nixpkgs, utils, ... }:
|
||||
outputs = inputs @ { self, nixpkgs, flake-utils, nix2lua, ... }:
|
||||
let
|
||||
inputPlugins = [
|
||||
"plenary-nvim"
|
||||
|
@ -148,64 +180,149 @@
|
|||
"gitsigns-nvim"
|
||||
# lsp
|
||||
"nvim-lspconfig"
|
||||
"nlsp-settings-nvim"
|
||||
"lspsaga-nvim"
|
||||
"luaship"
|
||||
"luasnip"
|
||||
"nvim-cmp"
|
||||
"cmp-nvim-lsp"
|
||||
"cmp-luasnip"
|
||||
# syntax
|
||||
"nvim-treesitter"
|
||||
# theme
|
||||
"tabby-nvim"
|
||||
"lualine-nvim"
|
||||
"lualine-lsp-progress"
|
||||
"nvim-web-devicons"
|
||||
"theme"
|
||||
# ux
|
||||
"hop-nvim"
|
||||
"nvim-orgmode"
|
||||
"org-bullets-nvim"
|
||||
"nvim-colorizer"
|
||||
"cmp-tabby"
|
||||
];
|
||||
|
||||
mkNvimPlugins = { lib, vimUtils, vimPlugins, ... }:
|
||||
let
|
||||
inherit (builtins) getAttr;
|
||||
inherit (builtins) getAttr attrNames pathExists readDir;
|
||||
inherit (lib) listToAttrs nameValuePair;
|
||||
|
||||
buildPlugin = name: vimUtils.buildVimPluginFrom2Nix {
|
||||
buildPlugin = name: vimUtils.buildVimPlugin {
|
||||
name = name;
|
||||
src = getAttr name inputs;
|
||||
patches = lib.optional
|
||||
(pathExists ./patches/${name})
|
||||
(map
|
||||
(patchName: ./patches/${name}/${patchName})
|
||||
(attrNames (readDir ./patches/${name}))
|
||||
);
|
||||
};
|
||||
|
||||
buildPluginValuePair = n: nameValuePair n (buildPlugin n);
|
||||
|
||||
customPlugins = listToAttrs (map buildPluginValuePair inputPlugins);
|
||||
neovimPlugins = (listToAttrs (map buildPluginValuePair inputPlugins)) // {
|
||||
inherit (vimPlugins) nvim-treesitter;
|
||||
};
|
||||
in
|
||||
{ vimPlugins = vimPlugins // customPlugins; };
|
||||
{
|
||||
inherit neovimPlugins;
|
||||
inherit nix2lua;
|
||||
};
|
||||
|
||||
mkNeovim = pkgs: pkgs.callPackage ./neovim.nix (mkNvimPlugins pkgs);
|
||||
in
|
||||
{
|
||||
overlays = {
|
||||
default = final: prev: {
|
||||
myneovim = prev.callPackage ./. (mkNvimPlugins prev);
|
||||
myneovim = mkNeovim prev;
|
||||
};
|
||||
};
|
||||
} //
|
||||
utils.lib.eachDefaultSystem (system:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
inherit (builtins) mapAttrs;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
neovim = pkgs.callPackage ./. (mkNvimPlugins pkgs);
|
||||
in
|
||||
{
|
||||
apps.default = {
|
||||
type = "app";
|
||||
program = "${neovim}/bin/nvim";
|
||||
minimalNeovim = mkNeovim pkgs;
|
||||
|
||||
recommendedNeovim = (minimalNeovim.override {
|
||||
enableDevIcons = true;
|
||||
enableTabby = false;
|
||||
|
||||
plugins = with minimalNeovim.nix2lua; {
|
||||
nvimTree.settings = {
|
||||
renderer = {
|
||||
group_empty = true;
|
||||
full_name = true;
|
||||
};
|
||||
};
|
||||
lualine.settings = {
|
||||
options.ignore_focus = [ "NvimTree" ];
|
||||
sections = {
|
||||
lualine_a = [
|
||||
[ "filename" (mkNamedField "path" 1) ]
|
||||
];
|
||||
lualine_b = [ "branch" "diff" "diagnostics" ];
|
||||
lualine_c = [ "lsp_progress" ];
|
||||
lualine_x = [ "filesize" "filetype" ];
|
||||
lualine_y = [ "progress" ];
|
||||
lualine_z = [ "location" "mode" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
fullNeovim = recommendedNeovim.override {
|
||||
plugins = recommendedNeovim.plugins // (with minimalNeovim.nix2lua; {
|
||||
lspSaga.settings = {
|
||||
border_style = "rounded";
|
||||
symbol_in_winbar.enable = false;
|
||||
code_action_lightbulb.enable = false;
|
||||
code_action_keys = { quit = "<Esc>"; };
|
||||
definition_action_keys = { quit = "<Esc>"; };
|
||||
rename_action_quit = "<C-c>";
|
||||
};
|
||||
lspConfig = {
|
||||
servers = {
|
||||
nil_ls = { };
|
||||
tsserver = { };
|
||||
eslint = { };
|
||||
denols = {
|
||||
root_dir = mkLuaRaw "root_pattern(\"deno.json\", \"deno.jsonc\")";
|
||||
};
|
||||
rust_analyzer = {
|
||||
settings.rust-analyzer = {
|
||||
"server.path" = "rust-analyzer";
|
||||
"updates.prompt" = false;
|
||||
"updates.checkOnStartup" = false;
|
||||
"checkOnSave.enable" = true;
|
||||
"checkOnSave.command" = "clippy";
|
||||
"cargo.autoreload" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
tabbyml.enable = true;
|
||||
});
|
||||
};
|
||||
|
||||
packages.default = neovim;
|
||||
packages = {
|
||||
default = recommendedNeovim;
|
||||
recommended = recommendedNeovim;
|
||||
full = fullNeovim;
|
||||
minimal = minimalNeovim;
|
||||
};
|
||||
|
||||
mkApp = drv: {
|
||||
type = "app";
|
||||
program = "${drv}/bin/nvim";
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit packages;
|
||||
|
||||
apps = mapAttrs (name: mkApp) packages;
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = [
|
||||
(neovim.override {
|
||||
enableDevIcons = true;
|
||||
enableTabby = true;
|
||||
})
|
||||
pkgs.stylua # lua formatter
|
||||
];
|
||||
};
|
||||
|
|
10
lib.nix
10
lib.nix
|
@ -1,3 +1,5 @@
|
|||
{ lib, substituteAll, ... }:
|
||||
|
||||
let
|
||||
inherit (builtins) length elemAt isList isString hasAttr getAttr;
|
||||
|
||||
|
@ -47,9 +49,17 @@ let
|
|||
|
||||
mkLuaRc = contents: concatMap mkLuaHeredoc contents;
|
||||
|
||||
############################################################################
|
||||
# Configs
|
||||
|
||||
readSubFile = src: params: builtins.readFile
|
||||
(substituteAll (params // { inherit src; }));
|
||||
|
||||
in
|
||||
{
|
||||
inherit (lib) importJSON attrByPath;
|
||||
inherit foldr concatMap;
|
||||
inherit optional getAttrOpt;
|
||||
inherit mkLuaHeredoc mkLuaRc;
|
||||
inherit readSubFile substituteAll;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
{ enableDevIcons ? false
|
||||
, enableTabby ? false
|
||||
, enableOrgMode ? false
|
||||
, viAlias ? false
|
||||
, vimAlias ? false
|
||||
, extraConfig ? ""
|
||||
, extraLuaConfig ? ""
|
||||
, extraPlugins ? [ ]
|
||||
, theme ? { }
|
||||
, plugins ? { }
|
||||
, wrapNeovim
|
||||
, neovim-unwrapped
|
||||
, tree-sitter
|
||||
, neovimPlugins
|
||||
, lib
|
||||
, nix2lua
|
||||
, substituteAll
|
||||
, callPackage
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
plugins' = plugins;
|
||||
|
||||
mergeAttrs = v:
|
||||
if builtins.isList v then
|
||||
lib.foldl lib.recursiveUpdate { } (map mergeAttrs v)
|
||||
else if v ? _type then
|
||||
if v._type == "merge" then mergeAttrs v.contents
|
||||
else if v._type == "if" then lib.optionalAttrs v.condition v.content
|
||||
else builtins.abort "Unsupported attribute"
|
||||
else v;
|
||||
in
|
||||
let
|
||||
plugins = mergeAttrs plugins';
|
||||
inherit (builtins) catAttrs readFile;
|
||||
|
||||
myLib = import ./lib.nix { inherit lib substituteAll; } // {
|
||||
inherit (nix2lua.lib) toLua LuaNil;
|
||||
};
|
||||
|
||||
|
||||
pluginParams = neovimPlugins // {
|
||||
inherit tree-sitter plugins enableDevIcons enableTabby enableOrgMode;
|
||||
themeCfg = theme;
|
||||
lib = myLib;
|
||||
};
|
||||
|
||||
callPlugin = plugin: callPackage plugin pluginParams;
|
||||
callPlugins = list: map callPlugin list;
|
||||
|
||||
pluginsSettings = callPlugins [
|
||||
./plugins/config
|
||||
./plugins/syntax
|
||||
./plugins/git
|
||||
./plugins/explorer
|
||||
./plugins/theme
|
||||
./plugins/lsp
|
||||
./plugins/formatter
|
||||
./plugins/ux
|
||||
];
|
||||
|
||||
basePlugins = [ neovimPlugins.plenary-nvim ];
|
||||
customPlugins = catAttrs "plugins" pluginsSettings;
|
||||
allPlugins = basePlugins ++ customPlugins ++ extraPlugins;
|
||||
|
||||
basicConfigs = map readFile [ ./config/basic.lua ];
|
||||
pluginConfigs = catAttrs "luaConfig" pluginsSettings;
|
||||
allConfigs = basicConfigs ++ pluginConfigs ++ [ extraLuaConfig ];
|
||||
in
|
||||
(wrapNeovim neovim-unwrapped {
|
||||
inherit viAlias;
|
||||
inherit vimAlias;
|
||||
|
||||
withPython3 = false;
|
||||
withNodeJs = false;
|
||||
withRuby = false;
|
||||
|
||||
configure = {
|
||||
customRC = extraConfig + myLib.mkLuaRc allConfigs;
|
||||
|
||||
packages.myVimPackages = { start = allPlugins; };
|
||||
};
|
||||
}).overrideAttrs (oldAttrs: {
|
||||
passthru = oldAttrs.passthru // {
|
||||
nix2lua = nix2lua.lib;
|
||||
inherit plugins;
|
||||
};
|
||||
})
|
|
@ -0,0 +1,85 @@
|
|||
diff --git a/lua/orgmode/init.lua b/lua/orgmode/init.lua
|
||||
index 3b72f78..046a02e 100644
|
||||
--- a/lua/orgmode/init.lua
|
||||
+++ b/lua/orgmode/init.lua
|
||||
@@ -1,11 +1,9 @@
|
||||
_G.orgmode = _G.orgmode or {}
|
||||
-local ts_revision = '081179c52b3e8175af62b9b91dc099d010c38770'
|
||||
-local setup_ts_grammar_used = false
|
||||
local instance = nil
|
||||
|
||||
---@class Org
|
||||
---@field initialized boolean
|
||||
---@field files Files
|
||||
---@field agenda Agenda
|
||||
---@field capture Capture
|
||||
---@field clock Clock
|
||||
@@ -60,52 +58,21 @@ function Org:setup_autocmds()
|
||||
pattern = 'org',
|
||||
group = org_augroup,
|
||||
callback = function()
|
||||
require('orgmode').reload(vim.fn.expand('<afile>:p'))
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
---- @param revision string?
|
||||
-local function setup_ts_grammar(revision)
|
||||
- setup_ts_grammar_used = true
|
||||
- local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
|
||||
- parser_config.org = {
|
||||
- install_info = {
|
||||
- url = 'https://github.com/milisims/tree-sitter-org',
|
||||
- revision = revision or ts_revision,
|
||||
- files = { 'src/parser.c', 'src/scanner.cc' },
|
||||
- },
|
||||
- filetype = 'org',
|
||||
- }
|
||||
-end
|
||||
-
|
||||
-local function check_ts_grammar()
|
||||
- vim.defer_fn(function()
|
||||
- if setup_ts_grammar_used then
|
||||
- return
|
||||
- end
|
||||
- local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
|
||||
- if parser_config and parser_config.org and parser_config.org.install_info.revision ~= ts_revision then
|
||||
- require('orgmode.utils').echo_error({
|
||||
- 'You are using outdated version of tree-sitter grammar for Orgmode.',
|
||||
- 'To use latest version, replace current grammar installation with "require(\'orgmode\').setup_ts_grammar()" and run :TSUpdate org.',
|
||||
- 'More info in setup section of readme: https://github.com/nvim-orgmode/orgmode#setup',
|
||||
- })
|
||||
- end
|
||||
- end, 200)
|
||||
-end
|
||||
-
|
||||
---@param opts? table
|
||||
---@return Org
|
||||
local function setup(opts)
|
||||
opts = opts or {}
|
||||
instance = Org:new()
|
||||
- check_ts_grammar()
|
||||
local config = require('orgmode.config'):extend(opts)
|
||||
vim.defer_fn(function()
|
||||
if config.notifications.enabled and #vim.api.nvim_list_uis() > 0 then
|
||||
require('orgmode.parser.files').load(vim.schedule_wrap(function()
|
||||
instance.notifications = require('orgmode.notifications'):new():start_timer()
|
||||
end))
|
||||
end
|
||||
config:setup_mappings('global')
|
||||
@@ -187,15 +154,14 @@ end
|
||||
function _G.orgmode.statusline()
|
||||
if not instance or not instance.initialized then
|
||||
return ''
|
||||
end
|
||||
return instance.statusline_debounced() or ''
|
||||
end
|
||||
|
||||
return {
|
||||
- setup_ts_grammar = setup_ts_grammar,
|
||||
setup = setup,
|
||||
reload = reload,
|
||||
action = action,
|
||||
cron = cron,
|
||||
instance = get_instance,
|
||||
}
|
|
@ -1,8 +1,21 @@
|
|||
{ nvim-tree-lua, telescope-nvim, telescope-live-grep-args-nvim, ... }:
|
||||
{ lib
|
||||
, plugins ? { }
|
||||
, nvim-tree-lua
|
||||
, telescope-nvim
|
||||
, telescope-live-grep-args-nvim
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (builtins) readFile;
|
||||
|
||||
nvimTreeLuaSettings = lib.toLua (lib.attrByPath [ "nvimTree" "settings" ] { } plugins);
|
||||
telescopeSettings = lib.toLua (lib.attrByPath [ "telescope" "settings" ] { } plugins);
|
||||
in
|
||||
{
|
||||
luaConfig = (builtins.readFile ./nvim-tree.lua)
|
||||
+ (builtins.readFile ./telescope-nvim.lua);
|
||||
luaConfig =
|
||||
(readFile (lib.substituteAll { src = ./nvim-tree.lua; inherit nvimTreeLuaSettings; }))
|
||||
+ (readFile (lib.substituteAll { src = ./telescope-nvim.lua; inherit telescopeSettings; }));
|
||||
|
||||
plugins = [ nvim-tree-lua ]
|
||||
++ [ telescope-nvim telescope-live-grep-args-nvim ];
|
||||
|
|
|
@ -1,11 +1,26 @@
|
|||
-- See: https://github.com/kyazdani42/nvim-tree.lua/blob/master/doc/nvim-tree-lua.txt
|
||||
|
||||
-- disable netrw at the very start of your init.lua (strongly advised)
|
||||
vim.g.loaded = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- empty setup using defaults
|
||||
require("nvim-tree").setup()
|
||||
require("nvim-tree").setup(@nvimTreeLuaSettings@)
|
||||
|
||||
vim.keymap.set("n", "<leader>nt", "<Cmd>NvimTreeToggle<CR>")
|
||||
vim.keymap.set("n", "<leader>nf", "<Cmd>NvimTreeFindFile<CR>")
|
||||
|
||||
local function open_nvim_tree(data)
|
||||
-- buffer is a [No Name]
|
||||
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
||||
-- buffer is a directory
|
||||
local directory = vim.fn.isdirectory(data.file) == 1
|
||||
|
||||
if not no_name and not directory then
|
||||
return
|
||||
end
|
||||
|
||||
-- change to the directory
|
||||
if directory then
|
||||
vim.cmd.cd(data.file)
|
||||
end
|
||||
|
||||
-- open the tree
|
||||
require("nvim-tree.api").tree.open()
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
-- See: https://github.com/nvim-telescope/telescope.nvim
|
||||
local telescope = require("telescope")
|
||||
|
||||
telescope.setup({})
|
||||
telescope.setup(@telescopeSettings@)
|
||||
telescope.load_extension("live_grep_args")
|
||||
|
||||
vim.keymap.set("n", "<leader>ff", "<Cmd>Telescope find_files hidden=true<CR>")
|
||||
vim.keymap.set("n", "<leader>fb", "<Cmd>Telescope buffers<CR>")
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{ neoformat, ... }:
|
||||
|
||||
let
|
||||
inherit (builtins) readFile;
|
||||
in
|
||||
{
|
||||
luaConfig = builtins.readFile ./neoformat.lua;
|
||||
luaConfig = readFile ./neoformat.lua;
|
||||
|
||||
plugins = [ neoformat ];
|
||||
}
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
vim.g.neoformat_try_node_exe = 1
|
||||
vim.g.neoformat_only_msg_on_error = 1
|
||||
vim.g.neoformat_enabled_markdown = { "denofmt" }
|
||||
vim.g.neoformat_rust_rustfmt = {
|
||||
exe = "rustfmt",
|
||||
args = { "--edition 2021" },
|
||||
stdin = 1,
|
||||
}
|
||||
|
||||
vim.cmd([[
|
||||
aug fmt
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{ gitsigns-nvim, ... }:
|
||||
|
||||
let
|
||||
inherit (builtins) readFile;
|
||||
in
|
||||
{
|
||||
luaConfig = builtins.readFile ./gitsigns-nvim.lua;
|
||||
luaConfig = readFile ./gitsigns-nvim.lua;
|
||||
|
||||
plugins = [ gitsigns-nvim ];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
local tabby = require('cmp_tabby.config')
|
||||
|
||||
tabby:setup(@tabbymlSettings@)
|
|
@ -1,24 +1,49 @@
|
|||
{ nvim-lspconfig
|
||||
{ lib
|
||||
, plugins
|
||||
, nvim-lspconfig
|
||||
, nlsp-settings-nvim
|
||||
, lspsaga-nvim
|
||||
, luasnip
|
||||
, nvim-cmp
|
||||
, cmp-nvim-lsp
|
||||
, cmp_luasnip
|
||||
, cmp-luasnip
|
||||
, cmp-tabby
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
lsp = [ nvim-lspconfig lspsaga-nvim ];
|
||||
tabbymlEnable = lib.attrByPath [ "tabbyml" "enable" ] false plugins;
|
||||
tabbymlDefaultSettings = {
|
||||
host = "http://127.0.0.1:8080";
|
||||
max_lines = 100;
|
||||
};
|
||||
tabbymlSettings = lib.toLua (lib.attrByPath [ "tabbyml" "settings" ] tabbymlDefaultSettings plugins);
|
||||
tabbymlLuaConfig = lib.optional tabbymlEnable
|
||||
(lib.readSubFile ./cmp-tabby.lua { inherit tabbymlSettings; });
|
||||
|
||||
cmpSources = lib.toLua ([
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "luasnip"; }
|
||||
{ name = "orgmode"; }
|
||||
] ++ lib.optional tabbymlEnable [{ name = "cmp_tabby"; }]);
|
||||
cmpLuaConfig = lib.readSubFile ./nvim-cmp.lua { inherit cmpSources; };
|
||||
|
||||
lspconfigLuaConfig = lib.readSubFile ./lspconfig.lua
|
||||
{ inherit lspConfigServers lspSagaSettings; };
|
||||
|
||||
lsp = [ nvim-lspconfig nlsp-settings-nvim lspsaga-nvim ];
|
||||
snippets = [ luasnip ];
|
||||
completions = [
|
||||
nvim-cmp # Autocompletion
|
||||
cmp-nvim-lsp # LSP source for nvim-cmp
|
||||
cmp_luasnip # Snippets source for nvim-cmp
|
||||
];
|
||||
cmp-luasnip # Snippets source for nvim-cmp
|
||||
] ++ lib.optional tabbymlEnable [ cmp-tabby ];
|
||||
|
||||
lspConfigServers = lib.toLua (lib.attrByPath [ "lspConfig" "servers" ] [ ] plugins);
|
||||
lspSagaSettings = lib.toLua (lib.attrByPath [ "lspSaga" "settings" ] { } plugins);
|
||||
in
|
||||
{
|
||||
luaConfig = (builtins.readFile ./lspconfig.lua)
|
||||
+ (builtins.readFile ./nvim-cmp.lua);
|
||||
luaConfig = lspconfigLuaConfig + tabbymlLuaConfig + cmpLuaConfig;
|
||||
|
||||
plugins = lsp
|
||||
++ snippets
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
local lsp_config = require("lspconfig")
|
||||
local saga = require("lspsaga")
|
||||
local nlsp_settings = require("nlspsettings")
|
||||
|
||||
-- See: https://github.com/glepnir/lspsaga.nvim#configuration
|
||||
saga.init_lsp_saga({
|
||||
border_style = "rounded",
|
||||
code_action_lightbulb = { enable = false },
|
||||
code_action_keys = { quit = "<Esc>" },
|
||||
definition_action_keys = { quit = "<Esc>" },
|
||||
rename_action_quit = "<Esc>",
|
||||
symbol_in_winbar = { enable = false },
|
||||
})
|
||||
saga.init_lsp_saga(@lspSagaSettings@)
|
||||
|
||||
-- always show signcolumns
|
||||
vim.opt.signcolumn = "yes"
|
||||
|
@ -53,37 +47,35 @@ local on_attach = function(client, bufnr)
|
|||
end
|
||||
|
||||
-- nvim-cmp
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
-- for local configurations
|
||||
nlsp_settings.setup({})
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- See: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
--
|
||||
|
||||
vim.g.markdown_fenced_languages = { "ts=typescript" }
|
||||
|
||||
-- Override the default configuration to be applied to all servers
|
||||
lsp_config.util.default_config = vim.tbl_extend("force", lsp_config.util.default_config, {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- nix
|
||||
lsp_config.nil_ls.setup({})
|
||||
local root_pattern = lsp_config.util.root_pattern
|
||||
|
||||
-- js,ts
|
||||
lsp_config.tsserver.setup({})
|
||||
lsp_config.eslint.setup({})
|
||||
for name, settings in pairs(@lspConfigServers@) do
|
||||
lsp_config[name].setup(settings)
|
||||
|
||||
if name == "eslint" then
|
||||
vim.cmd([[
|
||||
aug eslint_fix
|
||||
au!
|
||||
au BufWritePre *.tsx,*.ts,*.jsx,*.js silent! EslintFixAll
|
||||
aug END
|
||||
]])
|
||||
end
|
||||
end
|
||||
|
||||
-- rust
|
||||
lsp_config.rust_analyzer.setup({
|
||||
-- Server-specific settings...
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
["server.path"] = "rust-analyzer",
|
||||
["updates.prompt"] = false,
|
||||
["updates.checkOnStartup"] = false,
|
||||
["checkOnSave.enable"] = true,
|
||||
["checkOnSave.command"] = "clippy",
|
||||
["cargo.autoreload"] = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -10,8 +10,8 @@ cmp.setup({
|
|||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
|
@ -36,8 +36,5 @@ cmp.setup({
|
|||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
},
|
||||
sources = cmp.config.sources(@cmpSources@),
|
||||
})
|
||||
|
|
|
@ -1,35 +1,184 @@
|
|||
{ tree-sitter, ... }:
|
||||
|
||||
{ nvim-treesitter, ... }:
|
||||
{ runCommand
|
||||
, fetchFromGitea
|
||||
, ...
|
||||
} @ inputs:
|
||||
|
||||
|
||||
let
|
||||
treesitterGrammars = tree-sitter.withPlugins
|
||||
(grammars: with grammars; [
|
||||
tree-sitter-nix
|
||||
tree-sitter-lua
|
||||
tree-sitter-ledger
|
||||
tree-sitter-yaml
|
||||
tree-sitter-json
|
||||
tree-sitter-typescript
|
||||
tree-sitter-javascript
|
||||
tree-sitter-rust
|
||||
tree-sitter-haskell
|
||||
tree-sitter-bash
|
||||
]);
|
||||
inherit (builtins) readFile;
|
||||
|
||||
nvim-treesitter-with-grammars = nvim-treesitter.overrideAttrs (oldAttrs: {
|
||||
extraGrammars = {
|
||||
tree-sitter-d2 = {
|
||||
language = "d2";
|
||||
version = "2023-06-21";
|
||||
src = fetchFromGitea {
|
||||
domain = "git.pleshevski.ru";
|
||||
owner = "pleshevskiy";
|
||||
repo = "tree-sitter-d2";
|
||||
rev = "8a9d50043d58eedf1e375b0e2059e43efd856902";
|
||||
sha256 = "sha256-ZhVjxo7Xi7DaHN3qabUcykflY74bUqPcOA410fA3zRk=";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
tree-sitter = (inputs.tree-sitter.override { inherit extraGrammars; });
|
||||
customGrammars = tree-sitter.withPlugins (g: [ g.tree-sitter-d2 ]);
|
||||
|
||||
nvim-treesitter = (inputs.nvim-treesitter.withPlugins (g: [
|
||||
# g.agda
|
||||
# g.arduino
|
||||
# g.astro
|
||||
g.awk
|
||||
g.bash
|
||||
# g.beancount
|
||||
# g.bibtex
|
||||
# g.blueprint
|
||||
# g.c
|
||||
# g.c_sharp
|
||||
# g.clojure
|
||||
g.cmake
|
||||
g.comment
|
||||
g.commonlisp
|
||||
# g.cooklang
|
||||
# g.cpp
|
||||
g.css
|
||||
# g.cuda
|
||||
# g.d
|
||||
# g.d2
|
||||
# g.dart
|
||||
# g.devicetree
|
||||
g.diff
|
||||
g.dockerfile
|
||||
# g.dot
|
||||
# g.eex
|
||||
# g.elixir
|
||||
g.elm
|
||||
# g.elvish
|
||||
g.embedded_template
|
||||
# g.erlang
|
||||
# g.fennel
|
||||
# g.fish
|
||||
# g.foam
|
||||
# g.fortran
|
||||
# g.fusion
|
||||
# g.gdscript
|
||||
g.git_rebase
|
||||
g.gitattributes
|
||||
g.gitignore
|
||||
# g.gleam
|
||||
# g.glimmer
|
||||
# g.glsl
|
||||
# g.go
|
||||
# g.godot_resource
|
||||
# g.gomod
|
||||
# g.gowork
|
||||
g.graphql
|
||||
# g.hack
|
||||
g.haskell
|
||||
# g.hcl
|
||||
# g.heex
|
||||
# g.hjson
|
||||
# g.hlsl
|
||||
# g.hocon
|
||||
g.html
|
||||
g.http
|
||||
# g.java
|
||||
g.javascript
|
||||
g.jq
|
||||
g.jsdoc
|
||||
g.json
|
||||
g.json5
|
||||
g.jsonc
|
||||
# g.jsonnet
|
||||
# g.julia
|
||||
# g.kotlin
|
||||
# g.lalrpop
|
||||
# g.latex
|
||||
g.ledger
|
||||
# g.llvm
|
||||
g.lua
|
||||
# g.m68k
|
||||
g.make
|
||||
g.markdown
|
||||
g.markdown_inline
|
||||
# g.menhir
|
||||
# g.meson
|
||||
g.nickel
|
||||
# g.ninja
|
||||
g.nix
|
||||
# g.norg
|
||||
# g.ocaml
|
||||
# g.ocaml_interface
|
||||
# g.ocamllex
|
||||
g.org
|
||||
# g.pascal
|
||||
# g.perl
|
||||
# g.php
|
||||
# g.phpdoc
|
||||
# g.pioasm
|
||||
# g.prisma
|
||||
# g.proto
|
||||
g.pug
|
||||
g.python
|
||||
# g.ql
|
||||
# g.qmljs
|
||||
g.query
|
||||
# g.r
|
||||
# g.racket
|
||||
# g.rasi
|
||||
g.regex
|
||||
# g.rego
|
||||
# g.rnoweb
|
||||
# g.rst
|
||||
# g.ruby
|
||||
g.rust
|
||||
# g.scala
|
||||
g.scheme
|
||||
g.scss
|
||||
# g.slint
|
||||
# g.solidity
|
||||
# g.sparql
|
||||
g.sql
|
||||
# g.supercollider
|
||||
# g.surface
|
||||
# g.svelte
|
||||
# g.swift
|
||||
# g.sxhkdrc
|
||||
# g.teal
|
||||
# g.tiger
|
||||
# g.tlaplus
|
||||
g.todotxt
|
||||
g.toml
|
||||
g.tsx
|
||||
# g.turtle
|
||||
# g.twig
|
||||
g.typescript
|
||||
# g.v
|
||||
# g.vala
|
||||
# g.verilog
|
||||
# g.vhs
|
||||
g.vim
|
||||
g.vue
|
||||
# g.wgsl
|
||||
g.yaml
|
||||
# g.yang
|
||||
# g.zig
|
||||
])).overrideAttrs (oldAttrs: {
|
||||
passthru.dependencies = oldAttrs.passthru.dependencies ++ [
|
||||
(runCommand "nvim-treesitter-d2-grammar" { } ''
|
||||
mkdir -p $out/parser
|
||||
ln -s ${customGrammars}/d2.so $out/parser/d2.so
|
||||
'')
|
||||
];
|
||||
postPatch = ''
|
||||
rm -r parser
|
||||
ln -s ${treesitterGrammars} parser
|
||||
ln -s ${extraGrammars.tree-sitter-d2.src}/queries queries/d2
|
||||
'';
|
||||
});
|
||||
|
||||
in
|
||||
{
|
||||
luaConfig = builtins.readFile ./treesitter.lua;
|
||||
luaConfig = readFile ./treesitter.lua;
|
||||
|
||||
plugins = [
|
||||
nvim-treesitter-with-grammars
|
||||
nvim-treesitter
|
||||
];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"url": "https://github.com/milisims/tree-sitter-org",
|
||||
"rev": "081179c52b3e8175af62b9b91dc099d010c38770",
|
||||
"date": "2022-10-21T23:23:29-04:00",
|
||||
"path": "/nix/store/7jy3jqyd02kryfgz16k3zxg2kmjz0wqf-tree-sitter-org",
|
||||
"sha256": "0h9krbaq9j6ijf86sg0w221s0zbpbx5f7m1l0whzjahbrqpnqgxl",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
|
@ -1,3 +1,6 @@
|
|||
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||
parser_config.d2 = {}
|
||||
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {},
|
||||
sync_install = false,
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
{ enableDevIcons ? false
|
||||
, enableTabby ? false
|
||||
, theme ? { }
|
||||
}:
|
||||
|
||||
{ lib
|
||||
, plugins
|
||||
, theme
|
||||
, lualine-nvim
|
||||
, lualine-lsp-progress
|
||||
, nvim-web-devicons
|
||||
, tabby-nvim
|
||||
, enableDevIcons ? false
|
||||
, enableTabby ? false
|
||||
, themeCfg ? { }
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (builtins) readFile isString;
|
||||
inherit (builtins) readFile;
|
||||
|
||||
themeFlavour = if isString (lib.getAttrOpt "flavour" theme) then theme.flavour else "frappe";
|
||||
themeConfig = if isString (lib.getAttrOpt "config" theme) then theme.config else ''
|
||||
themeFlavour = if themeCfg ? flavour then theme.flavour else "frappe";
|
||||
themeConfig = if themeCfg ? config then theme.config else ''
|
||||
vim.g.catppuccin_flavour = "${themeFlavour}"
|
||||
require("catppuccin").setup()
|
||||
vim.cmd([[colorscheme catppuccin]])
|
||||
'';
|
||||
|
||||
lualineSettings = lib.toLua (lib.attrByPath [ "lualine" "settings" ] { } plugins);
|
||||
lualinePlugins = [ lualine-nvim lualine-lsp-progress ];
|
||||
in
|
||||
{
|
||||
luaConfig = themeConfig
|
||||
+ (readFile ./lualine.lua)
|
||||
+ (readFile (lib.substituteAll { src = ./lualine.lua; inherit lualineSettings; }))
|
||||
+ (lib.optional enableTabby (readFile ./tabby-nvim.lua));
|
||||
|
||||
plugins = [ theme ]
|
||||
|
|
|
@ -1,16 +1,2 @@
|
|||
-- See: https://github.com/nvim-lualine/lualine.nvim#default-configuration
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
ignore_focus = { "NvimTree" },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{ "filename", path = 1 },
|
||||
},
|
||||
lualine_b = { "branch", "diff", "diagnostics" },
|
||||
lualine_c = { "lsp_progress" },
|
||||
lualine_x = { "filesize", "filetype" },
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location", "mode" },
|
||||
},
|
||||
})
|
||||
require("lualine").setup(@lualineSettings@)
|
||||
|
|
|
@ -1,7 +1,32 @@
|
|||
{ hop-nvim, ... }:
|
||||
{ lib
|
||||
, plugins
|
||||
, hop-nvim
|
||||
, nvim-orgmode
|
||||
, nvim-colorizer
|
||||
, org-bullets-nvim
|
||||
, enableOrgMode ? false
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (builtins) readFile;
|
||||
|
||||
hopLuaConfig = readFile ./hop-nvim.lua;
|
||||
|
||||
orgmodeEnable = lib.attrByPath [ "orgmode" "enable" ] enableOrgMode plugins;
|
||||
orgmodeSettings = lib.toLua (lib.attrByPath [ "orgmode" "settings" ] { } plugins);
|
||||
orgmodeLuaConfig = lib.optional orgmodeEnable
|
||||
(lib.readSubFile ./nvim-orgmode.lua { inherit orgmodeSettings; });
|
||||
|
||||
colorizerFiletypes = lib.toLua (lib.attrByPath [ "colorizer" "filetypes" ] lib.LuaNil plugins);
|
||||
colorizerSettings = lib.toLua (lib.attrByPath [ "colorizer" "settings" ] lib.LuaNil plugins);
|
||||
colorizerLuaConfig = lib.readSubFile ./nvim-colorizer.lua
|
||||
{ inherit colorizerFiletypes colorizerSettings; };
|
||||
|
||||
in
|
||||
{
|
||||
luaConfig = builtins.readFile ./hop-nvim.lua;
|
||||
luaConfig = hopLuaConfig + orgmodeLuaConfig + colorizerLuaConfig;
|
||||
|
||||
plugins = [ hop-nvim ];
|
||||
plugins = [ hop-nvim nvim-colorizer ]
|
||||
++ lib.optional orgmodeEnable [ nvim-orgmode org-bullets-nvim ];
|
||||
}
|
||||
|
|
|
@ -7,35 +7,61 @@ require("hop").setup({})
|
|||
|
||||
local hint = require("hop.hint")
|
||||
|
||||
vim.keymap.set("", "<leader>hf", function()
|
||||
vim.keymap.set("", "<leader>hc", "<Cmd>HopChar1<CR>")
|
||||
vim.keymap.set("", "<leader>hlc", function()
|
||||
hop.hint_char1({
|
||||
direction = hint.HintDirection.AFTER_CURSOR,
|
||||
current_line_only = true,
|
||||
})
|
||||
end)
|
||||
vim.keymap.set("", "<leader>hF", function()
|
||||
vim.keymap.set("", "<leader>hhc", function()
|
||||
hop.hint_char1({
|
||||
direction = hint.HintDirection.BEFORE_CURSOR,
|
||||
current_line_only = true,
|
||||
})
|
||||
end)
|
||||
vim.keymap.set("", "<leader>ht", function()
|
||||
vim.keymap.set("", "<leader>hjc", function()
|
||||
hop.hint_char1({
|
||||
direction = hint.HintDirection.AFTER_CURSOR,
|
||||
current_line_only = true,
|
||||
hint_offset = -1,
|
||||
})
|
||||
end)
|
||||
vim.keymap.set("", "<leader>hT", function()
|
||||
vim.keymap.set("", "<leader>hkc", function()
|
||||
hop.hint_char1({
|
||||
direction = hint.HintDirection.BEFORE_CURSOR,
|
||||
current_line_only = true,
|
||||
hint_offset = 1,
|
||||
})
|
||||
end)
|
||||
|
||||
vim.keymap.set("", "<leader>hc", "<Cmd>HopChar1<CR>")
|
||||
vim.keymap.set("", "<leader>hw", "<Cmd>HopWord<CR>")
|
||||
vim.keymap.set("", "<leader>hjw", function()
|
||||
hop.hint_words({
|
||||
direction = hint.HintDirection.AFTER_CURSOR,
|
||||
})
|
||||
end)
|
||||
vim.keymap.set("", "<leader>hkw", function()
|
||||
hop.hint_words({
|
||||
direction = hint.HintDirection.BEFORE_CURSOR,
|
||||
})
|
||||
end)
|
||||
|
||||
vim.keymap.set("", "<leader>hp", "<Cmd>HopPattern<CR>")
|
||||
vim.keymap.set("", "<leader>hl", "<Cmd>HopLine<CR>")
|
||||
vim.keymap.set("", "<leader>hv", "<Cmd>HopVertical<CR>")
|
||||
vim.keymap.set("", "<leader>hjp", function()
|
||||
hop.hint_patterns({
|
||||
direction = hint.HintDirection.AFTER_CURSOR,
|
||||
})
|
||||
end)
|
||||
vim.keymap.set("", "<leader>hkp", function()
|
||||
hop.hint_patterns({
|
||||
direction = hint.HintDirection.BEFORE_CURSOR,
|
||||
})
|
||||
end)
|
||||
|
||||
vim.keymap.set("", "<leader>hjv", function()
|
||||
hop.hint_vertical({
|
||||
direction = hint.HintDirection.AFTER_CURSOR,
|
||||
})
|
||||
end)
|
||||
vim.keymap.set("", "<leader>hkv", function()
|
||||
hop.hint_vertical({
|
||||
direction = hint.HintDirection.BEFORE_CURSOR,
|
||||
})
|
||||
end)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
require("colorizer").setup(@colorizerFiletypes@, @colorizerSettings@)
|
|
@ -0,0 +1,3 @@
|
|||
require("orgmode").setup(@orgmodeSettings@)
|
||||
|
||||
require("org-bullets").setup()
|
Reference in New Issue