mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +00:00
commit
81779e59b5
141 changed files with 2499 additions and 1499 deletions
343
flake.lock
343
flake.lock
|
@ -3,11 +3,11 @@
|
|||
"alpha-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676565390,
|
||||
"narHash": "sha256-p4yLMgLUA0yzOlABVatrcPKTrKoJBHxC9scXGWbUYxE=",
|
||||
"lastModified": 1677109657,
|
||||
"narHash": "sha256-DkUs2570WKxY1cG+spZWvCCNYhCTTp6uSCsj9i8yXxw=",
|
||||
"owner": "goolord",
|
||||
"repo": "alpha-nvim",
|
||||
"rev": "b3eef69e95674905bf26c7740dd4bbb09b355494",
|
||||
"rev": "b6c7b5d9d6d2633722255abf2be3ecb8733e8d2d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -35,11 +35,11 @@
|
|||
"catppuccin": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676603815,
|
||||
"narHash": "sha256-50K4S8adyhD64jCGLFE/FCdo1SCeqZbkG2OrtgUp9UE=",
|
||||
"lastModified": 1677516778,
|
||||
"narHash": "sha256-3knbj1w+i9b3Pi0mBS3tgjj82C4JQp4ZfhFh4qPfG2Y=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nvim",
|
||||
"rev": "60f8f40df0db92b5715642b3ea7074380c4b7995",
|
||||
"rev": "7c392fb5f27daa6addee050f7b7522718e8d9357",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -195,11 +195,11 @@
|
|||
"colorizer": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1674354831,
|
||||
"narHash": "sha256-JbAjfoPUfLQ7ijRh8kank4iSZLOcxPJKt/uOTJap8/A=",
|
||||
"lastModified": 1677384277,
|
||||
"narHash": "sha256-pvXbfvGRLqLVHCAXs3AAKLPb4xfeFcjy14kMFFHCObE=",
|
||||
"owner": "uga-rosa",
|
||||
"repo": "ccc.nvim",
|
||||
"rev": "be0a8122fd77efb7b6a0d672bab10417e68fab8b",
|
||||
"rev": "9738eb1d47bdb5d808f1c427e1c2db3dadae00b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -227,11 +227,11 @@
|
|||
"copilot-lua": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676663591,
|
||||
"narHash": "sha256-RO93/7L/vR1EHjeEv0o6mpnDD6aCsu5CX6CRYdDf9ok=",
|
||||
"lastModified": 1677479736,
|
||||
"narHash": "sha256-n/SCrzzzL5WUHJk0sCXbgGusk/dQuy8DI9Pqdh+lVeQ=",
|
||||
"owner": "zbirenbaum",
|
||||
"repo": "copilot.lua",
|
||||
"rev": "5304ea7079f38df200f4357401f1510fd00560a8",
|
||||
"rev": "b41d4c9c7d4f5e0272bcf94061b88e244904c56f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -243,11 +243,11 @@
|
|||
"crates-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676072696,
|
||||
"narHash": "sha256-e30Ir+Kd0EuvGoqORLtIA3aloL9djuebZYkBssWA0L8=",
|
||||
"lastModified": 1677075483,
|
||||
"narHash": "sha256-xarbPUL3yFMOn5Bse+syw1vLxqA/krS3tbuu/baup/k=",
|
||||
"owner": "Saecki",
|
||||
"repo": "crates.nvim",
|
||||
"rev": "3fc7ddac13ddf65914a733ef074317c4c72ef05b",
|
||||
"rev": "c33aae75745877ee1ef16f5781478f4f2f120623",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -259,11 +259,11 @@
|
|||
"dashboard-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676532963,
|
||||
"narHash": "sha256-0nPYwQ+NVEWBqmSHdpjj4aaX+OZiAXBuzdZUNIRg4uk=",
|
||||
"lastModified": 1677391173,
|
||||
"narHash": "sha256-a9+XhUwN3yGwFX+kq22VJxrU06Emjen7Y7pQsF5K8tY=",
|
||||
"owner": "glepnir",
|
||||
"repo": "dashboard-nvim",
|
||||
"rev": "2312a5024748e869a355d91170f2e8fbf2bd5a51",
|
||||
"rev": "398ba8d9390c13c87a964cbca756319531fffdb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -292,11 +292,11 @@
|
|||
"dressing-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1675626245,
|
||||
"narHash": "sha256-tBO21/0rpil2lItFl9UzALXNJbvmSfQuW+LOGet9YgI=",
|
||||
"lastModified": 1677218794,
|
||||
"narHash": "sha256-89HwP+zxMN5CPPN3dd3yMfCB07mtBhv6lcWuEWnedfw=",
|
||||
"owner": "stevearc",
|
||||
"repo": "dressing.nvim",
|
||||
"rev": "db716a0f1279f79a886c0e0b6ab3c3d5ffdb42fe",
|
||||
"rev": "5f44f829481640be0f96759c965ae22a3bcaf7ce",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -305,6 +305,54 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fidget-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676661245,
|
||||
"narHash": "sha256-f49AwromG0rHZ5i1q4i6GJgLNtusa8QpciljL0dgSJo=",
|
||||
"owner": "j-hui",
|
||||
"repo": "fidget.nvim",
|
||||
"rev": "688b4fec4517650e29c3e63cfbb6e498b3112ba1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "j-hui",
|
||||
"repo": "fidget.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
|
@ -338,14 +386,44 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"gesture-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1675384642,
|
||||
"narHash": "sha256-HxVWZopV3wx6ANefuowrdbSQpQriYHV43r187t7UJXQ=",
|
||||
"lastModified": 1677239871,
|
||||
"narHash": "sha256-hc0nFK7cC4A8kttQ4BrSDzeFlQyHUHWOo0MgT7ayoJU=",
|
||||
"owner": "notomo",
|
||||
"repo": "gesture.nvim",
|
||||
"rev": "902a97219e126a08aea6016994c50eea485bcd79",
|
||||
"rev": "b1024dbe2ee4dd5f7bc6293e3d6f2898e793594c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -405,11 +483,11 @@
|
|||
"indent-blankline": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1674709281,
|
||||
"narHash": "sha256-EZ5h4Gj942L9MaykWAprjLb/ZYr2JptQi16Ym5SyWfw=",
|
||||
"lastModified": 1676854912,
|
||||
"narHash": "sha256-dBm0vnza+fBYxlgUDR1/57GZ+kd7CUVgkQIcZEFWl9k=",
|
||||
"owner": "lukas-reineke",
|
||||
"repo": "indent-blankline.nvim",
|
||||
"rev": "8299fe7703dfff4b1752aeed271c3b95281a952d",
|
||||
"rev": "018bd04d80c9a73d399c1061fa0c3b14a7614399",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -551,6 +629,50 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neovim-flake": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"neovim-nightly-overlay",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"dir": "contrib",
|
||||
"lastModified": 1677463842,
|
||||
"narHash": "sha256-MgUEDPza573qKV59nRqrykLblPKBZu+DAIUqg9Pl5wU=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "2c9fbe34b20266ef5ab54f6ed14fb38eef60430d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "contrib",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neovim-nightly-overlay": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"neovim-flake": "neovim-flake",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1677485761,
|
||||
"narHash": "sha256-C04OWgNrCxPGUiT7Px/vZd42vfwRY6/EjHwHNUSHv7g=",
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"rev": "aad4d8be05012055861b097b8019311fe62635bf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nil": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
|
@ -562,11 +684,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1676390054,
|
||||
"narHash": "sha256-w0KvrM+9WIEYr0juDh4Vs39ed2IaT0T696fp9pZ7i1I=",
|
||||
"lastModified": 1677436111,
|
||||
"narHash": "sha256-m3nz83arjowVttdaHXqZukN+sMFuIRviFSSARpUByhk=",
|
||||
"owner": "oxalica",
|
||||
"repo": "nil",
|
||||
"rev": "944d5c335531778a1d7b54a97bf7fb5ec0c3e976",
|
||||
"rev": "6723d2982d33e9d698ae5c3b0cfcccd9292b4eff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -577,11 +699,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1676549890,
|
||||
"narHash": "sha256-sq/WcOEAl7gWrrfGkWdnyYazRyTf+enEim/o6LOQzI8=",
|
||||
"lastModified": 1677383253,
|
||||
"narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8c66bd1b68f4708c90dcc97c6f7052a5a7b33257",
|
||||
"rev": "9952d6bc395f5841262b006fbace8dd7e143b634",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -610,6 +732,22 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1677468890,
|
||||
"narHash": "sha256-V4MPvt4PKaHSInRLWpaF8ICdC91SH+5bdd0FGxalJIg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3f19c04354dec3903f614eae09327a04d297835d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1656753965,
|
||||
"narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=",
|
||||
|
@ -625,7 +763,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1655400192,
|
||||
"narHash": "sha256-49OBVVRgb9H/PSmNT9W61+NRdDbuSJVuDDflwXlaUKU=",
|
||||
|
@ -641,6 +779,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1661151577,
|
||||
"narHash": "sha256-++S0TuJtuz9IpqP8rKktWyHZKpgdyrzDFUXVY07MTRI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "54060e816971276da05970a983487a25810c38a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nmd": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -676,11 +830,11 @@
|
|||
"nui-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1675269986,
|
||||
"narHash": "sha256-4vf+eqT7e638VeWfmh23K8EslJXyR6ZK6arvaeVgWlw=",
|
||||
"lastModified": 1677566469,
|
||||
"narHash": "sha256-xHpNGJ8ikTMiWHAtqaZg5IVKSngH/k0LN7WaOHl2iz8=",
|
||||
"owner": "MunifTanjim",
|
||||
"repo": "nui.nvim",
|
||||
"rev": "d147222a1300901656f3ebd5b95f91732785a329",
|
||||
"rev": "0dc148c6ec06577fcf06cbab3b7dac96d48ba6be",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -692,11 +846,11 @@
|
|||
"null-ls": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676570563,
|
||||
"narHash": "sha256-Ez6tMCY3XZyNKNvZru/5YpebvnGZjDs5KbWVt5ycMpI=",
|
||||
"lastModified": 1676936752,
|
||||
"narHash": "sha256-uGyXBh1SpNpOkUlZpQ0RWRTMW6x3uhg4x07hmjkpSro=",
|
||||
"owner": "jose-elias-alvarez",
|
||||
"repo": "null-ls.nvim",
|
||||
"rev": "a82aa08c0063843926947f3688b0e61fd71db680",
|
||||
"rev": "689cdd78f70af20a37b5309ebc287ac645ae4f76",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -708,11 +862,11 @@
|
|||
"nvim-autopairs": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676622615,
|
||||
"narHash": "sha256-wKO4uCMZW0ec35BS8Y9kfz3RJr6As8/Om3TuILGptSs=",
|
||||
"lastModified": 1677213588,
|
||||
"narHash": "sha256-6XVJQnXgvD/TasbXrZkF6hNzgqMG35VYRPcMWDE2qEU=",
|
||||
"owner": "windwp",
|
||||
"repo": "nvim-autopairs",
|
||||
"rev": "bde7a1b4534e0a4c2451a738379cd628ba65eba7",
|
||||
"rev": "6a5faeabdbcc86cfbf1561ae430a451a72126e81",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -741,11 +895,11 @@
|
|||
"nvim-cmp": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676555588,
|
||||
"narHash": "sha256-VnPhbkhoYcPKt30D4GmAeEa+w7tbxswOcUbwdmIwQBQ=",
|
||||
"lastModified": 1677479977,
|
||||
"narHash": "sha256-cFX19DqWSwkki8TDfEBca1EV81PIPTx92rCpNUslaL8=",
|
||||
"owner": "hrsh7th",
|
||||
"repo": "nvim-cmp",
|
||||
"rev": "ea9eaff5739856f3187d228d2c1181ea49fd4697",
|
||||
"rev": "01f697a68905f9dcae70960a9eb013695a17f9a2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -821,11 +975,11 @@
|
|||
"nvim-lspconfig": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676472489,
|
||||
"narHash": "sha256-DnvQ8gDqvkYcDwxQzQiIlLpiBI7xmVJ8J9VYCeWXwfc=",
|
||||
"lastModified": 1677244101,
|
||||
"narHash": "sha256-QD9CmFKjuabyzYsvooYOY8eKX8TIxcewfExrgQM2SjU=",
|
||||
"owner": "neovim",
|
||||
"repo": "nvim-lspconfig",
|
||||
"rev": "649137cbc53a044bffde36294ce3160cb18f32c7",
|
||||
"rev": "62856b20751b748841b0f3ec5a10b1e2f6a6dbc9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -853,11 +1007,11 @@
|
|||
"nvim-notify": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1674034105,
|
||||
"narHash": "sha256-zPSlenKjuZ8Xygu/KuU9+bSf5uUjSDK9HOTWnpUk1jo=",
|
||||
"lastModified": 1677143076,
|
||||
"narHash": "sha256-nwXUoncjtaHv2gbJnr0R8e+2JCewRpcU0Uh1DnWQEBg=",
|
||||
"owner": "rcarriga",
|
||||
"repo": "nvim-notify",
|
||||
"rev": "bdd647f61a05c9b8a57c83b78341a0690e9c29d7",
|
||||
"rev": "9c987081390753b625e2d94e749e80e9b4a3e082",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -885,11 +1039,11 @@
|
|||
"nvim-tree-lua": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676413452,
|
||||
"narHash": "sha256-ttCTJsuO86jDrWsDTpQzg/uESHPYhyo1oF+2bJFI7E0=",
|
||||
"lastModified": 1677535813,
|
||||
"narHash": "sha256-ltSVa+VKD9mFcYF3q49nUT81cCQdbKvCWxm7H8tJNiI=",
|
||||
"owner": "nvim-tree",
|
||||
"repo": "nvim-tree.lua",
|
||||
"rev": "08a0aa1a3b7411ee0a7887c8818528b1558cef96",
|
||||
"rev": "362ecbeed69fae91a287004619decadcb6f7c113",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -933,11 +1087,11 @@
|
|||
"nvim-web-devicons": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676326872,
|
||||
"narHash": "sha256-BmxnyHdNe7/egXNRz91YOcsvnc9fyK2jlYiqGhkaXSk=",
|
||||
"lastModified": 1677551712,
|
||||
"narHash": "sha256-WHymlANhUr/4Trxs0P/huCVRyOHTns1drfFS0hBm2GA=",
|
||||
"owner": "kyazdani42",
|
||||
"repo": "nvim-web-devicons",
|
||||
"rev": "bb6d4fd1e010300510172b173ab5205d37af084f",
|
||||
"rev": "c2c2317f356c8b7da0252f5da758f71bb60bb6b2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -997,11 +1151,11 @@
|
|||
"plenary-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1675102817,
|
||||
"narHash": "sha256-XxyAeN+kt8Cvt8aklVXyjqS4QRaP/0RE6+tPdoGGxPc=",
|
||||
"lastModified": 1676797549,
|
||||
"narHash": "sha256-z5JHuQcF1EvySnRBywl6EOrp8aRO0nd2dnkXJg2ge58=",
|
||||
"owner": "nvim-lua",
|
||||
"repo": "plenary.nvim",
|
||||
"rev": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9",
|
||||
"rev": "253d34830709d690f013daf2853a9d21ad7accab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1045,7 +1199,7 @@
|
|||
"rnix-lsp": {
|
||||
"inputs": {
|
||||
"naersk": "naersk",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -1082,6 +1236,7 @@
|
|||
"crates-nvim": "crates-nvim",
|
||||
"dashboard-nvim": "dashboard-nvim",
|
||||
"dressing-nvim": "dressing-nvim",
|
||||
"fidget-nvim": "fidget-nvim",
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-utils": "flake-utils",
|
||||
"gesture-nvim": "gesture-nvim",
|
||||
|
@ -1096,8 +1251,9 @@
|
|||
"lualine": "lualine",
|
||||
"mind-nvim": "mind-nvim",
|
||||
"minimap-vim": "minimap-vim",
|
||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||
"nil": "nil",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nmd": "nmd",
|
||||
"noice-nvim": "noice-nvim",
|
||||
"nui-nvim": "nui-nvim",
|
||||
|
@ -1138,7 +1294,8 @@
|
|||
"vim-markdown": "vim-markdown",
|
||||
"vim-startify": "vim-startify",
|
||||
"vim-vsnip": "vim-vsnip",
|
||||
"which-key": "which-key"
|
||||
"which-key": "which-key",
|
||||
"zig": "zig"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
|
@ -1169,11 +1326,11 @@
|
|||
"rust-tools": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1675562213,
|
||||
"narHash": "sha256-SIVfaBTGil3gYa3VK1l8EXQqLILO2WbHBkOp+zQBSmo=",
|
||||
"lastModified": 1676929960,
|
||||
"narHash": "sha256-Cuk/vdoviB9ibt2rrkNRmNFy4S+6czhbExmIjTJRdZM=",
|
||||
"owner": "simrat39",
|
||||
"repo": "rust-tools.nvim",
|
||||
"rev": "bd1aa99ffb911a1cf99b3fcf3b44c0391c57e3ef",
|
||||
"rev": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1250,11 +1407,11 @@
|
|||
"telescope": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1675149856,
|
||||
"narHash": "sha256-L4Kw94CUy6N7zcyy9INuR/O0fxQ7sp0IvGd/u7fHxMA=",
|
||||
"lastModified": 1677414372,
|
||||
"narHash": "sha256-QmyVJ/LZFtb/qqD5Q5fHsqAGgqaOT9XkVoLyOcqM14w=",
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope.nvim",
|
||||
"rev": "203bf5609137600d73e8ed82703d6b0e320a5f36",
|
||||
"rev": "a3f17d3baf70df58b9d3544ea30abe52a7a832c2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1283,7 +1440,7 @@
|
|||
"tidalcycles": {
|
||||
"inputs": {
|
||||
"dirt-samples-src": "dirt-samples-src",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"superdirt-src": "superdirt-src",
|
||||
"tidal-src": "tidal-src",
|
||||
"utils": "utils_2",
|
||||
|
@ -1323,11 +1480,11 @@
|
|||
"toggleterm-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676636241,
|
||||
"narHash": "sha256-Hx21QM/6xzAokwreYRpjIWtGFy0BoaB+YxJzBogQ2d0=",
|
||||
"lastModified": 1677405147,
|
||||
"narHash": "sha256-CB/X+Y0kdHn4rMiwGrMr9GqyD5hhqcFFvC3zV1gmI7w=",
|
||||
"owner": "akinsho",
|
||||
"repo": "toggleterm.nvim",
|
||||
"rev": "557664818f6af78de6192f0ce8bc2e887bf4943a",
|
||||
"rev": "31d38d11390bcd35a568fcc65a79b7d6ec89de62",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1355,11 +1512,11 @@
|
|||
"trouble": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676550720,
|
||||
"narHash": "sha256-nJmjl1K+PKDdojLGM5vc/VAH4Ysdy+HKihitcwahGIA=",
|
||||
"lastModified": 1676905505,
|
||||
"narHash": "sha256-afrw6Rigo3EZWOUK2sR0TtE31ktcwOMsQa5AT95I9S0=",
|
||||
"owner": "folke",
|
||||
"repo": "trouble.nvim",
|
||||
"rev": "3bd029284d368cf70cc6fb4a5cbb9ae2231c239d",
|
||||
"rev": "3b754285635a66a93aeb15fa71a23417d8997217",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1417,11 +1574,11 @@
|
|||
"vim-markdown": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1669286150,
|
||||
"narHash": "sha256-5q/s/ypZku4Iviq+eGip6hSWs0Ei3FrnX3IL3WV/FHw=",
|
||||
"lastModified": 1677235033,
|
||||
"narHash": "sha256-q4OE2tUoA0i6m3CbyzCYfjGsPNaTbU9/deM4DBu36GY=",
|
||||
"owner": "preservim",
|
||||
"repo": "vim-markdown",
|
||||
"rev": "df4be8626e2c5b2a42eb60e1f100fce469b81f7d",
|
||||
"rev": "5d3d1b6cbdc4be0b4c6105c1ab1f769d76d3c68f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1499,11 +1656,11 @@
|
|||
"which-key": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676049352,
|
||||
"narHash": "sha256-8tFsz6y6l+0UX7H0g9t0Fvuio8aARJzFWqZc6MuPJuQ=",
|
||||
"lastModified": 1677566975,
|
||||
"narHash": "sha256-FlhL0QIB4yj+okxp4MfzAOPsvl7ZdSwKSAc0RUXoC9o=",
|
||||
"owner": "folke",
|
||||
"repo": "which-key.nvim",
|
||||
"rev": "5224c261825263f46f6771f1b644cae33cd06995",
|
||||
"rev": "6e190f4732a0f2fc517036f2fcf7727893bc5329",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1511,6 +1668,26 @@
|
|||
"repo": "which-key.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zig": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1677457546,
|
||||
"narHash": "sha256-R2k5sOzf6dEg/PbMfZNYFjmJQY1Hbd/4sc8H36I3EAM=",
|
||||
"owner": "mitchellh",
|
||||
"repo": "zig-overlay",
|
||||
"rev": "2b07e4e3e3eb07134ac61049abdc1da1ff6c5516",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mitchellh",
|
||||
"repo": "zig-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
23
flake.nix
23
flake.nix
|
@ -3,10 +3,20 @@
|
|||
outputs = {
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
zig,
|
||||
...
|
||||
} @ inputs:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
systems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
/*
|
||||
FIXME: zig compiler - therefore the maximal version - is broken on darwin
|
||||
see https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/zig/0.10.nix#L70
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
*/
|
||||
];
|
||||
|
||||
imports = [
|
||||
# add lib to module args
|
||||
|
@ -47,12 +57,18 @@
|
|||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
# TODO: neovim nightly
|
||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||
|
||||
# For generating documentation website
|
||||
nmd = {
|
||||
url = "gitlab:rycee/nmd";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# TODO: get zig from the zig overlay instead of nixpkgs
|
||||
zig.url = "github:mitchellh/zig-overlay";
|
||||
|
||||
# LSP plugins
|
||||
nvim-lspconfig = {
|
||||
# url = "github:neovim/nvim-lspconfig?ref=v0.1.3";
|
||||
|
@ -289,6 +305,11 @@
|
|||
flake = false;
|
||||
};
|
||||
|
||||
fidget-nvim = {
|
||||
url = "github:j-hui/fidget.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Markdown
|
||||
glow-nvim = {
|
||||
url = "github:ellisonleao/glow.nvim";
|
||||
|
|
|
@ -9,9 +9,12 @@
|
|||
overlays = [
|
||||
inputs.tidalcycles.overlays.default
|
||||
inputs.self.overlays.default
|
||||
inputs.neovim-nightly-overlay.overlay
|
||||
inputs.zig.overlays.default
|
||||
(_: _: {
|
||||
rnix-lsp = inputs'.rnix-lsp.defaultPackage;
|
||||
nil = inputs'.nil.packages.default;
|
||||
zig = inputs'.zig.packages.default;
|
||||
})
|
||||
];
|
||||
};
|
||||
|
|
|
@ -8,10 +8,6 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.assistant.copilot;
|
||||
in {
|
||||
options.vim.assistant.copilot = {
|
||||
enable = mkEnableOption "Enable GitHub Copilot";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
"copilot-lua"
|
||||
|
@ -21,7 +17,7 @@ in {
|
|||
vim.luaConfigRC.copilot = nvim.dag.entryAnywhere ''
|
||||
require("copilot").setup({
|
||||
-- available options: https://github.com/zbirenbaum/copilot.lua
|
||||
copilot_node_command = "${lib.getExe pkgs.nodejs-slim-16_x}",
|
||||
copilot_node_command = "${cfg.copilot_node_command}",
|
||||
})
|
||||
'';
|
||||
};
|
20
modules/assistant/copilot/copilot.nix
Normal file
20
modules/assistant/copilot/copilot.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.assistant.copilot;
|
||||
in {
|
||||
options.vim.assistant.copilot = {
|
||||
enable = mkEnableOption "Enable GitHub Copilot";
|
||||
|
||||
copilot_node_command = mkOption {
|
||||
type = types.str;
|
||||
default = "${lib.getExe pkgs.nodejs-slim-16_x}";
|
||||
description = "Path to nodejs";
|
||||
};
|
||||
};
|
||||
}
|
6
modules/assistant/copilot/default.nix
Normal file
6
modules/assistant/copilot/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./copilot.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./copilot.nix
|
||||
./copilot
|
||||
# ./tabnine.nix # removed until I find a way around the initialisation script the plugin requires
|
||||
];
|
||||
}
|
||||
|
|
|
@ -8,20 +8,16 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.assistant.tabnine;
|
||||
in {
|
||||
options.vim.assistant.tabnine = {
|
||||
enable = mkEnableOption "Enable TabNine assistant";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["tabnine-nvim"];
|
||||
|
||||
vim.luaConfigRC.tabnine-nvim = nvim.dag.entryAnywhere ''
|
||||
require('tabnine').setup({
|
||||
disable_auto_comment=true,
|
||||
accept_keymap="<Tab>",
|
||||
dismiss_keymap = "<C-]>",
|
||||
debounce_ms = 800,
|
||||
execlude_filetypes = {"TelescopePrompt", "NvimTree", "alpha"}
|
||||
disable_auto_comment = ${boolToString cfg.disable_auto_comment},
|
||||
accept_keymap = ${cfg.accept_keymap},
|
||||
dismiss_keymap = ${cfg.dismiss_keymap},
|
||||
debounce_ms = ${cfg.debounce_ms},
|
||||
execlude_filetypes = ${cfg.execlude_filetypes},
|
||||
})
|
||||
'';
|
||||
};
|
6
modules/assistant/tabnine/default.nix
Normal file
6
modules/assistant/tabnine/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./tabnine.nix
|
||||
];
|
||||
}
|
44
modules/assistant/tabnine/tabnine.nix
Normal file
44
modules/assistant/tabnine/tabnine.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.assistant.tabnine;
|
||||
in {
|
||||
options.vim.assistant.tabnine = {
|
||||
enable = mkEnableOption "Enable TabNine assistant";
|
||||
|
||||
disable_auto_comment = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Disable auto comment";
|
||||
};
|
||||
|
||||
accept_keymap = mkOption {
|
||||
type = types.str;
|
||||
default = "<Tab>";
|
||||
description = "Accept keymap";
|
||||
};
|
||||
|
||||
dismiss_keymap = mkOption {
|
||||
type = types.str;
|
||||
default = "<C-]>";
|
||||
description = "Dismiss keymap";
|
||||
};
|
||||
|
||||
debounce_ms = mkOption {
|
||||
type = types.int;
|
||||
default = 800;
|
||||
description = "Debounce ms";
|
||||
};
|
||||
|
||||
execlude_filetypes = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = ["TelescopePrompt" "NvimTree" "alpha"];
|
||||
description = "Execlude filetypes";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,43 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.autopairs;
|
||||
in {
|
||||
options.vim = {
|
||||
autopairs = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "enable autopairs";
|
||||
};
|
||||
|
||||
type = mkOption {
|
||||
type = types.enum ["nvim-autopairs"];
|
||||
default = "nvim-autopairs";
|
||||
description = "Set the autopairs type. Options: nvim-autopairs [nvim-autopairs]";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
mkIf cfg.enable
|
||||
{
|
||||
vim.startPlugins = ["nvim-autopairs"];
|
||||
|
||||
vim.luaConfigRC.autopairs = nvim.dag.entryAnywhere ''
|
||||
require("nvim-autopairs").setup{}
|
||||
${optionalString (config.vim.autocomplete.type == "nvim-compe") ''
|
||||
require('nvim-autopairs.completion.compe').setup({
|
||||
map_cr = true,
|
||||
map_complete = true,
|
||||
auto_select = false,
|
||||
})
|
||||
''}
|
||||
'';
|
||||
};
|
||||
_: {
|
||||
imports = [
|
||||
./nvim-autopairs
|
||||
];
|
||||
}
|
||||
|
|
27
modules/autopairs/nvim-autopairs/config.nix
Normal file
27
modules/autopairs/nvim-autopairs/config.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.autopairs;
|
||||
in {
|
||||
config =
|
||||
mkIf (cfg.enable)
|
||||
{
|
||||
vim.startPlugins = ["nvim-autopairs"];
|
||||
|
||||
vim.luaConfigRC.autopairs = nvim.dag.entryAnywhere ''
|
||||
require("nvim-autopairs").setup{}
|
||||
${optionalString (config.vim.autocomplete.type == "nvim-compe") ''
|
||||
require('nvim-autopairs.completion.compe').setup({
|
||||
map_cr = ${boolToString cfg.nvim-compe.map_cr},
|
||||
map_complete = ${boolToString cfg.nvim-compe.map_complete},
|
||||
auto_select = ${boolToString cfg.nvim-compe.auto_select},
|
||||
})
|
||||
''}
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/autopairs/nvim-autopairs/default.nix
Normal file
6
modules/autopairs/nvim-autopairs/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./nvim-autopairs.nix
|
||||
];
|
||||
}
|
46
modules/autopairs/nvim-autopairs/nvim-autopairs.nix
Normal file
46
modules/autopairs/nvim-autopairs/nvim-autopairs.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.autopairs;
|
||||
in {
|
||||
options.vim = {
|
||||
autopairs = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "enable autopairs";
|
||||
};
|
||||
|
||||
type = mkOption {
|
||||
type = types.enum ["nvim-autopairs"];
|
||||
default = "nvim-autopairs";
|
||||
description = "Set the autopairs type. Options: nvim-autopairs [nvim-autopairs]";
|
||||
};
|
||||
|
||||
nvim-compe = {
|
||||
map_cr = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "map <CR> on insert mode";
|
||||
};
|
||||
|
||||
map_complete = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "auto insert `(` after select function or method item";
|
||||
};
|
||||
|
||||
auto_select = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "auto select first item";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
103
modules/basic/config.nix
Normal file
103
modules/basic/config.nix
Normal file
|
@ -0,0 +1,103 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim;
|
||||
in {
|
||||
config = {
|
||||
vim.startPlugins = ["plenary-nvim"];
|
||||
|
||||
vim.nmap = mkIf cfg.disableArrows {
|
||||
"<up>" = "<nop>";
|
||||
"<down>" = "<nop>";
|
||||
"<left>" = "<nop>";
|
||||
"<right>" = "<nop>";
|
||||
};
|
||||
|
||||
vim.imap = mkIf cfg.disableArrows {
|
||||
"<up>" = "<nop>";
|
||||
"<down>" = "<nop>";
|
||||
"<left>" = "<nop>";
|
||||
"<right>" = "<nop>";
|
||||
};
|
||||
|
||||
vim.nnoremap = mkIf cfg.mapLeaderSpace {"<space>" = "<nop>";};
|
||||
|
||||
vim.configRC.basic = nvim.dag.entryAfter ["globalsScript"] ''
|
||||
" Settings that are set for everything
|
||||
set encoding=utf-8
|
||||
set mouse=${cfg.mouseSupport}
|
||||
set tabstop=${toString cfg.tabWidth}
|
||||
set shiftwidth=${toString cfg.tabWidth}
|
||||
set softtabstop=${toString cfg.tabWidth}
|
||||
set expandtab
|
||||
set cmdheight=${toString cfg.cmdHeight}
|
||||
set updatetime=${toString cfg.updateTime}
|
||||
set shortmess+=c
|
||||
set tm=${toString cfg.mapTimeout}
|
||||
set hidden
|
||||
${optionalString cfg.splitBelow ''
|
||||
set splitbelow
|
||||
''}
|
||||
${optionalString cfg.splitRight ''
|
||||
set splitright
|
||||
''}
|
||||
${optionalString cfg.showSignColumn ''
|
||||
set signcolumn=yes
|
||||
''}
|
||||
${optionalString cfg.autoIndent ''
|
||||
set autoindent
|
||||
''}
|
||||
|
||||
${optionalString cfg.preventJunkFiles ''
|
||||
set noswapfile
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
''}
|
||||
${optionalString (cfg.bell == "none") ''
|
||||
set noerrorbells
|
||||
set novisualbell
|
||||
''}
|
||||
${optionalString (cfg.bell == "on") ''
|
||||
set novisualbell
|
||||
''}
|
||||
${optionalString (cfg.bell == "visual") ''
|
||||
set noerrorbells
|
||||
''}
|
||||
${optionalString (cfg.lineNumberMode == "relative") ''
|
||||
set relativenumber
|
||||
''}
|
||||
${optionalString (cfg.lineNumberMode == "number") ''
|
||||
set number
|
||||
''}
|
||||
${optionalString (cfg.lineNumberMode == "relNumber") ''
|
||||
set number relativenumber
|
||||
''}
|
||||
${optionalString cfg.useSystemClipboard ''
|
||||
set clipboard+=unnamedplus
|
||||
''}
|
||||
${optionalString cfg.mapLeaderSpace ''
|
||||
let mapleader=" "
|
||||
let maplocalleader=" "
|
||||
''}
|
||||
${optionalString cfg.syntaxHighlighting ''
|
||||
syntax on
|
||||
''}
|
||||
${optionalString (!cfg.wordWrap) ''
|
||||
set nowrap
|
||||
''}
|
||||
${optionalString cfg.hideSearchHighlight ''
|
||||
set nohlsearch
|
||||
set incsearch
|
||||
''}
|
||||
${optionalString cfg.colourTerm ''
|
||||
set termguicolors
|
||||
set t_Co=256
|
||||
''}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,225 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim;
|
||||
in {
|
||||
options.vim = {
|
||||
colourTerm = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Set terminal up for 256 colours";
|
||||
};
|
||||
|
||||
disableArrows = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Set to prevent arrow keys from moving cursor";
|
||||
};
|
||||
|
||||
hideSearchHighlight = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Hide search highlight so it doesn't stay highlighted";
|
||||
};
|
||||
|
||||
scrollOffset = mkOption {
|
||||
type = types.int;
|
||||
default = 8;
|
||||
description = "Start scrolling this number of lines from the top or bottom of the page.";
|
||||
};
|
||||
|
||||
wordWrap = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable word wrapping.";
|
||||
};
|
||||
|
||||
syntaxHighlighting = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable syntax highlighting";
|
||||
};
|
||||
|
||||
mapLeaderSpace = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Map the space key to leader key";
|
||||
};
|
||||
|
||||
useSystemClipboard = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Make use of the clipboard for default yank and paste operations. Don't use * and +";
|
||||
};
|
||||
|
||||
mouseSupport = mkOption {
|
||||
type = with types; enum ["a" "n" "v" "i" "c"];
|
||||
default = "a";
|
||||
description = "Set modes for mouse support. a - all, n - normal, v - visual, i - insert, c - command";
|
||||
};
|
||||
|
||||
lineNumberMode = mkOption {
|
||||
type = with types; enum ["relative" "number" "relNumber" "none"];
|
||||
default = "relNumber";
|
||||
description = "How line numbers are displayed. none, relative, number, relNumber";
|
||||
};
|
||||
|
||||
preventJunkFiles = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Prevent swapfile, backupfile from being created";
|
||||
};
|
||||
|
||||
tabWidth = mkOption {
|
||||
type = types.int;
|
||||
default = 4;
|
||||
description = "Set the width of tabs";
|
||||
};
|
||||
|
||||
autoIndent = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable auto indent";
|
||||
};
|
||||
|
||||
cmdHeight = mkOption {
|
||||
type = types.int;
|
||||
default = 1;
|
||||
description = "Height of the command pane";
|
||||
};
|
||||
|
||||
updateTime = mkOption {
|
||||
type = types.int;
|
||||
default = 300;
|
||||
description = "The number of milliseconds till Cursor Hold event is fired";
|
||||
};
|
||||
|
||||
showSignColumn = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Show the sign column";
|
||||
};
|
||||
|
||||
bell = mkOption {
|
||||
type = types.enum ["none" "visual" "on"];
|
||||
default = "none";
|
||||
description = "Set how bells are handled. Options: on, visual or none";
|
||||
};
|
||||
|
||||
mapTimeout = mkOption {
|
||||
type = types.int;
|
||||
default = 500;
|
||||
description = "Timeout in ms that neovim will wait for mapped action to complete";
|
||||
};
|
||||
|
||||
splitBelow = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "New splits will open below instead of on top";
|
||||
};
|
||||
|
||||
splitRight = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "New splits will open to the right";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
vim.startPlugins = ["plenary-nvim"];
|
||||
|
||||
vim.nmap = mkIf cfg.disableArrows {
|
||||
"<up>" = "<nop>";
|
||||
"<down>" = "<nop>";
|
||||
"<left>" = "<nop>";
|
||||
"<right>" = "<nop>";
|
||||
};
|
||||
|
||||
vim.imap = mkIf cfg.disableArrows {
|
||||
"<up>" = "<nop>";
|
||||
"<down>" = "<nop>";
|
||||
"<left>" = "<nop>";
|
||||
"<right>" = "<nop>";
|
||||
};
|
||||
|
||||
vim.nnoremap = mkIf cfg.mapLeaderSpace {"<space>" = "<nop>";};
|
||||
|
||||
vim.configRC.basic = nvim.dag.entryAfter ["globalsScript"] ''
|
||||
" Settings that are set for everything
|
||||
set encoding=utf-8
|
||||
set mouse=${cfg.mouseSupport}
|
||||
set tabstop=${toString cfg.tabWidth}
|
||||
set shiftwidth=${toString cfg.tabWidth}
|
||||
set softtabstop=${toString cfg.tabWidth}
|
||||
set expandtab
|
||||
set cmdheight=${toString cfg.cmdHeight}
|
||||
set updatetime=${toString cfg.updateTime}
|
||||
set shortmess+=c
|
||||
set tm=${toString cfg.mapTimeout}
|
||||
set hidden
|
||||
${optionalString cfg.splitBelow ''
|
||||
set splitbelow
|
||||
''}
|
||||
${optionalString cfg.splitRight ''
|
||||
set splitright
|
||||
''}
|
||||
${optionalString cfg.showSignColumn ''
|
||||
set signcolumn=yes
|
||||
''}
|
||||
${optionalString cfg.autoIndent ''
|
||||
set autoindent
|
||||
''}
|
||||
|
||||
${optionalString cfg.preventJunkFiles ''
|
||||
set noswapfile
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
''}
|
||||
${optionalString (cfg.bell == "none") ''
|
||||
set noerrorbells
|
||||
set novisualbell
|
||||
''}
|
||||
${optionalString (cfg.bell == "on") ''
|
||||
set novisualbell
|
||||
''}
|
||||
${optionalString (cfg.bell == "visual") ''
|
||||
set noerrorbells
|
||||
''}
|
||||
${optionalString (cfg.lineNumberMode == "relative") ''
|
||||
set relativenumber
|
||||
''}
|
||||
${optionalString (cfg.lineNumberMode == "number") ''
|
||||
set number
|
||||
''}
|
||||
${optionalString (cfg.lineNumberMode == "relNumber") ''
|
||||
set number relativenumber
|
||||
''}
|
||||
${optionalString cfg.useSystemClipboard ''
|
||||
set clipboard+=unnamedplus
|
||||
''}
|
||||
${optionalString cfg.mapLeaderSpace ''
|
||||
let mapleader=" "
|
||||
let maplocalleader=" "
|
||||
''}
|
||||
${optionalString cfg.syntaxHighlighting ''
|
||||
syntax on
|
||||
''}
|
||||
${optionalString (!cfg.wordWrap) ''
|
||||
set nowrap
|
||||
''}
|
||||
${optionalString cfg.hideSearchHighlight ''
|
||||
set nohlsearch
|
||||
set incsearch
|
||||
''}
|
||||
${optionalString cfg.colourTerm ''
|
||||
set termguicolors
|
||||
set t_Co=256
|
||||
''}
|
||||
'';
|
||||
};
|
||||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./module.nix
|
||||
];
|
||||
}
|
||||
|
|
132
modules/basic/module.nix
Normal file
132
modules/basic/module.nix
Normal file
|
@ -0,0 +1,132 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim;
|
||||
in {
|
||||
options.vim = {
|
||||
colourTerm = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Set terminal up for 256 colours";
|
||||
};
|
||||
|
||||
disableArrows = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Set to prevent arrow keys from moving cursor";
|
||||
};
|
||||
|
||||
hideSearchHighlight = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Hide search highlight so it doesn't stay highlighted";
|
||||
};
|
||||
|
||||
scrollOffset = mkOption {
|
||||
type = types.int;
|
||||
default = 8;
|
||||
description = "Start scrolling this number of lines from the top or bottom of the page.";
|
||||
};
|
||||
|
||||
wordWrap = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable word wrapping.";
|
||||
};
|
||||
|
||||
syntaxHighlighting = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable syntax highlighting";
|
||||
};
|
||||
|
||||
mapLeaderSpace = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Map the space key to leader key";
|
||||
};
|
||||
|
||||
useSystemClipboard = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Make use of the clipboard for default yank and paste operations. Don't use * and +";
|
||||
};
|
||||
|
||||
mouseSupport = mkOption {
|
||||
type = with types; enum ["a" "n" "v" "i" "c"];
|
||||
default = "a";
|
||||
description = "Set modes for mouse support. a - all, n - normal, v - visual, i - insert, c - command";
|
||||
};
|
||||
|
||||
lineNumberMode = mkOption {
|
||||
type = with types; enum ["relative" "number" "relNumber" "none"];
|
||||
default = "relNumber";
|
||||
description = "How line numbers are displayed. none, relative, number, relNumber";
|
||||
};
|
||||
|
||||
preventJunkFiles = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Prevent swapfile, backupfile from being created";
|
||||
};
|
||||
|
||||
tabWidth = mkOption {
|
||||
type = types.int;
|
||||
default = 4;
|
||||
description = "Set the width of tabs";
|
||||
};
|
||||
|
||||
autoIndent = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable auto indent";
|
||||
};
|
||||
|
||||
cmdHeight = mkOption {
|
||||
type = types.int;
|
||||
default = 1;
|
||||
description = "Height of the command pane";
|
||||
};
|
||||
|
||||
updateTime = mkOption {
|
||||
type = types.int;
|
||||
default = 300;
|
||||
description = "The number of milliseconds till Cursor Hold event is fired";
|
||||
};
|
||||
|
||||
showSignColumn = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Show the sign column";
|
||||
};
|
||||
|
||||
bell = mkOption {
|
||||
type = types.enum ["none" "visual" "on"];
|
||||
default = "none";
|
||||
description = "Set how bells are handled. Options: on, visual or none";
|
||||
};
|
||||
|
||||
mapTimeout = mkOption {
|
||||
type = types.int;
|
||||
default = 500;
|
||||
description = "Timeout in ms that neovim will wait for mapped action to complete";
|
||||
};
|
||||
|
||||
splitBelow = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "New splits will open below instead of on top";
|
||||
};
|
||||
|
||||
splitRight = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "New splits will open to the right";
|
||||
};
|
||||
};
|
||||
}
|
14
modules/comments/comment-nvim/comment-nvim.nix
Normal file
14
modules/comments/comment-nvim/comment-nvim.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.comments.comment-nvim;
|
||||
in {
|
||||
options.vim.comments.comment-nvim = {
|
||||
enable = mkEnableOption "comment-nvim";
|
||||
};
|
||||
}
|
|
@ -8,10 +8,6 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.comments.comment-nvim;
|
||||
in {
|
||||
options.vim.comments.comment-nvim = {
|
||||
enable = mkEnableOption "comment-nvim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
"comment-nvim"
|
6
modules/comments/comment-nvim/default.nix
Normal file
6
modules/comments/comment-nvim/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./comment-nvim.nix
|
||||
];
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./comment-nvim.nix
|
||||
./kommentary.nix
|
||||
./comment-nvim
|
||||
./kommentary.nix # WARNING: WILL BE REMOVED IN THE NEXT MAJOR RELEASE
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,126 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.autocomplete;
|
||||
in {
|
||||
options.vim = {
|
||||
autocomplete = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "enable autocomplete";
|
||||
};
|
||||
|
||||
type = mkOption {
|
||||
type = types.enum ["nvim-cmp"];
|
||||
default = "nvim-cmp";
|
||||
description = "Set the autocomplete plugin. Options: [nvim-cmp]";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
"nvim-cmp"
|
||||
"cmp-buffer"
|
||||
"cmp-vsnip"
|
||||
"cmp-path"
|
||||
"cmp-treesitter"
|
||||
_: {
|
||||
imports = [
|
||||
./nvim-cmp
|
||||
];
|
||||
|
||||
vim.luaConfigRC.completion = mkIf (cfg.type == "nvim-cmp") (nvim.dag.entryAnywhere ''
|
||||
local has_words_before = function()
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local feedkey = function(key, mode)
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
|
||||
end
|
||||
|
||||
local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
${optionalString (config.vim.lsp.enable) "{ name = 'nvim_lsp' },"}
|
||||
${optionalString (config.vim.lsp.rust.enable) "{ name = 'crates' },"}
|
||||
{ name = 'vsnip' },
|
||||
{ name = 'treesitter' },
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer' },
|
||||
},
|
||||
mapping = {
|
||||
['<C-d>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
||||
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c'}),
|
||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c'}),
|
||||
['<C-y>'] = cmp.config.disable,
|
||||
['<C-e>'] = cmp.mapping({
|
||||
i = cmp.mapping.abort(),
|
||||
c = cmp.mapping.close(),
|
||||
}),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
select = true,
|
||||
}),
|
||||
['<Tab>'] = cmp.mapping(function (fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif vim.fn['vsnip#available'](1) == 1 then
|
||||
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function (fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif vim.fn['vsnip#available'](-1) == 1 then
|
||||
feedkeys("<Plug>(vsnip-jump-prev)", "")
|
||||
end
|
||||
end, { 'i', 's' })
|
||||
},
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noinsert',
|
||||
},
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
-- type of kind
|
||||
vim_item.kind = ${
|
||||
optionalString (config.vim.visuals.lspkind.enable)
|
||||
"require('lspkind').presets.default[vim_item.kind] .. ' ' .."
|
||||
} vim_item.kind
|
||||
|
||||
-- name for each source
|
||||
vim_item.menu = ({
|
||||
buffer = "[Buffer]",
|
||||
nvim_lsp = "[LSP]",
|
||||
vsnip = "[VSnip]",
|
||||
crates = "[Crates]",
|
||||
path = "[Path]",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
}
|
||||
})
|
||||
${optionalString (config.vim.autopairs.enable && config.vim.autopairs.type == "nvim-autopairs") ''
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { text = ""} }))
|
||||
''}
|
||||
'');
|
||||
|
||||
vim.snippets.vsnip.enable =
|
||||
if (cfg.type == "nvim-cmp")
|
||||
then true
|
||||
else config.vim.snippets.vsnip.enable;
|
||||
};
|
||||
}
|
||||
|
|
110
modules/completion/nvim-cmp/config.nix
Normal file
110
modules/completion/nvim-cmp/config.nix
Normal file
|
@ -0,0 +1,110 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.autocomplete;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
"nvim-cmp"
|
||||
"cmp-buffer"
|
||||
"cmp-vsnip"
|
||||
"cmp-path"
|
||||
"cmp-treesitter"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.completion = mkIf (cfg.type == "nvim-cmp") (nvim.dag.entryAnywhere ''
|
||||
local has_words_before = function()
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local feedkey = function(key, mode)
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
|
||||
end
|
||||
|
||||
local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
${optionalString (config.vim.lsp.enable) "{ name = 'nvim_lsp' },"}
|
||||
${optionalString (config.vim.lsp.rust.enable) "{ name = 'crates' },"}
|
||||
{ name = 'vsnip' },
|
||||
{ name = 'treesitter' },
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer' },
|
||||
},
|
||||
mapping = {
|
||||
['<C-d>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
||||
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c'}),
|
||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c'}),
|
||||
['<C-y>'] = cmp.config.disable,
|
||||
['<C-e>'] = cmp.mapping({
|
||||
i = cmp.mapping.abort(),
|
||||
c = cmp.mapping.close(),
|
||||
}),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
select = true,
|
||||
}),
|
||||
['<Tab>'] = cmp.mapping(function (fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif vim.fn['vsnip#available'](1) == 1 then
|
||||
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function (fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif vim.fn['vsnip#available'](-1) == 1 then
|
||||
feedkeys("<Plug>(vsnip-jump-prev)", "")
|
||||
end
|
||||
end, { 'i', 's' })
|
||||
},
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noinsert',
|
||||
},
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
-- type of kind
|
||||
vim_item.kind = ${
|
||||
optionalString (config.vim.visuals.lspkind.enable)
|
||||
"require('lspkind').presets.default[vim_item.kind] .. ' ' .."
|
||||
} vim_item.kind
|
||||
|
||||
-- name for each source
|
||||
vim_item.menu = ({
|
||||
buffer = "[Buffer]",
|
||||
nvim_lsp = "[LSP]",
|
||||
vsnip = "[VSnip]",
|
||||
crates = "[Crates]",
|
||||
path = "[Path]",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
}
|
||||
})
|
||||
${optionalString (config.vim.autopairs.enable && config.vim.autopairs.type == "nvim-autopairs") ''
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { text = ""} }))
|
||||
''}
|
||||
'');
|
||||
|
||||
vim.snippets.vsnip.enable =
|
||||
if (cfg.type == "nvim-cmp")
|
||||
then true
|
||||
else config.vim.snippets.vsnip.enable;
|
||||
};
|
||||
}
|
6
modules/completion/nvim-cmp/default.nix
Normal file
6
modules/completion/nvim-cmp/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./nvim-cmp.nix
|
||||
];
|
||||
}
|
26
modules/completion/nvim-cmp/nvim-cmp.nix
Normal file
26
modules/completion/nvim-cmp/nvim-cmp.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.autocomplete;
|
||||
in {
|
||||
options.vim = {
|
||||
autocomplete = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "enable autocomplete";
|
||||
};
|
||||
|
||||
type = mkOption {
|
||||
type = types.enum ["nvim-cmp"];
|
||||
default = "nvim-cmp";
|
||||
description = "Set the autocomplete plugin. Options: [nvim-cmp]";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
14
modules/dashboard/alpha/alpha.nix
Normal file
14
modules/dashboard/alpha/alpha.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.dashboard.alpha;
|
||||
in {
|
||||
options.vim.dashboard.alpha = {
|
||||
enable = mkEnableOption "alpha";
|
||||
};
|
||||
}
|
|
@ -8,17 +8,14 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.dashboard.alpha;
|
||||
in {
|
||||
options.vim.dashboard.alpha = {
|
||||
enable = mkEnableOption "alpha";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
"alpha-nvim"
|
||||
"nvim-web-devicons"
|
||||
];
|
||||
|
||||
# the credit for this configuration goes to https://github.com/Rishabh672003
|
||||
# good work, honestly
|
||||
# the entire credit for this dashboard configuration to https://github.com/Rishabh672003
|
||||
# honestly, excellent work
|
||||
vim.luaConfigRC.alpha = nvim.dag.entryAnywhere ''
|
||||
local alpha = require("alpha")
|
||||
local plenary_path = require("plenary.path")
|
6
modules/dashboard/alpha/default.nix
Normal file
6
modules/dashboard/alpha/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./alpha.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
|
@ -8,10 +8,6 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.dashboard.dashboard-nvim;
|
||||
in {
|
||||
options.vim.dashboard.dashboard-nvim = {
|
||||
enable = mkEnableOption "dashboard-nvim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
"dashboard-nvim"
|
14
modules/dashboard/dashboard-nvim/dashboard-nvim.nix
Normal file
14
modules/dashboard/dashboard-nvim/dashboard-nvim.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.dashboard.dashboard-nvim;
|
||||
in {
|
||||
options.vim.dashboard.dashboard-nvim = {
|
||||
enable = mkEnableOption "dashboard-nvim";
|
||||
};
|
||||
}
|
6
modules/dashboard/dashboard-nvim/default.nix
Normal file
6
modules/dashboard/dashboard-nvim/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./dashboard-nvim.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
|
@ -5,8 +5,8 @@
|
|||
...
|
||||
}: {
|
||||
imports = [
|
||||
./alpha.nix
|
||||
./dashboard-nvim.nix
|
||||
./startify.nix
|
||||
./alpha
|
||||
./dashboard-nvim
|
||||
./startify
|
||||
];
|
||||
}
|
||||
|
|
54
modules/dashboard/startify/config.nix
Normal file
54
modules/dashboard/startify/config.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with builtins;
|
||||
with lib; let
|
||||
cfg = config.vim.dashboard.startify;
|
||||
|
||||
mkVimBool = val:
|
||||
if val
|
||||
then "1"
|
||||
else "0";
|
||||
in {
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = with pkgs.neovimPlugins; [vim-startify];
|
||||
|
||||
vim.globals = {
|
||||
"startify_custom_header" =
|
||||
if cfg.customHeader == []
|
||||
then null
|
||||
else cfg.customHeader;
|
||||
"startify_custom_footer" =
|
||||
if cfg.customFooter == []
|
||||
then null
|
||||
else cfg.customFooter;
|
||||
"startify_bookmarks" = cfg.bookmarks;
|
||||
"startify_lists" = cfg.lists;
|
||||
"startify_change_to_dir" = mkVimBool cfg.changeToDir;
|
||||
"startify_change_to_vcs_root" = mkVimBool cfg.changeToVCRoot;
|
||||
"startify_change_cmd" = cfg.changeDirCmd;
|
||||
"startify_skiplist" = cfg.skipList;
|
||||
"startify_update_oldfiles" = mkVimBool cfg.updateOldFiles;
|
||||
"startify_session_autoload" = mkVimBool cfg.sessionAutoload;
|
||||
"startify_commands" = cfg.commands;
|
||||
"startify_files_number" = cfg.filesNumber;
|
||||
"startify_custom_indices" = cfg.customIndices;
|
||||
"startify_disable_at_vimenter" = mkVimBool cfg.disableOnStartup;
|
||||
"startify_enable_unsafe" = mkVimBool cfg.unsafe;
|
||||
"startify_padding_left" = cfg.paddingLeft;
|
||||
"startify_use_env" = mkVimBool cfg.useEnv;
|
||||
"startify_session_before_save" = cfg.sessionBeforeSave;
|
||||
"startify_session_persistence" = mkVimBool cfg.sessionPersistence;
|
||||
"startify_session_delete_buffers" = mkVimBool cfg.sessionDeleteBuffers;
|
||||
"startify_session_dir" = cfg.sessionDir;
|
||||
"startify_skiplist_server" = cfg.skipListServer;
|
||||
"startify_session_remove_lines" = cfg.sessionRemoveLines;
|
||||
"startify_session_savevars" = cfg.sessionSavevars;
|
||||
"startify_session_savecmds" = cfg.sessionSavecmds;
|
||||
"startify_session_sort" = mkVimBool cfg.sessionSort;
|
||||
};
|
||||
};
|
||||
}
|
6
modules/dashboard/startify/default.nix
Normal file
6
modules/dashboard/startify/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./startify.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
|
@ -194,43 +194,4 @@ in {
|
|||
type = types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = with pkgs.neovimPlugins; [vim-startify];
|
||||
|
||||
vim.globals = {
|
||||
"startify_custom_header" =
|
||||
if cfg.customHeader == []
|
||||
then null
|
||||
else cfg.customHeader;
|
||||
"startify_custom_footer" =
|
||||
if cfg.customFooter == []
|
||||
then null
|
||||
else cfg.customFooter;
|
||||
"startify_bookmarks" = cfg.bookmarks;
|
||||
"startify_lists" = cfg.lists;
|
||||
"startify_change_to_dir" = mkVimBool cfg.changeToDir;
|
||||
"startify_change_to_vcs_root" = mkVimBool cfg.changeToVCRoot;
|
||||
"startify_change_cmd" = cfg.changeDirCmd;
|
||||
"startify_skiplist" = cfg.skipList;
|
||||
"startify_update_oldfiles" = mkVimBool cfg.updateOldFiles;
|
||||
"startify_session_autoload" = mkVimBool cfg.sessionAutoload;
|
||||
"startify_commands" = cfg.commands;
|
||||
"startify_files_number" = cfg.filesNumber;
|
||||
"startify_custom_indices" = cfg.customIndices;
|
||||
"startify_disable_at_vimenter" = mkVimBool cfg.disableOnStartup;
|
||||
"startify_enable_unsafe" = mkVimBool cfg.unsafe;
|
||||
"startify_padding_left" = cfg.paddingLeft;
|
||||
"startify_use_env" = mkVimBool cfg.useEnv;
|
||||
"startify_session_before_save" = cfg.sessionBeforeSave;
|
||||
"startify_session_persistence" = mkVimBool cfg.sessionPersistence;
|
||||
"startify_session_delete_buffers" = mkVimBool cfg.sessionDeleteBuffers;
|
||||
"startify_session_dir" = cfg.sessionDir;
|
||||
"startify_skiplist_server" = cfg.skipListServer;
|
||||
"startify_session_remove_lines" = cfg.sessionRemoveLines;
|
||||
"startify_session_savevars" = cfg.sessionSavevars;
|
||||
"startify_session_savecmds" = cfg.sessionSavecmds;
|
||||
"startify_session_sort" = mkVimBool cfg.sessionSort;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
_: {
|
||||
imports = [
|
||||
./nvimtreelua.nix
|
||||
./nvimtree-lua
|
||||
];
|
||||
}
|
||||
|
|
131
modules/filetree/nvimtree-lua/config.nix
Normal file
131
modules/filetree/nvimtree-lua/config.nix
Normal file
|
@ -0,0 +1,131 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.filetree.nvimTreeLua;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["nvim-tree-lua"];
|
||||
|
||||
vim.nnoremap = {
|
||||
"<C-n>" = ":NvimTreeToggle<CR>";
|
||||
"<leader>tr" = ":NvimTreeRefresh<CR>";
|
||||
"<leader>tg" = ":NvimTreeFindFile<CR>";
|
||||
"<leader>tf" = ":NvimTreeFocus<CR>";
|
||||
};
|
||||
|
||||
vim.luaConfigRC.nvimtreelua = nvim.dag.entryAnywhere ''
|
||||
local function open_nvim_tree(data)
|
||||
local IGNORED_FT = {
|
||||
"markdown",
|
||||
}
|
||||
|
||||
-- buffer is a real file on the disk
|
||||
local real_file = vim.fn.filereadable(data.file) == 1
|
||||
|
||||
-- buffer is a [No Name]
|
||||
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
||||
|
||||
-- &ft
|
||||
local filetype = vim.bo[data.buf].ft
|
||||
|
||||
-- only files please
|
||||
if not real_file and not no_name then
|
||||
return
|
||||
end
|
||||
|
||||
-- skip ignored filetypes
|
||||
if vim.tbl_contains(IGNORED_FT, filetype) then
|
||||
return
|
||||
end
|
||||
|
||||
-- open the tree but don't focus it
|
||||
require("nvim-tree.api").tree.toggle({ focus = false })
|
||||
end
|
||||
|
||||
-- Open on startup has been deprecated
|
||||
-- see https://github.com/nvim-tree/nvim-tree.lua/wiki/Open-At-Startup
|
||||
-- use a nix eval to dynamically insert the open on startup function
|
||||
${
|
||||
# FIXME: this function is actually obslete due to the existence of the dashboard, I need to find an alternative logic
|
||||
if (cfg.openOnSetup)
|
||||
then ''
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
require'nvim-tree'.setup({
|
||||
sort_by = ${"'" + cfg.sortBy + "'"},
|
||||
disable_netrw = ${boolToString cfg.disableNetRW},
|
||||
hijack_netrw = ${boolToString cfg.hijackNetRW},
|
||||
hijack_cursor = ${boolToString cfg.hijackCursor},
|
||||
open_on_tab = ${boolToString cfg.openTreeOnNewTab},
|
||||
sync_root_with_cwd = ${boolToString cfg.syncRootWithCwd},
|
||||
update_focused_file = {
|
||||
enable = ${boolToString cfg.updateFocusedFile.enable},
|
||||
update_cwd = ${boolToString cfg.updateFocusedFile.update_cwd},
|
||||
},
|
||||
|
||||
view = {
|
||||
width = ${toString cfg.view.width},
|
||||
side = ${"'" + cfg.view.side + "'"},
|
||||
adaptive_size = ${boolToString cfg.view.adaptiveSize},
|
||||
hide_root_folder = ${boolToString cfg.view.hideRootFolder},
|
||||
},
|
||||
git = {
|
||||
enable = ${boolToString cfg.git.enable},
|
||||
ignore = ${boolToString cfg.git.ignore},
|
||||
},
|
||||
|
||||
filesystem_watchers = {
|
||||
enable = ${boolToString cfg.filesystemWatchers.enable},
|
||||
},
|
||||
|
||||
actions = {
|
||||
open_file = {
|
||||
quit_on_open = ${boolToString cfg.actions.openFile.quitOnOpen},
|
||||
resize_window = ${boolToString cfg.actions.openFile.resizeWindow},
|
||||
window_picker = {
|
||||
enable = ${boolToString cfg.actions.openFile.windowPicker.enable},
|
||||
chars = ${toString cfg.actions.openFile.windowPicker.chars},
|
||||
},
|
||||
},
|
||||
expand_all = {
|
||||
exclude = {
|
||||
${builtins.concatStringsSep "\n" (builtins.map (s: "\"" + s + "\",") cfg.actions.expandAll.exclude)}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
renderer = {
|
||||
highlight_git = ${boolToString cfg.renderer.higlightGit},
|
||||
highlight_opened_files = ${"'" + cfg.renderer.highlightOpenedFiles + "'"},
|
||||
indent_markers = {
|
||||
enable = ${boolToString cfg.renderer.indentMarkers},
|
||||
},
|
||||
-- TODO: those two
|
||||
add_trailing = ${boolToString cfg.renderer.trailingSlash},
|
||||
group_empty = ${boolToString cfg.renderer.groupEmptyFolders},
|
||||
},
|
||||
|
||||
system_open = {
|
||||
cmd = ${"'" + cfg.systemOpenCmd + "'"},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = ${boolToString cfg.lspDiagnostics},
|
||||
},
|
||||
filters = {
|
||||
dotfiles = ${boolToString cfg.hideDotFiles},
|
||||
custom = {
|
||||
${builtins.concatStringsSep "\n" (builtins.map (s: "\"" + s + "\",") cfg.hideFiles)}
|
||||
},
|
||||
},
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/filetree/nvimtree-lua/default.nix
Normal file
6
modules/filetree/nvimtree-lua/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./nvimtree-lua.nix
|
||||
];
|
||||
}
|
|
@ -15,6 +15,12 @@ in {
|
|||
description = "Enable nvim-tree-lua";
|
||||
};
|
||||
|
||||
sortBy = mkOption {
|
||||
default = "name";
|
||||
description = "Sort by name or extension";
|
||||
type = types.enum ["name" "extension" "modification_time" "case_sensitive"];
|
||||
};
|
||||
|
||||
treeSide = mkOption {
|
||||
default = "left";
|
||||
description = "Side the tree will appear on left or right";
|
||||
|
@ -132,7 +138,7 @@ in {
|
|||
};
|
||||
|
||||
hijackCursor = mkOption {
|
||||
default = true;
|
||||
default = false;
|
||||
description = "Hijack the cursor in the tree to put it at the start of the filename";
|
||||
type = types.bool;
|
||||
};
|
||||
|
@ -211,6 +217,38 @@ in {
|
|||
description = "Quit the tree when opening a file";
|
||||
type = types.bool;
|
||||
};
|
||||
windowPicker = {
|
||||
enable = mkEnableOption "Window picker";
|
||||
|
||||
chars = mkOption {
|
||||
default = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
||||
description = "A string of chars used as identifiers by the window picker";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
/*
|
||||
# FIXME: Can't get this to place the list items in a lua table
|
||||
exclude = {
|
||||
fileType = mkOption {
|
||||
default = ["notify" "packer" "qf" "diff" "fugitive" "fugitiveblame"];
|
||||
description = "File types to exclude from window picker";
|
||||
type = with types; listOf str;
|
||||
};
|
||||
buftype = mkOption {
|
||||
default = ["nofile" "terminal" "help"];
|
||||
description = "Buffer types to exclude from window picker";
|
||||
type = with types; listOf str;
|
||||
};
|
||||
};
|
||||
*/
|
||||
};
|
||||
};
|
||||
expandAll = {
|
||||
exclude = mkOption {
|
||||
default = [];
|
||||
description = "Exclude files from expand all";
|
||||
type = with types; listOf str;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -280,7 +318,6 @@ in {
|
|||
type = types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
glyphs = {
|
||||
default = mkOption {
|
||||
default = "";
|
||||
|
@ -377,79 +414,4 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["nvim-tree-lua"];
|
||||
|
||||
vim.nnoremap = {
|
||||
"<C-n>" = ":NvimTreeToggle<CR>";
|
||||
"<leader>tr" = ":NvimTreeRefresh<CR>";
|
||||
"<leader>tg" = ":NvimTreeFindFile<CR>";
|
||||
"<leader>tf" = ":NvimTreeFocus<CR>";
|
||||
};
|
||||
|
||||
vim.luaConfigRC.nvimtreelua = nvim.dag.entryAnywhere ''
|
||||
require'nvim-tree'.setup({
|
||||
disable_netrw = ${boolToString cfg.disableNetRW},
|
||||
hijack_netrw = ${boolToString cfg.hijackNetRW},
|
||||
hijack_cursor = ${boolToString cfg.hijackCursor},
|
||||
open_on_tab = ${boolToString cfg.openTreeOnNewTab},
|
||||
-- FIXME: Open on startup has been deprecated
|
||||
-- needs an alternative, see https://github.com/nvim-tree/nvim-tree.lua/wiki/Open-At-Startup3
|
||||
-- open_on_setup = ${boolToString cfg.openOnSetup},
|
||||
-- open_on_setup_file = ${boolToString cfg.openOnSetup},
|
||||
sync_root_with_cwd = ${boolToString cfg.syncRootWithCwd},
|
||||
update_focused_file = {
|
||||
enable = ${boolToString cfg.updateFocusedFile.enable},
|
||||
update_cwd = ${boolToString cfg.updateFocusedFile.update_cwd},
|
||||
},
|
||||
|
||||
view = {
|
||||
width = ${toString cfg.view.width},
|
||||
side = ${"'" + cfg.view.side + "'"},
|
||||
adaptive_size = ${boolToString cfg.view.adaptiveSize},
|
||||
hide_root_folder = ${boolToString cfg.view.hideRootFolder},
|
||||
},
|
||||
git = {
|
||||
enable = ${boolToString cfg.git.enable},
|
||||
ignore = ${boolToString cfg.git.ignore},
|
||||
},
|
||||
|
||||
filesystem_watchers = {
|
||||
enable = ${boolToString cfg.filesystemWatchers.enable},
|
||||
},
|
||||
|
||||
actions = {
|
||||
open_file = {
|
||||
quit_on_open = ${boolToString cfg.actions.openFile.quitOnOpen},
|
||||
resize_window = ${boolToString cfg.actions.openFile.resizeWindow},
|
||||
},
|
||||
},
|
||||
|
||||
renderer = {
|
||||
highlight_git = ${boolToString cfg.renderer.higlightGit},
|
||||
highlight_opened_files = ${"'" + cfg.renderer.highlightOpenedFiles + "'"},
|
||||
indent_markers = {
|
||||
enable = ${boolToString cfg.renderer.indentMarkers},
|
||||
},
|
||||
-- TODO: those two
|
||||
add_trailing = ${boolToString cfg.renderer.trailingSlash},
|
||||
group_empty = ${boolToString cfg.renderer.groupEmptyFolders},
|
||||
},
|
||||
|
||||
system_open = {
|
||||
cmd = ${"'" + cfg.systemOpenCmd + "'"},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = ${boolToString cfg.lspDiagnostics},
|
||||
},
|
||||
filters = {
|
||||
dotfiles = ${boolToString cfg.hideDotFiles},
|
||||
custom = {
|
||||
${builtins.concatStringsSep "\n" (builtins.map (s: "\"" + s + "\",") cfg.hideFiles)}
|
||||
},
|
||||
},
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -8,61 +8,6 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
enable = mkEnableOption "neovim lsp support";
|
||||
formatOnSave = mkEnableOption "Format on save";
|
||||
nix = {
|
||||
enable = mkEnableOption "Nix LSP";
|
||||
server = mkOption {
|
||||
type = with types; enum ["rnix" "nil"];
|
||||
default = "nil";
|
||||
description = "Which LSP to use";
|
||||
};
|
||||
|
||||
pkg = mkOption {
|
||||
type = types.package;
|
||||
default =
|
||||
if (cfg.nix.server == "rnix")
|
||||
then pkgs.rnix-lsp
|
||||
else pkgs.nil;
|
||||
description = "The LSP package to use";
|
||||
};
|
||||
|
||||
formatter = mkOption {
|
||||
type = with types; enum ["nixpkgs-fmt" "alejandra"];
|
||||
default = "alejandra";
|
||||
description = "Which nix formatter to use";
|
||||
};
|
||||
};
|
||||
rust = {
|
||||
enable = mkEnableOption "Rust LSP";
|
||||
rustAnalyzerOpts = mkOption {
|
||||
type = types.str;
|
||||
default = ''
|
||||
["rust-analyzer"] = {
|
||||
experimental = {
|
||||
procAttrMacros = true,
|
||||
},
|
||||
},
|
||||
'';
|
||||
description = "options to pass to rust analyzer";
|
||||
};
|
||||
};
|
||||
python = mkEnableOption "Python LSP";
|
||||
clang = {
|
||||
enable = mkEnableOption "C language LSP";
|
||||
c_header = mkEnableOption "C syntax header files";
|
||||
cclsOpts = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
sql = mkEnableOption "SQL Language LSP";
|
||||
go = mkEnableOption "Go language LSP";
|
||||
ts = mkEnableOption "TS language LSP";
|
||||
zig.enable = mkEnableOption "Zig language LSP";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (
|
||||
let
|
||||
writeIf = cond: msg:
|
|
@ -5,11 +5,15 @@
|
|||
...
|
||||
}: {
|
||||
imports = [
|
||||
./lsp.nix
|
||||
./lspsaga.nix
|
||||
./nvim-code-action-menu.nix
|
||||
./trouble.nix
|
||||
./lsp-signature.nix
|
||||
./lightbulb.nix
|
||||
# nvim lsp support
|
||||
./config.nix
|
||||
./module.nix
|
||||
|
||||
# lsp plugins
|
||||
./lspsaga
|
||||
./nvim-code-action-menu
|
||||
./trouble
|
||||
./lsp-signature
|
||||
./lightbulb
|
||||
];
|
||||
}
|
||||
|
|
|
@ -8,12 +8,6 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
lightbulb = {
|
||||
enable = mkEnableOption "lightbulb for code actions. Requires emoji font";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && cfg.lightbulb.enable) {
|
||||
vim.startPlugins = ["nvim-lightbulb"];
|
||||
|
6
modules/lsp/lightbulb/default.nix
Normal file
6
modules/lsp/lightbulb/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./lightbulb.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
16
modules/lsp/lightbulb/lightbulb.nix
Normal file
16
modules/lsp/lightbulb/lightbulb.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
lightbulb = {
|
||||
enable = mkEnableOption "lightbulb for code actions. Requires emoji font";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -8,14 +8,10 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
lspSignature = {
|
||||
enable = mkEnableOption "lsp signature viewer";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && cfg.lspSignature.enable) {
|
||||
vim.startPlugins = ["lsp-signature"];
|
||||
vim.startPlugins = [
|
||||
"lsp-signature"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.lsp-signature = nvim.dag.entryAnywhere ''
|
||||
-- Enable lsp signature viewer
|
6
modules/lsp/lsp-signature/default.nix
Normal file
6
modules/lsp/lsp-signature/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./lsp-signature.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
16
modules/lsp/lsp-signature/lsp-signature.nix
Normal file
16
modules/lsp/lsp-signature/lsp-signature.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
lspSignature = {
|
||||
enable = mkEnableOption "lsp signature viewer";
|
||||
};
|
||||
};
|
||||
}
|
52
modules/lsp/lspsaga/config.nix
Normal file
52
modules/lsp/lspsaga/config.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
config = mkIf (cfg.enable && cfg.lspsaga.enable) {
|
||||
vim.startPlugins = ["lspsaga"];
|
||||
|
||||
vim.vnoremap = {
|
||||
"<silent><leader>ca" = ":<C-U>lua require('lspsaga.codeaction').range_code_action()<CR>";
|
||||
};
|
||||
|
||||
vim.nnoremap =
|
||||
{
|
||||
"<silent><leader>lf" = "<cmd>lua require'lspsaga.provider'.lsp_finder()<CR>";
|
||||
"<silent><leader>lh" = "<cmd>lua require('lspsaga.hover').render_hover_doc()<CR>";
|
||||
"<silent><C-f>" = "<cmd>lua require('lspsaga.action').smart_scroll_with_saga(1)<CR>";
|
||||
"<silent><C-b>" = "<cmd>lua require('lspsaga.action').smart_scroll_with_saga(-1)<CR>";
|
||||
"<silent><leader>lr" = "<cmd>lua require'lspsaga.rename'.rename()<CR>";
|
||||
"<silent><leader>ld" = "<cmd>lua require'lspsaga.provider'.preview_definition()<CR>";
|
||||
"<silent><leader>ll" = "<cmd>lua require'lspsaga.diagnostic'.show_line_diagnostics()<CR>";
|
||||
"<silent><leader>lc" = "<cmd>lua require'lspsaga.diagnostic'.show_cursor_diagnostics()<CR>";
|
||||
"<silent><leader>lp" = "<cmd>lua require'lspsaga.diagnostic'.lsp_jump_diagnostic_prev()<CR>";
|
||||
"<silent><leader>ln" = "<cmd>lua require'lspsaga.diagnostic'.lsp_jump_diagnostic_next()<CR>";
|
||||
}
|
||||
// (
|
||||
if (!cfg.nvimCodeActionMenu.enable)
|
||||
then {
|
||||
"<silent><leader>ca" = "<cmd>lua require('lspsaga.codeaction').code_action()<CR>";
|
||||
}
|
||||
else {}
|
||||
)
|
||||
// (
|
||||
if (!cfg.lspSignature.enable)
|
||||
then {
|
||||
"<silent><leader>ls" = "<cmd>lua require('lspsaga.signaturehelp').signature_help()<CR>";
|
||||
}
|
||||
else {}
|
||||
);
|
||||
|
||||
vim.luaConfigRC.lspsage = nvim.dag.entryAnywhere ''
|
||||
-- Enable lspsaga
|
||||
local saga = require 'lspsaga'
|
||||
saga.init_lsp_saga()
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/lsp/lspsaga/default.nix
Normal file
6
modules/lsp/lspsaga/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./lspsaga.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
65
modules/lsp/module.nix
Normal file
65
modules/lsp/module.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
enable = mkEnableOption "neovim lsp support";
|
||||
formatOnSave = mkEnableOption "Format on save";
|
||||
nix = {
|
||||
enable = mkEnableOption "Nix LSP";
|
||||
server = mkOption {
|
||||
type = with types; enum ["rnix" "nil"];
|
||||
default = "nil";
|
||||
description = "Which LSP to use";
|
||||
};
|
||||
|
||||
pkg = mkOption {
|
||||
type = types.package;
|
||||
default =
|
||||
if (cfg.nix.server == "rnix")
|
||||
then pkgs.rnix-lsp
|
||||
else pkgs.nil;
|
||||
description = "The LSP package to use";
|
||||
};
|
||||
|
||||
formatter = mkOption {
|
||||
type = with types; enum ["nixpkgs-fmt" "alejandra"];
|
||||
default = "alejandra";
|
||||
description = "Which nix formatter to use";
|
||||
};
|
||||
};
|
||||
rust = {
|
||||
enable = mkEnableOption "Rust LSP";
|
||||
rustAnalyzerOpts = mkOption {
|
||||
type = types.str;
|
||||
default = ''
|
||||
["rust-analyzer"] = {
|
||||
experimental = {
|
||||
procAttrMacros = true,
|
||||
},
|
||||
},
|
||||
'';
|
||||
description = "options to pass to rust analyzer";
|
||||
};
|
||||
};
|
||||
python = mkEnableOption "Python LSP";
|
||||
clang = {
|
||||
enable = mkEnableOption "C language LSP";
|
||||
c_header = mkEnableOption "C syntax header files";
|
||||
cclsOpts = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
sql = mkEnableOption "SQL Language LSP";
|
||||
go = mkEnableOption "Go language LSP";
|
||||
ts = mkEnableOption "TS language LSP";
|
||||
zig.enable = mkEnableOption "Zig language LSP";
|
||||
};
|
||||
}
|
|
@ -8,12 +8,6 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
nvimCodeActionMenu = {
|
||||
enable = mkEnableOption "nvim code action menu";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && cfg.nvimCodeActionMenu.enable) {
|
||||
vim.startPlugins = ["nvim-code-action-menu"];
|
||||
|
6
modules/lsp/nvim-code-action-menu/default.nix
Normal file
6
modules/lsp/nvim-code-action-menu/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./nvim-code-action-menu.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
16
modules/lsp/nvim-code-action-menu/nvim-code-action-menu.nix
Normal file
16
modules/lsp/nvim-code-action-menu/nvim-code-action-menu.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
nvimCodeActionMenu = {
|
||||
enable = mkEnableOption "nvim code action menu";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -8,12 +8,6 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
trouble = {
|
||||
enable = mkEnableOption "trouble diagnostics viewer";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && cfg.trouble.enable) {
|
||||
vim.startPlugins = ["trouble"];
|
||||
|
6
modules/lsp/trouble/default.nix
Normal file
6
modules/lsp/trouble/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./trouble.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
16
modules/lsp/trouble/trouble.nix
Normal file
16
modules/lsp/trouble/trouble.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
trouble = {
|
||||
enable = mkEnableOption "trouble diagnostics viewer";
|
||||
};
|
||||
};
|
||||
}
|
13
modules/markdown/config.nix
Normal file
13
modules/markdown/config.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
config = {
|
||||
vim.markdown = {
|
||||
enable = mkDefault false;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -6,5 +6,7 @@
|
|||
}: {
|
||||
imports = [
|
||||
./glow
|
||||
./config.nix
|
||||
./module.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -4,11 +4,17 @@
|
|||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
config = {
|
||||
vim.markdown = {
|
||||
enable = mkDefault false;
|
||||
glow.enable = mkDefault false;
|
||||
with lib; let
|
||||
cfg = config.vim.markdown.glow;
|
||||
in {
|
||||
config = (mkIf cfg.enable) {
|
||||
vim.startPlugins = ["glow-nvim"];
|
||||
vim.globals = {
|
||||
"glow_binary_path" = "${pkgs.glow}/bin";
|
||||
};
|
||||
|
||||
vim.configRC.glow = nvim.dag.entryAnywhere ''
|
||||
autocmd FileType markdown noremap <leader>p :Glow<CR>
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,38 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.markdown;
|
||||
in {
|
||||
options.vim.markdown = {
|
||||
enable = mkEnableOption "markdown tools and plugins";
|
||||
|
||||
glow.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable markdown preview in neovim with glow";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
(
|
||||
if cfg.glow.enable
|
||||
then "glow-nvim"
|
||||
else null
|
||||
)
|
||||
_: {
|
||||
imports = [
|
||||
./glow.nix
|
||||
./config.nix
|
||||
];
|
||||
|
||||
vim.globals = mkIf (cfg.glow.enable) {
|
||||
"glow_binary_path" = "${pkgs.glow}/bin";
|
||||
};
|
||||
|
||||
vim.configRC.glow = mkIf (cfg.glow.enable) (nvim.dag.entryAnywhere ''
|
||||
autocmd FileType markdown noremap <leader>p :Glow<CR>
|
||||
'');
|
||||
};
|
||||
}
|
||||
|
|
18
modules/markdown/glow/glow.nix
Normal file
18
modules/markdown/glow/glow.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.markdown;
|
||||
in {
|
||||
options.vim.markdown = {
|
||||
glow.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Enable markdown preview in neovim with glow";
|
||||
};
|
||||
};
|
||||
}
|
20
modules/markdown/module.nix
Normal file
20
modules/markdown/module.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.markdown;
|
||||
in {
|
||||
options.vim.markdown = {
|
||||
enable = mkEnableOption "markdown tools and plugins";
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable) {
|
||||
/*
|
||||
...
|
||||
*/
|
||||
};
|
||||
}
|
14
modules/minimap/codewindow/codewindow.nix
Normal file
14
modules/minimap/codewindow/codewindow.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.minimap.codewindow;
|
||||
in {
|
||||
options.vim.minimap.codewindow = {
|
||||
enable = mkEnableOption "Enable minimap-vim plugin";
|
||||
};
|
||||
}
|
|
@ -8,10 +8,6 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.minimap.codewindow;
|
||||
in {
|
||||
options.vim.minimap.codewindow = {
|
||||
enable = mkEnableOption "Enable minimap-vim plugin";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
"codewindow-nvim"
|
6
modules/minimap/codewindow/default.nix
Normal file
6
modules/minimap/codewindow/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./codewindow.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}: {
|
||||
imports = [
|
||||
./minimap-vim.nix
|
||||
./codewindow.nix
|
||||
./minimap-vim
|
||||
./codewindow
|
||||
];
|
||||
}
|
||||
|
|
|
@ -8,10 +8,6 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.minimap.minimap-vim;
|
||||
in {
|
||||
options.vim.minimap.minimap-vim = {
|
||||
enable = mkEnableOption "Enable minimap-vim plugin";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
pkgs.code-minimap
|
6
modules/minimap/minimap-vim/default.nix
Normal file
6
modules/minimap/minimap-vim/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./minimap-vim.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
14
modules/minimap/minimap-vim/minimap-vim.nix
Normal file
14
modules/minimap/minimap-vim/minimap-vim.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.minimap.minimap-vim;
|
||||
in {
|
||||
options.vim.minimap.minimap-vim = {
|
||||
enable = mkEnableOption "Enable minimap-vim plugin";
|
||||
};
|
||||
}
|
|
@ -23,7 +23,7 @@
|
|||
./dashboard
|
||||
./notifications
|
||||
./utility
|
||||
./presence
|
||||
./rich-presence
|
||||
./notes
|
||||
./terminal
|
||||
./ui
|
||||
|
|
26
modules/notes/mind-nvim/config.nix
Normal file
26
modules/notes/mind-nvim/config.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notes.mind-nvim;
|
||||
in {
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
"mind-nvim"
|
||||
];
|
||||
|
||||
vim.nnoremap = {
|
||||
"<leader>om" = ":MindOpenMain<CR>";
|
||||
"<leader>op" = ":MindOpenProject<CR>";
|
||||
"<leader>oc" = ":MindClose<CR>";
|
||||
};
|
||||
|
||||
vim.luaConfigRC.mind-nvim = nvim.dag.entryAnywhere ''
|
||||
require'mind'.setup()
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,30 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notes.mind-nvim;
|
||||
in {
|
||||
options.vim.notes.mind-nvim = {
|
||||
enable = mkEnableOption "The power of trees at your fingertips. ";
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
"mind-nvim"
|
||||
_: {
|
||||
imports = [
|
||||
./mind-nvim.nix
|
||||
./config.nix
|
||||
];
|
||||
|
||||
vim.nnoremap = {
|
||||
"<leader>om" = ":MindOpenMain<CR>";
|
||||
"<leader>op" = ":MindOpenProject<CR>";
|
||||
"<leader>oc" = ":MindClose<CR>";
|
||||
};
|
||||
|
||||
vim.luaConfigRC.mind-nvim = nvim.dag.entryAnywhere ''
|
||||
require'mind'.setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
14
modules/notes/mind-nvim/mind-nvim.nix
Normal file
14
modules/notes/mind-nvim/mind-nvim.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notes.mind-nvim;
|
||||
in {
|
||||
options.vim.notes.mind-nvim = {
|
||||
enable = mkEnableOption "The power of trees at your fingertips. ";
|
||||
};
|
||||
}
|
32
modules/notes/obsidian/config.nix
Normal file
32
modules/notes/obsidian/config.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notes.obsidian;
|
||||
auto = config.vim.autocomplete;
|
||||
in {
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
"obsidian-nvim"
|
||||
"vim-markdown"
|
||||
"tabular"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.obsidian = nvim.dag.entryAnywhere ''
|
||||
require("obsidian").setup({
|
||||
dir = "${cfg.dir}",
|
||||
completion = {
|
||||
nvim_cmp = ${
|
||||
if (auto.type == "nvim-cmp")
|
||||
then "true"
|
||||
else "false"
|
||||
}
|
||||
}
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,51 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notes.obsidian;
|
||||
auto = config.vim.autocomplete;
|
||||
in {
|
||||
options.vim.notes = {
|
||||
obsidian = {
|
||||
enable = mkEnableOption "Complementary neovim plugins for Obsidian editor";
|
||||
dir = mkOption {
|
||||
type = types.str;
|
||||
default = "~/my-vault";
|
||||
description = "Obsidian vault directory";
|
||||
};
|
||||
|
||||
completion = {
|
||||
nvim_cmp = mkOption {
|
||||
# if using nvim-cmp, otherwise set to false
|
||||
type = types.bool;
|
||||
description = "If using nvim-cmp, otherwise set to false";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
"obsidian-nvim"
|
||||
"vim-markdown"
|
||||
"tabular"
|
||||
_: {
|
||||
imports = [
|
||||
./obsidian.nix
|
||||
./config.nix
|
||||
];
|
||||
|
||||
vim.luaConfigRC.obsidian = nvim.dag.entryAnywhere ''
|
||||
require("obsidian").setup({
|
||||
dir = "${cfg.dir}",
|
||||
completion = {
|
||||
nvim_cmp = ${
|
||||
if (auto.type == "nvim-cmp")
|
||||
then "true"
|
||||
else "false"
|
||||
}
|
||||
}
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
30
modules/notes/obsidian/obsidian.nix
Normal file
30
modules/notes/obsidian/obsidian.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notes.obsidian;
|
||||
auto = config.vim.autocomplete;
|
||||
in {
|
||||
options.vim.notes = {
|
||||
obsidian = {
|
||||
enable = mkEnableOption "Complementary neovim plugins for Obsidian editor";
|
||||
dir = mkOption {
|
||||
type = types.str;
|
||||
default = "~/my-vault";
|
||||
description = "Obsidian vault directory";
|
||||
};
|
||||
|
||||
completion = {
|
||||
nvim_cmp = mkOption {
|
||||
# if using nvim-cmp, otherwise set to false
|
||||
type = types.bool;
|
||||
description = "If using nvim-cmp, otherwise set to false";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
40
modules/notes/orgmode/config.nix
Normal file
40
modules/notes/orgmode/config.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notes.orgmode;
|
||||
in {
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
"orgmode-nvim"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.orgmode = nvim.dag.entryAnywhere ''
|
||||
-- Load custom treesitter grammar for org filetype
|
||||
require('orgmode').setup_ts_grammar()
|
||||
|
||||
-- Treesitter configuration
|
||||
require('nvim-treesitter.configs').setup {
|
||||
|
||||
-- If TS highlights are not enabled at all, or disabled via `disable` prop,
|
||||
-- highlighting will fallback to default Vim syntax highlighting
|
||||
highlight = {
|
||||
enable = true,
|
||||
-- Required for spellcheck, some LaTex highlights and
|
||||
-- code block highlights that do not have ts grammar
|
||||
additional_vim_regex_highlighting = {'org'},
|
||||
},
|
||||
ensure_installed = {'org'}, -- Or run :TSUpdate org
|
||||
}
|
||||
|
||||
require('orgmode').setup({
|
||||
org_agenda_files = ${cfg.orgAgendaFiles},
|
||||
org_default_notes_file = '${cfg.orgDefaultNotesFile}',
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,56 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notes.orgmode;
|
||||
in {
|
||||
options.vim.notes = {
|
||||
orgmode = {
|
||||
enable = mkEnableOption "Neovim plugin for Emac Orgmode. Get the best of both worlds.";
|
||||
orgAgendaFiles = mkOption {
|
||||
type = types.str;
|
||||
default = "{'~/Dropbox/org/*', '~/my-orgs/**/*'}";
|
||||
description = "List of org files to be used as agenda files.";
|
||||
};
|
||||
orgDefaultNotesFile = mkOption {
|
||||
type = types.str;
|
||||
default = "~/Dropbox/org/refile.org";
|
||||
description = "Default org file to be used for notes.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
"orgmode-nvim"
|
||||
_: {
|
||||
imports = [
|
||||
./orgmode.nix
|
||||
./config.nix
|
||||
];
|
||||
|
||||
vim.luaConfigRC.orgmode = nvim.dag.entryAnywhere ''
|
||||
-- Load custom treesitter grammar for org filetype
|
||||
require('orgmode').setup_ts_grammar()
|
||||
|
||||
-- Treesitter configuration
|
||||
require('nvim-treesitter.configs').setup {
|
||||
|
||||
-- If TS highlights are not enabled at all, or disabled via `disable` prop,
|
||||
-- highlighting will fallback to default Vim syntax highlighting
|
||||
highlight = {
|
||||
enable = true,
|
||||
-- Required for spellcheck, some LaTex highlights and
|
||||
-- code block highlights that do not have ts grammar
|
||||
additional_vim_regex_highlighting = {'org'},
|
||||
},
|
||||
ensure_installed = {'org'}, -- Or run :TSUpdate org
|
||||
}
|
||||
|
||||
require('orgmode').setup({
|
||||
org_agenda_files = ${cfg.orgAgendaFiles},
|
||||
org_default_notes_file = '${cfg.orgDefaultNotesFile}',
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
24
modules/notes/orgmode/orgmode.nix
Normal file
24
modules/notes/orgmode/orgmode.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notes.orgmode;
|
||||
in {
|
||||
options.vim.notes.orgmode = {
|
||||
enable = mkEnableOption "Neovim plugin for Emac Orgmode. Get the best of both worlds.";
|
||||
orgAgendaFiles = mkOption {
|
||||
type = types.str;
|
||||
default = "{'~/Dropbox/org/*', '~/my-orgs/**/*'}";
|
||||
description = "List of org files to be used as agenda files.";
|
||||
};
|
||||
orgDefaultNotesFile = mkOption {
|
||||
type = types.str;
|
||||
default = "~/Dropbox/org/refile.org";
|
||||
description = "Default org file to be used for notes.";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
_: {
|
||||
imports = [
|
||||
./nvim-notify.nix
|
||||
./nvim-notify
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notify.nvim-notify;
|
||||
in {
|
||||
options.vim.notify.nvim-notify = {
|
||||
enable = mkEnableOption "Enable nvim-notify plugin";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["nvim-notify"];
|
||||
|
||||
vim.luaConfigRC.nvim-notify = nvim.dag.entryAnywhere ''
|
||||
require('notify').setup {
|
||||
stages = 'fade_in_slide_out',
|
||||
timeout = 1000,
|
||||
background_colour = '#000000',
|
||||
position = 'top_right',
|
||||
icons = {
|
||||
ERROR = '',
|
||||
WARN = '',
|
||||
INFO = '',
|
||||
DEBUG = '',
|
||||
TRACE = '',
|
||||
},
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
31
modules/notifications/nvim-notify/config.nix
Normal file
31
modules/notifications/nvim-notify/config.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notify.nvim-notify;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["nvim-notify"];
|
||||
|
||||
vim.luaConfigRC.nvim-notify = nvim.dag.entryAnywhere ''
|
||||
require('notify').setup {
|
||||
stages = "${cfg.stages}",
|
||||
timeout = ${toString cfg.timeout},
|
||||
background_colour = "${cfg.background_colour}",
|
||||
position = "${cfg.position}",
|
||||
icons = {
|
||||
ERROR = "${cfg.icons.ERROR}",
|
||||
WARN = "${cfg.icons.WARN}",
|
||||
INFO = "${cfg.icons.INFO}",
|
||||
DEBUG = "${cfg.icons.DEBUG}",
|
||||
TRACE = "${cfg.icons.TRACE}",
|
||||
},
|
||||
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/notifications/nvim-notify/default.nix
Normal file
6
modules/notifications/nvim-notify/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./nvim-notify.nix
|
||||
];
|
||||
}
|
45
modules/notifications/nvim-notify/nvim-notify.nix
Normal file
45
modules/notifications/nvim-notify/nvim-notify.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.notify.nvim-notify;
|
||||
in {
|
||||
options.vim.notify.nvim-notify = {
|
||||
enable = mkEnableOption "Enable nvim-notify plugin";
|
||||
stages = mkOption {
|
||||
type = types.enum ["fade_in_slide_out" "fade_in" "slide_out" "none"];
|
||||
default = "fade_in_slide_out";
|
||||
description = "The stages of the notification";
|
||||
};
|
||||
timeout = mkOption {
|
||||
type = types.int;
|
||||
default = 1000;
|
||||
description = "The timeout of the notification";
|
||||
};
|
||||
background_colour = mkOption {
|
||||
type = types.str;
|
||||
default = "#000000";
|
||||
description = "The background colour of the notification";
|
||||
};
|
||||
position = mkOption {
|
||||
type = types.enum ["top_left" "top_right" "bottom_left" "bottom_right"];
|
||||
default = "top_right";
|
||||
description = "The position of the notification";
|
||||
};
|
||||
icons = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = {
|
||||
ERROR = "";
|
||||
WARN = "";
|
||||
INFO = "";
|
||||
DEBUG = "";
|
||||
TRACE = "";
|
||||
};
|
||||
description = "The icons of the notification";
|
||||
};
|
||||
};
|
||||
}
|
5
modules/rich-presence/default.nix
Normal file
5
modules/rich-presence/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
imports = [
|
||||
./presence-nvim
|
||||
];
|
||||
}
|
41
modules/rich-presence/presence-nvim/config.nix
Normal file
41
modules/rich-presence/presence-nvim/config.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.presence.presence-nvim;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["presence-nvim"];
|
||||
|
||||
vim.luaConfigRC.presence-nvim = nvim.dag.entryAnywhere ''
|
||||
-- Description of each option can be found in https://github.com/andweeb/presence.nvim
|
||||
require("presence").setup({
|
||||
-- General options
|
||||
auto_update = true,
|
||||
neovim_image_text = "${cfg.image_text}",
|
||||
main_image = "${cfg.main_image}",
|
||||
client_id = "${cfg.client_id}",
|
||||
log_level = nil,
|
||||
debounce_timeout = 10,
|
||||
enable_line_number = "${boolToString cfg.enable_line_number}",
|
||||
blacklist = {},
|
||||
buttons = "${boolToString cfg.buttons}",
|
||||
file_assets = {},
|
||||
show_time = "${boolToString cfg.show_time}",
|
||||
|
||||
-- Rich Presence text options
|
||||
editing_text = "${cfg.rich_presence.editing_text}",
|
||||
file_explorer_text = "${cfg.rich_presence.file_explorer_text}",
|
||||
git_commit_text = "${cfg.rich_presence.git_commit_text}",
|
||||
plugin_manager_text = "${cfg.rich_presence.plugin_manager_text}",
|
||||
reading_text = "${cfg.rich_presence.reading_text}",
|
||||
workspace_text = "${cfg.rich_presence.workspace_text}",
|
||||
line_number_text = "${cfg.rich_presence.line_number_text}",
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./presence-nvim.nix
|
||||
];
|
||||
}
|
|
@ -96,35 +96,4 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["presence-nvim"];
|
||||
|
||||
vim.luaConfigRC.presence-nvim = nvim.dag.entryAnywhere ''
|
||||
-- Description of each option can be found in https://github.com/andweeb/presence.nvim
|
||||
require("presence").setup({
|
||||
-- General options
|
||||
auto_update = true,
|
||||
neovim_image_text = "${cfg.image_text}",
|
||||
main_image = "${cfg.main_image}",
|
||||
client_id = "${cfg.client_id}",
|
||||
log_level = nil,
|
||||
debounce_timeout = 10,
|
||||
enable_line_number = "${boolToString cfg.enable_line_number}",
|
||||
blacklist = {},
|
||||
buttons = "${boolToString cfg.buttons}",
|
||||
file_assets = {},
|
||||
show_time = "${boolToString cfg.show_time}",
|
||||
|
||||
-- Rich Presence text options
|
||||
editing_text = "${cfg.rich_presence.editing_text}",
|
||||
file_explorer_text = "${cfg.rich_presence.file_explorer_text}",
|
||||
git_commit_text = "${cfg.rich_presence.git_commit_text}",
|
||||
plugin_manager_text = "${cfg.rich_presence.plugin_manager_text}",
|
||||
reading_text = "${cfg.rich_presence.reading_text}",
|
||||
workspace_text = "${cfg.rich_presence.workspace_text}",
|
||||
line_number_text = "${cfg.rich_presence.line_number_text}",
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
_: {
|
||||
imports = [
|
||||
./nvim-session-manager.nix
|
||||
./nvim-session-manager
|
||||
];
|
||||
}
|
||||
|
|
|
@ -8,10 +8,6 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.session.nvim-session-manager;
|
||||
in {
|
||||
options.vim.session.nvim-session-manager = {
|
||||
enable = mkEnableOption "Enable nvim-session-manager";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["nvim-session-manager"];
|
||||
|
6
modules/session/nvim-session-manager/default.nix
Normal file
6
modules/session/nvim-session-manager/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./nvim-session-manager.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.session.nvim-session-manager;
|
||||
in {
|
||||
options.vim.session.nvim-session-manager = {
|
||||
enable = mkEnableOption "Enable nvim-session-manager";
|
||||
};
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
_: {
|
||||
imports = [
|
||||
./vsnip.nix
|
||||
./vsnip
|
||||
];
|
||||
}
|
||||
|
|
14
modules/snippets/vsnip/config.nix
Normal file
14
modules/snippets/vsnip/config.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.snippets.vsnip;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["vim-vsnip"];
|
||||
};
|
||||
}
|
5
modules/snippets/vsnip/default.nix
Normal file
5
modules/snippets/vsnip/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
imports = [
|
||||
./vsnip.nix
|
||||
];
|
||||
}
|
|
@ -11,8 +11,4 @@ in {
|
|||
options.vim.snippets.vsnip = {
|
||||
enable = mkEnableOption "Enable vim-vsnip";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["vim-vsnip"];
|
||||
};
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
_: {
|
||||
imports = [
|
||||
./nvim-bufferline.nix
|
||||
./nvim-bufferline
|
||||
];
|
||||
}
|
||||
|
|
|
@ -8,10 +8,6 @@ with lib;
|
|||
with builtins; let
|
||||
cfg = config.vim.tabline.nvimBufferline;
|
||||
in {
|
||||
options.vim.tabline.nvimBufferline = {
|
||||
enable = mkEnableOption "nvim-bufferline-lua";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (
|
||||
let
|
||||
mouse = {
|
6
modules/tabline/nvim-bufferline/default.nix
Normal file
6
modules/tabline/nvim-bufferline/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./nvim-bufferline.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue