Compare commits

..

98 Commits

Author SHA1 Message Date
diniamo 5a90539944
Merge b30cf04904 into 4ee562d438 2024-06-16 12:00:30 +00:00
diniamo b30cf04904 tabline/bufferline: add back bindings 2024-06-16 14:00:24 +02:00
diniamo b5d8e58282 tabline/bufferline: add missing options 2024-06-16 13:49:22 +02:00
Frothy 3ceefe8849 lib: avoid filtering null values to be used as nil 2024-06-16 13:49:22 +02:00
NotAShelf 4ee562d438 tabline/bufferline: convert to setupOpts
this is pretty much WIP and contains a bunch of bugs that I haven't tackled yet.
2024-06-15 02:41:50 +02:00
raf a86c59457c
Merge pull request #303 from diniamo/which-key-register-allow-null
which-key: allow null in registers
2024-06-12 06:14:15 +00:00
diniamo a437dbd158 which-key: allow null in registers 2024-06-12 01:24:03 +02:00
raf c1b3900846
Merge pull request #302 from diniamo/fix-flake-nix-typo
flake: fix typo
2024-06-10 07:47:50 +00:00
diniamo 9cff1b03d6 flake: fix typo 2024-06-10 09:33:45 +02:00
NotAShelf dfa2718bb3
flake: bump nixpkgs input 2024-06-09 12:07:26 +03:00
raf fcab30e7bb
Merge pull request #301 from rice-cracker-dev/patch-1
languages: changed python lsp package to pyright
2024-06-09 09:06:15 +00:00
Phan Đăng Khoa 68b0647936
languages: changed python lsp package to pyright 2024-06-09 15:57:55 +07:00
NotAShelf c50522f6b0
languages: avoid using package aliases 2024-06-08 19:44:25 +03:00
raf ae45cdf92a
Merge pull request #300 from jacekpoz/main
Emac
2024-06-08 16:07:15 +00:00
jacekpoz 8eb8326bd6
plugins/orgmode: fix typo 2024-06-08 17:58:08 +02:00
NotAShelf 200a45ec73
flake: update inputs
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/04496f014fcf27fdcede464d5de8558e12b5710c?narHash=sha256-ewjE7eVBVmjh8faip3RW%2BI3WzQZ3iywQVyxZfjunfH0%3D' (2024-05-18)
  → 'github:nixos/nixpkgs/b5995681aa319d0e33a6d83a31710d6c6f092820?narHash=sha256-mdBp0b4VIQ71aUK2uBRROUkENk93RUUubjlQkvskNO0%3D' (2024-05-26)
• Updated input 'plugin-catppuccin':
    'github:catppuccin/nvim/d97387aea8264f484bb5d5e74f2182a06c83e0d8?narHash=sha256-aRrhVHQSCyo1Ti1j8ogWJ8e0eJWiTw5%2BabIpyUxky/M%3D' (2024-05-08)
  → 'github:catppuccin/nvim/5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe?narHash=sha256-UDPS%2B1o8FQGkfqiG4GX4DNUI2pU5hIvagmfnWTKDb44%3D' (2024-05-26)
• Updated input 'plugin-diffview-nvim':
    'github:sindrets/diffview.nvim/9bdd5537575c2ea7925b71ae06585b934beea13d?narHash=sha256-jbAeMJRybHQnsmTY2xeca4QJXXxdYVEK83d8NUSSnfQ%3D' (2024-05-18)
  → 'github:sindrets/diffview.nvim/1ec7b56b959dab18f7030f541c33ae60e18a6f88?narHash=sha256-sCrswSN/ERirije4hukg81t%2BX8sVG6EnG8SPK/P1Bts%3D' (2024-05-24)
• Updated input 'plugin-dressing-nvim':
    'github:stevearc/dressing.nvim/572314728cb1ce012e825fd66331f52c94acac12?narHash=sha256-zL%2Bu9SUwzPZEYxaGZiRnezNUkcr8ZkdOMyGKSXF5xcQ%3D' (2024-05-16)
  → 'github:stevearc/dressing.nvim/3c38ac861e1b8d4077ff46a779cde17330b29f3a?narHash=sha256-AXY1%2BnA6Q/kWbuwOAqwVdd3QrjkHGVdVMHShvSIfLwM%3D' (2024-05-22)
• Updated input 'plugin-elixir-tools':
    'github:elixir-tools/elixir-tools.nvim/51eddb03a7a8c9f00d6415b356a4d3b75d8e75b6?narHash=sha256-U6db1n/RIpT7Dd54e9iI/PjO1BhDpMyNPfaph%2BdUk7k%3D' (2024-05-02)
  → 'github:elixir-tools/elixir-tools.nvim/815cf0b0aab0421f8490199c0dd7442d22a7c1b7?narHash=sha256-ESL/H/l5Yarcuo3MjBplKwox8E6CBxvWrpciyJeaES0%3D' (2024-05-23)
• Updated input 'plugin-fidget-nvim':
    'github:j-hui/fidget.nvim/a2ece932b663898d4015f458ce7ad92c389690ba?narHash=sha256-WT1KnFXC/jjd9tQEiJ7f5mU9FMK%2B%2BTSOItxZyl6G8GM%3D' (2024-05-18)
  → 'github:j-hui/fidget.nvim/ef99df04a1c53a453602421bc0f756997edc8289?narHash=sha256-Gpk/G0ByOAIE8uX4Xr94CvAjJBSJMEOwBuvrhmYYGsg%3D' (2024-05-19)
• Updated input 'plugin-flutter-tools':
    'github:akinsho/flutter-tools.nvim/c19f94576f866888f1b84aa73c690b30de4b86fb?narHash=sha256-nMP1LVUViKeL2BaYr/oAbqVKmOZ1SomWozKz4OYaovU%3D' (2024-05-18)
  → 'github:akinsho/flutter-tools.nvim/990a1349c29f7d474a0cd51355aba773ccc9deea?narHash=sha256-dRcWCqFHtDMOEGjKji3lxYQZKBhlhss/i51pX6FZxuI%3D' (2024-05-19)
• Updated input 'plugin-gitsigns-nvim':
    'github:lewis6991/gitsigns.nvim/805610a9393fa231f2c2b49cb521bfa413fadb3d?narHash=sha256-v21qTJfiv57vSUDGCJ4wM%2BL0Ixwh2b3pkoESFAHBrDM%3D' (2024-05-06)
  → 'github:lewis6991/gitsigns.nvim/cdfcd9d39d23c46ae9a040de2c6a8b8bf868746e?narHash=sha256-TTC3uvRsq4v6PBdS/3YAGpyhVt0w3/SGkPE3fu1zW94%3D' (2024-05-23)
• Updated input 'plugin-gruvbox':
    'github:ellisonleao/gruvbox.nvim/4f8e2dc9e8cdfdd3a988227c2c347043a46f51a4?narHash=sha256-BDBNeXf189K7l53IaWKWo0eta79cAuYKW0kP6jYfV1w%3D' (2024-05-17)
  → 'github:ellisonleao/gruvbox.nvim/96a8ec336fb48a11cefbd57508888361431aac26?narHash=sha256-BLhZGijGF03UFiyMJ66C1ZLDRqAo1C80ekHcBm1PGoY%3D' (2024-05-18)
• Updated input 'plugin-image-nvim':
    'github:3rd/image.nvim/da64ce69598875c9af028afe129f916b02ccc42e?narHash=sha256-2f7ss/QTohYSp0EqaFnBtQeOjI%2B3fIn%2BWmgy/TcfbDk%3D' (2024-05-17)
  → 'github:3rd/image.nvim/2a618c86d9f8fd9f7895d12b55ec2f31fd14fa05?narHash=sha256-6nFzUchDQIvaTOv4lZ10q66m/ntU3dgVnlfBRodW%2B0Y%3D' (2024-05-21)
• Updated input 'plugin-indent-blankline':
    'github:lukas-reineke/indent-blankline.nvim/ece00d5fb44d196680a81fd2761062d2fa44663b?narHash=sha256-qlFoZ/GDsbnIhMoT%2BesNxheC3I9guxiV2DQYlY9kcMM%3D' (2024-05-18)
  → 'github:lukas-reineke/indent-blankline.nvim/d98f537c3492e87b6dc6c2e3f66ac517528f406f?narHash=sha256-K5y0UQAXc0N6%2B1kqncX2eClpvZb7jlg7GhSerHQVZX0%3D' (2024-05-23)
• Updated input 'plugin-leap-nvim':
    'github:ggandor/leap.nvim/b1ecfb63c0b8babfd0dcd6b5ca6de37bbf3526cd?narHash=sha256-vRL%2B%2BRVDywO6nP5dHQiO1NSQ17SMmHm4AgjTQfv642o%3D' (2024-05-14)
  → 'github:ggandor/leap.nvim/8f4d3ab9fe5c906c5745150191831c5ee0a427a0?narHash=sha256-O/wN5v8GhlEECBIhJQvWhKcpQrqT7J%2BBNkd/fIh0TIQ%3D' (2024-05-20)
• Updated input 'plugin-lsp-lines':
    'sourcehut:~whynothugo/lsp_lines.nvim/d2facc98064934ebd480cd563212a84d957075fe?narHash=sha256-C3m91uwldDwaZlYjb6j2sPlvO6ADqhl0AmUWZVYEDHo%3D' (2024-05-17)
  → 'sourcehut:~whynothugo/lsp_lines.nvim/7d9e2748b61bff6ebba6e30adbc7173ccf21c055?narHash=sha256-QsvmPOer7JgO7Y%2BN/iaNJD7Kmy69gnlV4CeyaQesNvA%3D' (2024-05-19)
• Updated input 'plugin-lsp-signature':
    'github:ray-x/lsp_signature.nvim/aed5d1162b0f07bb3af34bedcc5f70a2b6466ed8?narHash=sha256-f4AuZnt2m2VA90baSbZt6%2BelzjXmJKPFTO28v8auoYc%3D' (2024-05-10)
  → 'github:ray-x/lsp_signature.nvim/529e8861d0410389f0163a5e5c2199d4a4ef5bf6?narHash=sha256-4Abo4HGwzZtqEHcS9lsQdw%2BDsn7tkQoeq5QyfTEEwnA%3D' (2024-05-25)
• Updated input 'plugin-noice-nvim':
    'github:folke/noice.nvim/9f6f6ba74f8bfbf7e43d6302cf86b070362f6203?narHash=sha256-/dtOpAjzgMJHSjV9AZcR991I/r9xaMnpg0/1c6NdItg%3D' (2024-05-18)
  → 'github:folke/noice.nvim/f119045f38792ad5311e5f9be7a879e4c1a95fe0?narHash=sha256-GrgFjVDIQcCfg5qyO6FnhlGUCrz6rwAFh81yZXUJra4%3D' (2024-05-23)
• Updated input 'plugin-nvim-autopairs':
    'github:windwp/nvim-autopairs/b0b79e42a28f09719a7da9534c3731fa37319d9b?narHash=sha256-qcfYChucUpRFKMfB%2BIphmIPzH/HgobVDK44wDtVXSnU%3D' (2024-05-16)
  → 'github:windwp/nvim-autopairs/c15de7e7981f1111642e7e53799e1211d4606cb9?narHash=sha256-YEAqjlzVrS/VLrkwGo3L7cNOE1LuyLYlBtkR2HA5oVk%3D' (2024-05-19)
• Updated input 'plugin-nvim-bufferline-lua':
    'github:akinsho/nvim-bufferline.lua/73540cb95f8d95aa1af3ed57713c6720c78af915?narHash=sha256-bHlmaNXfZTlTm/8v48FwCde9ljZFLv25efYF5355bnw%3D' (2024-04-22)
  → 'github:akinsho/nvim-bufferline.lua/99337f63f0a3c3ab9519f3d1da7618ca4f91cffe?narHash=sha256-8PCkY1zrlMrPGnQOb7MjqDXNlkeX46jrT4ScIL%2BMOwM%3D' (2024-05-24)
• Updated input 'plugin-nvim-dap':
    'github:mfussenegger/nvim-dap/5a2f7121869394502521c52b2bc581ab22c69447?narHash=sha256-UZm2DA19uBeL2L5JKAZilqBTTPSA5X3ZEcAVJUq65p8%3D' (2024-05-16)
  → 'github:mfussenegger/nvim-dap/922ebc75c2fa9305e36402fbd8c984c8638770a0?narHash=sha256-uzivFy0ZNLxAXDqkYNrNy1SSHPRrGv3OLVCNCRDiikU%3D' (2024-05-26)
• Updated input 'plugin-nvim-dap-ui':
    'github:rcarriga/nvim-dap-ui/5934302d63d1ede12c0b22b6f23518bb183fc972?narHash=sha256-26g4dlxzTGaR5OrXpPo4A2erM/eSkgedb0Bl2pK362M%3D' (2024-04-28)
  → 'github:rcarriga/nvim-dap-ui/334cf3038c4756e6ab999cbac67c847fb654c190?narHash=sha256-paiyLNzqUq9G3U8qn8yl1AjHJzTTa17exA05QO09nGA%3D' (2024-05-20)
• Updated input 'plugin-nvim-lspconfig':
    'github:neovim/nvim-lspconfig/6d2ae9fdc3111a6e8fd5db2467aca11737195a30?narHash=sha256-Ofat8It2TCjxnMPHmQ5fZTeJDpMTIrDMGHXle66IWe8%3D' (2024-05-18)
  → 'github:neovim/nvim-lspconfig/b972e7154bc94ab4ecdbb38c8edbccac36f83996?narHash=sha256-PMMqPDnq4Q8gWeKQ2WPE%2BpOf1R1G61wJ%2BbAWkHpQlzE%3D' (2024-05-23)
• Updated input 'plugin-nvim-navbuddy':
    'github:SmiteshP/nvim-navbuddy/f34237e8a41ebc6e2716af2ebf49854d8c5289c8?narHash=sha256-EZXzFjGsZHkb2Ui5uvOottPHA8X15F6xyikab4dBlYk%3D' (2024-03-24)
  → 'github:SmiteshP/nvim-navbuddy/f22bac988f2dd073601d75ba39ea5636ab6e38cb?narHash=sha256-sZ1M27qNbLMHKR4Zu0NfJoBcQxJbhmW7Cx74Acirlww%3D' (2024-05-19)
• Updated input 'plugin-nvim-nio':
    'github:nvim-neotest/nvim-nio/8765cbc4d0c629c8158a5341e1b4305fd93c3a90?narHash=sha256-VfoJOXXtMhalFcnfhVzweq7TVmB8WjRP%2BZ5Z5Z24Pzc%3D' (2024-05-02)
  → 'github:nvim-neotest/nvim-nio/632024157d01e8bc48fd7df6a7de8ffe3fdd4f3a?narHash=sha256-UffuTu7mF96LHk0MQRNrsgDyo1QWa/1i5eJKjZkuG8k%3D' (2024-05-22)
• Updated input 'plugin-nvim-session-manager':
    'github:Shatur/neovim-session-manager/a0b9d25154be573bc0f99877afb3f57cf881cce7?narHash=sha256-SrJJWC/newJRB879zMUbLzOJQ8qtcHfLF/7GLPFlSRQ%3D' (2024-05-11)
  → 'github:Shatur/neovim-session-manager/b552ee8667037be5d0291229279a35af25e515fb?narHash=sha256-A6oHIg8PG84L7QIRpo9WXKzMq4EUe92jQIxObOxpFmg%3D' (2024-05-24)
• Updated input 'plugin-nvim-tree-lua':
    'github:nvim-tree/nvim-tree.lua/2bc725a3ebc23f0172fb0ab4d1134b81bcc13812?narHash=sha256-YqHAEztx6gEEm0GoDXC5djnIP030oGGRcskp8LPqVoc%3D' (2024-05-14)
  → 'github:nvim-tree/nvim-tree.lua/517e4fbb9ef3c0986da7047f44b4b91a2400f93c?narHash=sha256-E6J9d0LJMK%2BOwj/iWbGVZBiVL/NI1xd5P0NNQpUmXj4%3D' (2024-05-26)
• Updated input 'plugin-nvim-treesitter-context':
    'github:nvim-treesitter/nvim-treesitter-context/55e29081e73d2e4b2d62fb4dc3eebe21bf66a1e2?narHash=sha256-CriN45mFfyjTt14RJnmzXidACHJXUaA6XPwAoEtQUzg%3D' (2024-05-17)
  → 'github:nvim-treesitter/nvim-treesitter-context/f62bfe19e0fbc13ae95649dfb3cf22f4ff85b683?narHash=sha256-EY5Si6t7LXcxOP3ubGAAMd3lgbeaCOCIybSKi1Ucx98%3D' (2024-05-22)
• Updated input 'plugin-nvim-ts-autotag':
    'github:windwp/nvim-ts-autotag/aeb7090098722ffce16597bd0331105495640153?narHash=sha256-gh%2BDhC7%2B8O4z4lG/RIaMJgumnq/Vg5eWa6j/P8MQk0s%3D' (2024-05-18)
  → 'github:windwp/nvim-ts-autotag/8ae54b90e36ef1fc5267214b30c2cbff71525fe4?narHash=sha256-gy6OVR2iH361XMDDo0dqxJsAxo%2B5nXr3wP42pieeCUg%3D' (2024-05-22)
• Updated input 'plugin-nvim-web-devicons':
    'github:nvim-tree/nvim-web-devicons/e37bb1feee9e7320c76050a55443fa843b4b6f83?narHash=sha256-1trRSUVyWFl3K%2B7xHXQGNl/EwE0ggyigQpZ%2BkmRPsk8%3D' (2024-05-13)
  → 'github:nvim-tree/nvim-web-devicons/b77921fdc44833c994fdb389d658ccbce5490c16?narHash=sha256-fmbsnNVZ6nBorBILwPfEgcDDWZCkh9YZH/aC343FxP4%3D' (2024-05-25)
• Updated input 'plugin-obsidian-nvim':
    'github:epwalsh/obsidian.nvim/7b59d907a3ee6952c58e07139cf021a205692338?narHash=sha256-PiaPmQ11Wx57ojCG4G50Rwr%2BphanvuoBqbPHg3N4eGw%3D' (2024-05-17)
  → 'github:epwalsh/obsidian.nvim/0890a3f4e1711d98b5aa78bf40d2c5b81ef3c39f?narHash=sha256-R7q3PmDMYQtDTE1JZgQtvArBq55MnvNdcChOsuivSCo%3D' (2024-05-23)
• Updated input 'plugin-orgmode-nvim':
    'github:nvim-orgmode/orgmode/dbcff9e8d9df48bfff95f7204ca483c11864a755?narHash=sha256-vhygnZNJceJHq4gQm6h0zv/Cgp9%2BfSeWuL1Varrws1U%3D' (2024-05-17)
  → 'github:nvim-orgmode/orgmode/cb3c9bf6caf3411af88a9a1a0b7eb9be57b9741c?narHash=sha256-3xsdklkUuJwUzUieZT6eGIgDZUdVEGeyhxxUe99TOAA%3D' (2024-05-26)
• Updated input 'plugin-plenary-nvim':
    'github:nvim-lua/plenary.nvim/08e301982b9a057110ede7a735dd1b5285eb341f?narHash=sha256-vy0MXEoSM4rvYpfwbc2PnilvMOA30Urv0FAxjXuvqQ8%3D' (2024-04-25)
  → 'github:nvim-lua/plenary.nvim/a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683?narHash=sha256-5Jf2mWFVDofXBcXLbMa417mqlEPWLA%2BcQIZH/vNEV1g%3D' (2024-05-20)
• Updated input 'plugin-rose-pine':
    'github:rose-pine/neovim/b6fe88c3282cf9f117a3e836d761c2d78d02f417?narHash=sha256-AdPSz5%2BnCOnLWexBasHuxRxEKbL4WVg%2BuV78//W5nLs%3D' (2024-05-14)
  → 'github:rose-pine/neovim/87aa437172357ad8f916942bca249ceadc6c68b1?narHash=sha256-mpBx0R9tR4KrOMO9J0gg2aOeHtiU9zK8xoa7Ebkx0n8%3D' (2024-05-26)
• Updated input 'plugin-telescope':
    'github:nvim-telescope/telescope.nvim/0c12735d5aff6a48ffd8111bf144dc2ff44e5975?narHash=sha256-%2Bh0L5vpwXFNDuzE5Dne5zWuKtZ1mquAhdplHcUxPg8w%3D' (2024-05-17)
  → 'github:nvim-telescope/telescope.nvim/349660c0d35da06459ee8589af77de2086b652ce?narHash=sha256-JXdpKfrSvrzpTqy%2Bg9Bg85/vIDTUZfDr%2BZhxH8wJDxA%3D' (2024-05-26)
• Updated input 'plugin-todo-comments':
    'github:folke/todo-comments.nvim/a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d?narHash=sha256-BJNU01iTRDNrPv48fgiJRS%2BouaHkoqw2AYXKDRgDzfw%3D' (2024-03-27)
  → 'github:folke/todo-comments.nvim/e1549807066947818113a7d7ed48f637e49620d3?narHash=sha256-ZJp0emoHogSdhXPIH74MH4CznxhCmMbO243dqxAZMJo%3D' (2024-05-22)
• Updated input 'plugin-toggleterm-nvim':
    'github:akinsho/toggleterm.nvim/066cccf48a43553a80a210eb3be89a15d789d6e6?narHash=sha256-mM5bGgAemsRJD9U6U5K6ia5qb8NaTusM99x6xrtEBfw%3D' (2024-04-22)
  → 'github:akinsho/toggleterm.nvim/fee58a0473fd92b28c34f8f724e4918b15ba30a3?narHash=sha256-h82zisizLm0FOt4l8lzgC/spFk3R5Gx25A5YgULwW8U%3D' (2024-05-19)
• Updated input 'plugin-tokyonight':
    'github:folke/tokyonight.nvim/634015fff1457ed66cf5364213a2bbbc51a82d6c?narHash=sha256-lJjBsAguMDA765lfxfUwU0I0tWmAESLCv9yiVrhTYDo%3D' (2024-05-16)
  → 'github:folke/tokyonight.nvim/0fae425aaab04a5f97666bd431b96f2f19c36935?narHash=sha256-ZWxK0q8kUYHOk%2BykH1m4901trnuHN8O9hkOZR6HdC%2BY%3D' (2024-05-26)
• Updated input 'plugin-trouble':
    'github:folke/trouble.nvim/b9cf677f20bb2faa2dacfa870b084e568dca9572?narHash=sha256-kIQ72fqAsiMF9jq0MzC6peaHJddYn5PRNXfYFHTQB5Q%3D' (2024-03-29)
  → 'github:folke/trouble.nvim/a8264a65a0b894832ea642844f5b7c30112c458f?narHash=sha256-D3dqI4NRgEG4BCDLQ3ci9lgYxt90XyWDQXlk4/uuR6M%3D' (2024-05-19)
• Updated input 'plugin-vim-fugitive':
    'github:tpope/vim-fugitive/5a9bd42dd8dd127779f3cd8982a0419b7ca9c7f5?narHash=sha256-517q3oPvshwUBhXEDuB23S0RPuHvSZWK/1tr6wDhEyA%3D' (2024-05-17)
  → 'github:tpope/vim-fugitive/4f59455d2388e113bd510e85b310d15b9228ca0d?narHash=sha256-nyNtb3nsS/zFdSNRyXabcGIabAwgivJIUFB2c62vXmA%3D' (2024-05-19)
• Updated input 'zig':
    'github:mitchellh/zig-overlay/03303bf01701b04ec87c55ce5d8d6f5ecf86d0a7?narHash=sha256-CCqc3c3yvXgRaTW18epSHlF2HeikwNXqxnlrRs2sl3Y%3D' (2024-05-15)
  → 'github:mitchellh/zig-overlay/93b02a697561ecd438cfa5779727b5a1c300cb4c?narHash=sha256-LIz08gALt2wlutGXAEhNroEoIuPV5ePQB8LI4WzXcy8%3D' (2024-05-26)
2024-05-27 03:31:42 +03:00
Frothy 08547724e4
modules/theme: use inherited `optionalString` 2024-05-25 20:37:51 +03:00
raf 5748bb5eb9
Merge pull request #299 from FrothyMarrow/transparent-oxocarbon
theme: add minimal transparency support for oxocarbon
2024-05-23 14:30:47 +00:00
Frothy 367320dcd9 docs: add entry for transparency support for oxocarbon 2024-05-23 10:28:06 -04:00
Frothy fc4e471490 theme: add minimal transparency support for oxocarbon 2024-05-23 10:28:04 -04:00
Yoni Firroloni 1061c920be
docs: add quirk about using nodejs (#298)
* doc: add quircks about nodejs

* doc: make shorter sentences
2024-05-23 01:32:12 +00:00
NotAShelf 9bbdb8d48a
docs/manual: add plugins page
This should be helpful for listing known plugin behaviour where the behaviour is undesirable, but also unfixable
2024-05-23 03:27:23 +03:00
NotAShelf f9343f1bc7
statusline/lualine: equalize padding 2024-05-23 03:20:21 +03:00
raf 6624841e63
Merge pull request #283 from horriblename/fix-colorizer
Fix colorizer
2024-05-22 01:22:05 +00:00
Ching Pei Yang 9baebb0d82 colorizer: remove unneeded freeform module 2024-05-21 22:55:54 +02:00
Frothy 2c9a9b4d29
Merge pull request #289 from horriblename/lua-include-empty-attrs
lib: do not filter out empty attrs in toLuaObject
2024-05-21 07:16:03 -04:00
Frothy 68ca227a87 lib: remove alias `lib.warn` 2024-05-21 07:08:17 -04:00
Frothy 69257c03a3 docs: add entry for `__empty` deprecation 2024-05-21 06:55:46 -04:00
Frothy ac20dfbdd4 lib: add deprecation warning for `__empty` 2024-05-21 06:51:56 -04:00
raf 9074b6e5e7
Merge pull request #295 from NotAShelf/dependabot/github_actions/cachix/cachix-action-15
build(deps): bump cachix/cachix-action from 14 to 15
2024-05-21 07:36:16 +00:00
dependabot[bot] 011f662fa0
---
updated-dependencies:
- dependency-name: cachix/cachix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-20 19:43:05 +00:00
raf f59a915da9
Merge pull request #294 from NotAShelf/smaller-nixpkgs-input
flake: switch to nixos-unstable-small
2024-05-18 21:50:55 +00:00
NotAShelf 60d9ebb3f0
flake: bump plugin inputs 2024-05-19 00:44:13 +03:00
NotAShelf bb06827474
flake: switch to nixos-unstable-small 2024-05-18 16:45:56 +03:00
Ching Pei Yang af72dc105d lib: remove unused __empty special case in toLuaObject 2024-05-18 14:52:40 +02:00
NotAShelf 9d0247c599
statusline/lualine: add a left separator to the `searchcount` component 2024-05-17 19:10:58 +03:00
NotAShelf f0f2c08e9f
lsp/null-ls: use string type for diagnostic format 2024-05-16 19:35:19 +03:00
NotAShelf cfbed8ceb1
modules/wrapper: remove redundant instances of `literalExpression` 2024-05-16 19:13:44 +03:00
NotAShelf 1ce25d7ca3
modules: reorder args 2024-05-16 19:11:39 +03:00
NotAShelf eefc7a9d1d
lsp/null-lsp: allow null-ls options to be configured
This should probably still be converted to setupOpts. Missing docs
2024-05-16 19:11:37 +03:00
NotAShelf 74c94b8a54
flake: fix recursive module alias 2024-05-16 19:11:36 +03:00
raf 74df3a5f03
Merge pull request #292 from jacekpoz/main
languages/ocaml: init
2024-05-16 13:32:44 +00:00
jacekpoz 7224c1e6af
languages/ocaml: add ocaml to maximal config 2024-05-16 14:39:43 +02:00
jacekpoz f343ab8b3a
languages/ocaml: add formatter to nvf's env 2024-05-16 14:25:23 +02:00
jacekpoz 208d1e6741
languages/ocaml: follow other languages' format 2024-05-16 14:25:07 +02:00
NotAShelf 493854e44f
lualine: improve consistency between components; add more diagnostic sources 2024-05-16 07:45:15 +03:00
jacekpoz cc0aba4e21
languages/ocaml: add formatting support 2024-05-15 21:09:46 +02:00
jacekpoz db810bbf9f
languages/ocaml: init 2024-05-15 20:40:15 +02:00
raf 1fd4a2a1b8
Merge pull request #291 from NotAShelf/lualine-refactor
lualine: increase theme compatibility; fix component definitions
2024-05-15 15:38:15 +00:00
NotAShelf 7cafa56cdb
docs: update 0.7 release notes 2024-05-15 13:09:46 +03:00
NotAShelf b5f38b8e5e
lualine: increase theme compatibility; fix component definitions 2024-05-15 13:09:45 +03:00
NotAShelf 355d4830e5
flake: update inputs 2024-05-15 13:09:19 +03:00
Ching Pei Yang 8aa3a23e97 lib: do not filter out empty attrs in toLuaObject 2024-05-12 03:17:04 +02:00
Ching Pei Yang 7d9f1e0481 colorizer: add example 2024-05-12 03:15:04 +02:00
Ching Pei Yang 82e92a56da colorizer: move back to setupOpts 2024-05-12 02:11:59 +02:00
Ching Pei Yang 981fe07075 colorizer: allow null for all options 2024-05-12 01:46:57 +02:00
raf 2615c568f8
Merge pull request #288 from NotAShelf/additional-luafile
wrapper/rc: add vim.extraLuaFiles
2024-05-10 12:37:47 +00:00
NotAShelf 407ecf00d5
wrapper/rc: add `vim.additionaLuafiles`
Allows the user to specify a list of lua files that will be called via `luafile`. All paths
that are passed to this option are checked by `builtins.isPath` so attempting to source paths
that do not exist do not result in a broken Lua configuration.
2024-05-09 00:44:58 +03:00
NotAShelf 7c1a8e2c1e
flake: bump inputs 2024-05-08 23:05:58 +03:00
NotAShelf ea5f229efd
languages/markdown: convert extra ft list to lua table 2024-05-08 00:31:23 +03:00
NotAShelf 41f7abcdc3
languagess/markdown: add missing `config` section 2024-05-08 00:22:12 +03:00
NotAShelf a85bf963e6
CI: don't build tidal output 2024-05-07 23:57:09 +03:00
raf 26755a6b93
Merge pull request #286 from NotAShelf/minor-lang-refactor
modules/languages: minor refactor; add bash formatter
2024-05-07 20:53:35 +00:00
NotAShelf 96b92b5652
configuration.nix: disable nim by default
It is broken on Darwin, and pkgs is not in scope here to check
2024-05-07 15:40:08 +03:00
NotAShelf 544c98a03b
Merge branch 'main' of github.com:NotAShelf/nvf into minor-lang-refactor 2024-05-07 01:04:47 +03:00
NotAShelf e96897f6b3
languages/elixir: readd; format module options 2024-05-07 00:52:33 +03:00
raf 12fd9d69dc
Merge pull request #287 from FrothyMarrow/mappings-fix
plugins/lsp: filter out null mappings
2024-05-06 21:42:22 +00:00
Frothy dc0fa76295 docs: entry for fixed null lsp mappings 2024-05-06 17:01:16 -04:00
NotAShelf e0790f2bdb
docs: remove remaining references to elixir & vim-tidal related pkgs 2024-05-06 23:43:35 +03:00
NotAShelf bf090172d2
modules/extra: init deprecations module; warn for elixir & vim-tidal 2024-05-06 23:43:34 +03:00
NotAShelf 7481423bed
docs: update 0.7 release notes 2024-05-06 23:43:33 +03:00
NotAShelf 6eba2a5585
languages: move bash & dart configurations to standalone files 2024-05-06 23:43:32 +03:00
NotAShelf 1847b9f1bf
languages/tidal: remove 2024-05-06 23:43:31 +03:00
NotAShelf d06ff3d7db
languages/markdown: move to standalone file; add deno formatter 2024-05-06 23:43:30 +03:00
Frothy 83583e9b64 plugins/lsp: filter out null mappings 2024-05-06 16:05:43 -04:00
raf efd8b44ce1
Merge pull request #284 from FrothyMarrow/del-dupl-telescope
utility/telescope: remove duplicate telescope module
2024-05-06 12:53:12 +00:00
Frothy 9fe96ce010 utility/telescope: remove duplicate telescope module 2024-05-06 08:46:04 -04:00
raf a777941eed
Merge pull request #280 from NotAShelf/rename-module-opts
flake/modules: alias `programs.nvf` to `programs.neovim-flake`
2024-05-06 06:54:59 +00:00
raf a20f84edfb
Merge pull request #278 from horriblename/fix-ts-context-keybind
treesitter: fix ts incremental selection keybinds
2024-05-05 00:42:35 +00:00
Ching Pei Yang 666de6a5be docs: update changelog 2024-05-05 02:38:26 +02:00
Pei Yang Ching 3ad560ea30 treesitter: fix ts context keybinds 2024-05-05 02:37:57 +02:00
Pei Yang Ching 2c37513012 colorizer: fix nonsense options 2024-05-05 02:18:19 +02:00
NotAShelf ab2685579a
flake/modules: alias `programs.nvf` to `programs.neovim-flake`
I will deprecate it in a future date, but for now it is fine.
2024-05-05 02:51:03 +03:00
raf 5b982fafa0
docs: fix missing header in README 2024-05-03 09:56:57 +00:00
NotAShelf d25492788c
Merge pull request #272 from FrothyMarrow/fix-fidget-overrides
visuals/fidget: use submodule for notification group overrides
2024-05-02 03:21:53 +00:00
Frothy e1edeb5189 docs: entry for modified type in fidget display overrides 2024-05-01 23:19:46 -04:00
Frothy 4df41ae0d0 visuals/fidget: use submodule for notification group overrides 2024-05-01 23:19:44 -04:00
NotAShelf 0ae4408fd8
Merge pull request #276 from NotAShelf/NotAShelf-patch-1
docs: fix license URLs
2024-05-01 18:52:03 +00:00
NotAShelf 32615fca69
docs: fix license URLs 2024-05-01 18:51:50 +00:00
NotAShelf 768449eff7
Merge pull request #275 from NotAShelf/NotAShelf-patch-1
nvf: let people pay me
2024-05-01 18:50:03 +00:00
NotAShelf 4d41469b3d
nvf: let people pay me
I initially removed the ability to fund me due to this project being a soft-fork of JordanIsaac's neovim-flake. However, the project has changed *enough* to justify it being a standalone and therefore unaffiliated project. With the number of commits and the time spent in mind, I am allowing funding again.
2024-05-01 18:49:47 +00:00
NotAShelf fbc138a51b
Merge pull request #273 from FrothyMarrow/typst-docs-entry
docs: add entry for typst language support
2024-05-01 16:08:19 +00:00
NotAShelf d5fde3f445
docs: wording 2024-05-01 16:05:12 +00:00
Frothy 90ee038794 docs: add entry for typst language support 2024-04-29 07:47:07 -04:00
NotAShelf f66a879dce
Merge pull request #274 from FrothyMarrow/disable-wakatime
configuration: disable wakatime in maximal output
2024-04-29 05:28:14 +00:00
Frothy ee240a1483 configuration: disable wakatime in maximal output 2024-04-28 22:33:00 -04:00
NotAShelf 94ffd5ec9f
Merge pull request #271 from FrothyMarrow/typst-lang-support
languages/typst: add typst language support
2024-04-28 20:23:33 +00:00
ItsSorae 4056deb411 languages/typst: add typst language support 2024-04-28 15:07:41 -04:00
62 changed files with 1493 additions and 1189 deletions

4
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,4 @@
github: NotAShelf
ko_fi: NotAShelf
liberapay: NotAShelf

10
.github/README.md vendored
View File

@ -1,6 +1,7 @@
<div align="center">
<img src="assets/nvf-logo-work.svg" alt="nvf Logo" width="200">
<h1 nvf</h1>
<br/>
<h1>nvf</h1>
</div>
<div align="center">
@ -182,9 +183,10 @@ recommend checking their work out.
## License
Following the [original neovim-flake](https://github.com/jordanisaacs/neovim-flake)
**nvf** has been made available under the **MIT License**. However, all assets
and documentation are published under the [CC BY License].
Following the license of the [original neovim-flake](https://github.com/jordanisaacs/neovim-flake),
**nvf** has been made available under the [**MIT License**](LICENSE). However, all assets
and documentation are published under the
[**CC BY License**](https://github.com/NotAShelf/nvf/blob/main/.github/assets/LICENSE).
---

View File

@ -19,7 +19,6 @@ jobs:
package:
- default
- nix
- tidal
- maximal
steps:
- uses: easimon/maximize-build-space@v10
@ -38,7 +37,7 @@ jobs:
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: cachix/cachix-action@v14
- uses: cachix/cachix-action@v15
with:
authToken: ${{ secrets.CACHIX_TOKEN }}
extraPullNames: nix-community

View File

@ -15,10 +15,6 @@ inputs: let
configuration.imports = modules;
};
tidalConfig = {
config.vim.languages.tidal.enable = true;
};
mainConfig = isMaximal: {
config.vim = {
viAlias = true;
@ -58,7 +54,16 @@ inputs: let
enableTreesitter = true;
enableExtraDiagnostics = true;
# Nim LSP is broken on Darwin and therefore
# should be disabled by default. Users may still enable
# `vim.languages.vim` to enable it, this does not restrict
# that.
# See: <https://github.com/PMunch/nimlsp/issues/178#issue-2128106096>
nim.enable = false;
nix.enable = true;
markdown.enable = isMaximal;
html.enable = isMaximal;
css.enable = isMaximal;
sql.enable = isMaximal;
@ -66,14 +71,14 @@ inputs: let
ts.enable = isMaximal;
svelte.enable = isMaximal;
go.enable = isMaximal;
elixir.enable = isMaximal;
zig.enable = isMaximal;
ocaml.enable = isMaximal;
python.enable = isMaximal;
dart.enable = isMaximal;
elixir.enable = isMaximal;
bash.enable = isMaximal;
terraform.enable = isMaximal;
nim.enable = false;
tailwind.enable = isMaximal;
typst.enable = isMaximal;
clang = {
enable = isMaximal;
lsp.server = "clangd";
@ -81,14 +86,14 @@ inputs: let
rust = {
enable = isMaximal;
crates.enable = true;
crates.enable = isMaximal;
};
};
visuals = {
enable = true;
nvimWebDevicons.enable = true;
scrollBar.enable = true;
scrollBar.enable = isMaximal;
smoothScroll.enable = true;
cellularAutomaton.enable = false;
fidget-nvim.enable = true;
@ -175,7 +180,7 @@ inputs: let
utility = {
ccc.enable = isMaximal;
vim-wakatime.enable = isMaximal;
vim-wakatime.enable = false;
icon-picker.enable = isMaximal;
surround.enable = isMaximal;
diffview-nvim.enable = true;
@ -251,5 +256,5 @@ inputs: let
};
};
in {
inherit neovimConfiguration mainConfig tidalConfig;
inherit neovimConfiguration mainConfig;
}

View File

@ -17,6 +17,10 @@ configuring.md
hacking.md
```
```{=include=} appendix html:into-file=//plugins.html
plugins.md
```
```{=include=} appendix html:into-file=//options.html
options.md
```

16
docs/manual/plugins.md Normal file
View File

@ -0,0 +1,16 @@
# Plugin specific quirks {#ch-plugins}
At times, certain plugins refuse to play nicely. Be it as a result of generating
lua from Nix, or the state of packaging. This page shall list any plugins that
are known to misbehave, and potential workarounds.
```{=include=} chapters
plugins/nodejs.md
```
<!--
If adding a new section, uncomment this part and add your page to
plugins/<page>.md
```{=include=} chapters
plugins/page.md
```
-->

View File

@ -0,0 +1,18 @@
# NodeJS {#ch-plugins-nodejs}
## eslint-plugin-prettier {#sec-eslint-plugin-prettier}
When working with NodeJS, everything works as expected, but some projects have settings that can fool nvf.
If [this plugin](https://github.com/prettier/eslint-plugin-prettier) or similar is included, you might get a situation where your eslint configuration diagnoses your formatting according to its own config (usually `.eslintrc.js`).
The issue there is your formatting is made via prettierd.
This results in auto-formating relying on your prettier config, while your eslint config diagnoses formatting [which it's not supposed to](https://prettier.io/docs/en/comparison.html))
In the end, you get discrepancies between what your editor does and what it wants.
Solutions are:
1. Don't add a formatting config to eslint, and separate prettier and eslint.
2. PR this repo to add an ESLint formatter and configure nvf to use it.

View File

@ -5,7 +5,6 @@ Below are the commands you may run to try out different configurations provided
configurations are provided:
- Nix
- Tidal
- Maximal
You may try out any of the provided configurations using the `nix run` command on a system where Nix is installed.
@ -22,7 +21,6 @@ once you garbage collect.
```console
$ nix run github:notashelf/nvf#nix
$ nix run github:notashelf/nvf#tidal
$ nix run github:notashelf/nvf#maximal
```
@ -33,10 +31,6 @@ $ nix run github:notashelf/nvf#maximal
`Nix` configuration by default provides LSP/diagnostic support for Nix alongisde a set of visual and functional plugins.
By running `nix run .#`, which is the default package, you will build Neovim with this config.
#### Tidal {#sec-configs-tidal}
Tidal is an alternative config that adds vim-tidal on top of the plugins from the Nix configuration.
#### Maximal {#sec-configs-maximal}
`Maximal` is the ultimate configuration that will enable support for more commonly used language as well as additional

View File

@ -10,4 +10,5 @@ rl-0.3.md
rl-0.4.md
rl-0.5.md
rl-0.6.md
rl-0.7.md
```

View File

@ -0,0 +1,51 @@
# Release 0.7 {#sec-release-0.7}
Release notes for release 0.7
## Changelog {#sec-release-0.7-changelog}
[ItsSorae](https://github.com/ItsSorae):
- Add support for [typst](https://typst.app/) under `vim.languages.typst` This
will enable the `typst-lsp` language server, and the `typstfmt` formatter
[frothymarrow](https://github.com/frothymarrow):
- Modified type for
[](#opt-vim.visuals.fidget-nvim.setupOpts.progress.display.overrides) from
`anything` to a `submodule` for better type checking.
- Fix null `vim.lsp.mappings` generating an error and not being filtered out.
- Add basic transparency support for `oxocarbon` theme by setting the
highlight group for `Normal`, `NormalFloat`, `LineNr`, `SignColumn` and
optionally `NvimTreeNormal` to `none`.
[horriblename](https://github.com/horriblename):
- Fix broken treesitter-context keybinds in visual mode
- Depcrecate use of `__empty` to define empty tables in lua. Empty attrset are
no longer filtered and thus should be used instead.
[NotAShelf](https://github.com/notashelf)
- Add `deno fmt` as the default Markdown formatter. This will be enabled
automatically if you have autoformatting enabled, but can be disabled manually
if you choose to.
- Add `vim.extraLuaFiles` for optionally sourcing additional lua files in your
configuration.
- Refactor `programs.languages.elixir` to use lspconfig and none-ls for LSP and
formatter setups respectively. Diagnostics support is considered, and may be
added once the [credo](https://github.com/rrrene/credo) linter has been added
to nixpkgs. A pull request is currently open.
- Remove vim-tidal and friends
- Clean up Lualine module to reduce theme dependency on Catppuccin, and fixed
blending issues in component separators.
[jacekpoz](https://github.com/jacekpoz):
- Add [ocaml-lsp](https://github.com/ocaml/ocaml-lsp) support.
- Fix Emac typo

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,7 @@
neovim-flake =
nixpkgs.lib.warn ''
homeManagerModules.neovim-flake has been deprecated.
Plese use the homeManagereModules.nvf instead
Plese use the homeManagerModules.nvf instead
''
self.homeManagerModules.nvf;
@ -47,7 +47,7 @@
nixosModules.neovim-flake has been deprecated.
Please use the nixosModules.nvf instead
''
self.nixosModules.neovim-flake;
self.nixosModules.nvf;
nvf = {
imports = [(import ./flake/modules/nixos.nix self.packages inputs)];
@ -76,7 +76,8 @@
# Flake inputs
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
## Basic Inputs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-utils.url = "github:numtide/flake-utils";
systems.url = "github:nix-systems/default";
@ -98,13 +99,7 @@
inputs.flake-utils.follows = "flake-utils";
};
### Plugins
# Tidal cycles
tidalcycles = {
url = "github:mitchmindtree/tidalcycles.nix";
inputs.vim-tidal-src.url = "github:tidalcycles/vim-tidal";
};
## Plugins
# LSP plugins
plugin-nvim-lspconfig = {
url = "github:neovim/nvim-lspconfig";
@ -183,26 +178,11 @@
flake = false;
};
plugin-elixir-ls = {
url = "github:elixir-lsp/elixir-ls";
flake = false;
};
plugin-elixir-tools = {
url = "github:elixir-tools/elixir-tools.nvim";
flake = false;
};
plugin-glow-nvim = {
url = "github:ellisonleao/glow.nvim";
flake = false;
};
plugin-image-nvim = {
url = "github:3rd/image.nvim";
flake = false;
};
# Copying/Registers
plugin-registers = {
url = "github:tversteeg/registers.nvim";
@ -502,6 +482,16 @@
flake = false;
};
plugin-glow-nvim = {
url = "github:ellisonleao/glow.nvim";
flake = false;
};
plugin-image-nvim = {
url = "github:3rd/image.nvim";
flake = false;
};
# Note-taking
plugin-obsidian-nvim = {
url = "github:epwalsh/obsidian.nvim";

View File

@ -1,21 +1,11 @@
{lib, ...}: {
perSystem = {
system,
config,
...
}: {
apps =
{
nix.program = lib.getExe config.packages.nix;
maximal.program = lib.getExe config.packages.maximal;
default = config.apps.nix;
}
// (
if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"])
then {
tidal.program = lib.getExe config.packages.tidal;
}
else {}
);
{lib, ...}: let
inherit (lib.meta) getExe;
in {
perSystem = {config, ...}: {
apps = {
nix.program = getExe config.packages.nix;
maximal.program = getExe config.packages.maximal;
default = config.apps.nix;
};
};
}

View File

@ -7,7 +7,6 @@
legacyPackages = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.tidalcycles.overlays.default
inputs.self.overlays.default
(_: _: {
rnix-lsp = inputs'.rnix-lsp.defaultPackage;

View File

@ -6,12 +6,12 @@ packages: inputs: {
...
}: let
inherit (lib) maintainers;
inherit (lib.modules) mkIf;
inherit (lib.modules) mkIf mkAliasOptionModule;
inherit (lib.lists) optional;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrsOf anything bool;
cfg = config.programs.neovim-flake;
cfg = config.programs.nvf;
inherit (import ../../configuration.nix inputs) neovimConfiguration;
neovimConfigured = neovimConfiguration {
@ -19,22 +19,26 @@ packages: inputs: {
modules = [cfg.settings];
};
in {
imports = [
(mkAliasOptionModule ["programs" "neovim-flake"] ["programs" "nvf"])
];
meta.maintainers = with maintainers; [NotAShelf];
options.programs.neovim-flake = {
enable = mkEnableOption "neovim-flake, the extensible neovim configuration wrapper";
options.programs.nvf = {
enable = mkEnableOption "nvf, the extensible neovim configuration wrapper";
enableManpages = mkOption {
type = bool;
default = false;
description = "Whether to enable manpages for neovim-flake.";
description = "Whether to enable manpages for nvf.";
};
defaultEditor = mkOption {
type = bool;
default = false;
description = ''
Whether to set `neovim-flake` as the default editor.
Whether to set `nvf` as the default editor.
This will set the `EDITOR` environment variable as `nvim`
if set to true.
@ -46,14 +50,14 @@ in {
visible = false;
readOnly = true;
description = ''
The built neovim-flake package, wrapped with the user's configuration.
The built nvf package, wrapped with the user's configuration.
'';
};
settings = mkOption {
type = attrsOf anything;
default = {};
description = "Attribute set of neovim-flake preferences.";
description = "Attribute set of nvf preferences.";
example = literalExpression ''
{
vim.viAlias = false;
@ -75,7 +79,7 @@ in {
};
config = mkIf cfg.enable {
programs.neovim-flake.finalPackage = neovimConfigured.neovim;
programs.nvf.finalPackage = neovimConfigured.neovim;
home = {
sessionVariables = mkIf cfg.defaultEditor {EDITOR = "nvim";};

View File

@ -6,12 +6,12 @@ packages: inputs: {
...
}: let
inherit (lib) maintainers;
inherit (lib.modules) mkIf mkOverride;
inherit (lib.modules) mkIf mkOverride mkAliasOptionModule;
inherit (lib.lists) optional;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrsOf anything bool;
cfg = config.programs.neovim-flake;
cfg = config.programs.nvf;
inherit (import ../../configuration.nix inputs) neovimConfiguration;
neovimConfigured = neovimConfiguration {
@ -19,22 +19,26 @@ packages: inputs: {
modules = [cfg.settings];
};
in {
imports = [
(mkAliasOptionModule ["programs" "neovim-flake"] ["programs" "nvf"])
];
meta.maintainers = with maintainers; [NotAShelf];
options.programs.neovim-flake = {
enable = mkEnableOption "neovim-flake, the extensible neovim configuration wrapper";
options.programs.nvf = {
enable = mkEnableOption "nvf, the extensible neovim configuration wrapper";
enableManpages = mkOption {
type = bool;
default = false;
description = "Whether to enable manpages for neovim-flake.";
description = "Whether to enable manpages for nvf.";
};
defaultEditor = mkOption {
type = bool;
default = false;
description = ''
Whether to set `neovim-flake` as the default editor.
Whether to set `nvf` as the default editor.
This will set the `EDITOR` environment variable as `nvim`
if set to true.
@ -46,14 +50,14 @@ in {
visible = false;
readOnly = true;
description = ''
The built neovim-flake package, wrapped with the user's configuration.
The built nvf package, wrapped with the user's configuration.
'';
};
settings = mkOption {
type = attrsOf anything;
default = {};
description = "Attribute set of neovim-flake preferences.";
description = "Attribute set of nvf preferences.";
example = literalExpression ''
{
vim.viAlias = false;
@ -75,7 +79,7 @@ in {
};
config = mkIf cfg.enable {
programs.neovim-flake.finalPackage = neovimConfigured.neovim;
programs.nvf.finalPackage = neovimConfigured.neovim;
environment = {
variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "nvim");

View File

@ -9,13 +9,11 @@
nixConfig = mainConfig false;
maximalConfig = mainConfig true;
tidalConfig = {config.vim.tidal.enable = true;};
in {
flake.overlays.default = _final: prev: {
inherit neovimConfiguration;
neovim-nix = buildPkg prev [nixConfig];
neovim-maximal = buildPkg prev [maximalConfig];
neovim-tidal = buildPkg prev [tidalConfig];
devPkg = buildPkg pkgs [nixConfig {config.vim.languages.html.enable = pkgs.lib.mkForce true;}];
};
}

View File

@ -7,56 +7,50 @@
}: let
docs = import ../docs {inherit pkgs inputs;};
in {
packages =
{
# Documentation
docs = docs.manual.html;
docs-html = docs.manual.html;
docs-manpages = docs.manPages;
docs-json = docs.options.json;
packages = {
# Documentation
docs = docs.manual.html;
docs-html = docs.manual.html;
docs-manpages = docs.manPages;
docs-json = docs.options.json;
# Build and open the built manual in your system browser
docs-html-wrapped = pkgs.writeScriptBin "docs-html-wrapped" ''
#!${pkgs.stdenv.shell}
# use xdg-open to open the docs in the browser
${pkgs.xdg_utils}/bin/xdg-open ${docs.manual.html}
'';
# Build and open the built manual in your system browser
docs-html-wrapped = pkgs.writeScriptBin "docs-html-wrapped" ''
#!${pkgs.stdenv.shell}
# use xdg-open to open the docs in the browser
${pkgs.xdg_utils}/bin/xdg-open ${docs.manual.html}
'';
# Exposed neovim configurations
nix = config.legacyPackages.neovim-nix;
maximal = config.legacyPackages.neovim-maximal;
default = config.legacyPackages.neovim-nix;
# Exposed neovim configurations
nix = config.legacyPackages.neovim-nix;
maximal = config.legacyPackages.neovim-maximal;
default = config.legacyPackages.neovim-nix;
# Published docker images
docker-nix = let
inherit (pkgs) bash gitFull buildEnv dockerTools;
inherit (config.legacyPackages) neovim-nix;
in
dockerTools.buildImage {
name = "nvf";
tag = "latest";
# Published docker images
docker-nix = let
inherit (pkgs) bash gitFull buildEnv dockerTools;
inherit (config.legacyPackages) neovim-nix;
in
dockerTools.buildImage {
name = "nvf";
tag = "latest";
copyToRoot = buildEnv {
name = "neovim-root";
pathsToLink = ["/bin"];
paths = [
neovim-nix
gitFull
bash
];
};
config = {
Cmd = ["${neovim-nix}/bin/nvim"];
WorkingDir = "/home/neovim/demo";
Volumes = {"/home/neovim/demo" = {};};
};
copyToRoot = buildEnv {
name = "neovim-root";
pathsToLink = ["/bin"];
paths = [
neovim-nix
gitFull
bash
];
};
}
// (
if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"])
then {tidal = config.legacyPackages.neovim-tidal;}
else {}
);
config = {
Cmd = ["${neovim-nix}/bin/nvim"];
WorkingDir = "/home/neovim/demo";
Volumes = {"/home/neovim/demo" = {};};
};
};
};
};
}

View File

@ -3,7 +3,7 @@
inherit (builtins) hasAttr head throw typeOf isList isAttrs isBool isInt isString isPath isFloat toJSON;
inherit (lib.attrsets) mapAttrsToList filterAttrs;
inherit (lib.strings) concatStringsSep concatMapStringsSep stringToCharacters;
inherit (lib.trivial) boolToString;
inherit (lib.trivial) boolToString warn;
in rec {
wrapLuaConfig = {
luaBefore ? "",
@ -66,7 +66,10 @@ in rec {
if isLuaInline args
then args.expr
else if hasAttr "__empty" args
then "{ }"
then
warn ''
Using `__empty` to define an empty lua table is deprecated. Use an empty attrset instead.
'' "{ }"
else
"{"
+ (concatStringsSep ","
@ -77,7 +80,8 @@ in rec {
else "[${toLuaObject n}] = " + (toLuaObject v))
(filterAttrs
(
_: v: (toLuaObject v != "{}")
_: v:
(v != null) && (toLuaObject v != "{}")
)
args)))
+ "}"

View File

@ -25,7 +25,7 @@ inputs: {
# check can be disabled while calling this file is called
# to avoid checking in all modules
nvimModules = import ./modules.nix {
inherit check pkgs;
inherit pkgs check;
lib = extendedLib;
};

View File

@ -0,0 +1,11 @@
{lib, ...}: let
inherit (lib.modules) mkRemovedOptionModule;
in {
imports = [
# 2024-06-06
(mkRemovedOptionModule ["vim" "tidal"] ''
Tidalcycles language support has been removed as of 2024-06-06 as it was long unmaintained. If
you depended on this functionality, please open an issue.
'')
];
}

View File

@ -1,7 +1,7 @@
{
check ? true,
pkgs,
lib,
check ? true,
}: let
inherit (lib.modules) mkDefault;
inherit (lib.lists) concatLists;
@ -53,7 +53,13 @@
"warnings"
];
allModules = concatLists [neovim plugins wrapper];
# Extra modules, such as deprecation warnings
# or renames in one place.
extra = map (p: ./extra + "/${p}") [
"deprecations.nix"
];
allModules = concatLists [neovim plugins wrapper extra];
pkgsModule = {config, ...}: {
config = {

View File

@ -1,15 +1,17 @@
{
pkgs,
config,
pkgs,
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.types) enum either package listOf str bool;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.languages) diagnosticsToLua;
inherit (lib.nvim.types) diagnostics mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
cfg = config.vim.languages.bash;
@ -55,6 +57,7 @@
ls_sources,
null_ls.builtins.diagnostics.shellcheck.with({
command = "${pkg}/bin/shellcheck",
diagnostics_format = "#{m} [#{c}]"
})
)
'';
@ -114,4 +117,30 @@ in {
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.bash-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.bash-format = formats.${cfg.format.type}.nullConfig;
})
(mkIf cfg.extraDiagnostics.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources = diagnosticsToLua {
lang = "bash";
config = cfg.extraDiagnostics.types;
inherit diagnosticsProviders;
};
})
]);
}

View File

@ -1,83 +0,0 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib.lists) isList;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.languages) diagnosticsToLua;
cfg = config.vim.languages.bash;
diagnosticsProviders = {
shellcheck = {
package = pkgs.shellcheck;
nullConfig = pkg: ''
table.insert(
ls_sources,
null_ls.builtins.diagnostics.shellcheck.with({
command = "${pkg}/bin/shellcheck",
})
)
'';
};
};
formats = {
shfmt = {
package = pkgs.shfmt;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.shfmt.with({
command = "${pkgs.shfmt}/bin/shfmt",
})
)
'';
};
};
servers = {
bash-ls = {
package = pkgs.nodePackages.bash-language-server;
lspConfig = ''
lspconfig.bashls.setup{
capabilities = capabilities;
on_attach = default_on_attach;
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/bash-language-server", "start"}''
};
}
'';
};
};
in {
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.bash-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.bash-format = formats.${cfg.format.type}.nullConfig;
})
(mkIf cfg.extraDiagnostics.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources = diagnosticsToLua {
lang = "bash";
config = cfg.extraDiagnostics.types;
inherit diagnosticsProviders;
};
})
]);
}

View File

@ -1,6 +0,0 @@
{
imports = [
./bash.nix
./config.nix
];
}

View File

@ -17,7 +17,7 @@
defaultServer = "vscode-langservers-extracted";
servers = {
vscode-langservers-extracted = {
package = pkgs.nodePackages.vscode-langservers-extracted;
package = pkgs.vscode-langservers-extracted;
lspConfig = ''
-- enable (broadcasting) snippet capability for completion
-- see <https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cssls>

View File

@ -1,18 +1,23 @@
{
config,
lib,
pkgs,
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.trivial) boolToString;
inherit (lib.lists) isList;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) enum either listOf package nullOr str bool;
inherit (lib.strings) optionalString;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.dart;
ftcfg = cfg.flutter-tools;
defaultServer = "dart";
servers = {
dart = {
@ -48,15 +53,16 @@ in {
default = defaultServer;
};
package = mkOption {
description = "Dart LSP server package, or the command to run as a list of strings";
example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]'';
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]'';
description = "Dart LSP server package, or the command to run as a list of strings";
};
opts = mkOption {
description = "Options to pass to Dart LSP server";
type = nullOr str;
default = null;
description = "Options to pass to Dart LSP server";
};
};
@ -70,23 +76,26 @@ in {
flutter-tools = {
enable = mkOption {
description = "Enable flutter-tools for flutter support";
type = bool;
default = config.vim.languages.enableLSP;
description = "Enable flutter-tools for flutter support";
};
enableNoResolvePatch = mkOption {
description = ''
Patch flutter-tools so that it doesn't resolve symlinks when detecting flutter path.
This is required if you want to use a flutter package built with nix.
If you are using a flutter SDK installed from a different source and encounter the error "`dart` missing from PATH", disable this option.
'';
type = bool;
default = true;
description = ''
Whether to patch flutter-tools so that it doesn't resolve
symlinks when detecting flutter path.
This is required if you want to use a flutter package built with nix.
If you are using a flutter SDK installed from a different source
and encounter the error "`dart` missing from PATH", disable this option.
'';
};
color = {
enable = mkEnableOption "Whether or mot to highlight color variables at all";
enable = mkEnableOption "highlighting color variables";
highlightBackground = mkOption {
type = bool;
@ -112,4 +121,47 @@ in {
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.dart-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf ftcfg.enable {
vim.startPlugins =
if ftcfg.enableNoResolvePatch
then ["flutter-tools-patched"]
else ["flutter-tools"];
vim.luaConfigRC.flutter-tools = entryAnywhere ''
require('flutter-tools').setup {
lsp = {
color = { -- show the derived colours for dart variables
enabled = ${boolToString ftcfg.color.enable}, -- whether or not to highlight color variables at all, only supported on flutter >= 2.10
background = ${boolToString ftcfg.color.highlightBackground}, -- highlight the background
foreground = ${boolToString ftcfg.color.highlightForeground}, -- highlight the foreground
virtual_text = ${boolToString ftcfg.color.virtualText.enable}, -- show the highlight using virtual text
virtual_text_str = ${ftcfg.color.virtualText.character} -- the virtual text character to highlight
},
capabilities = capabilities,
on_attach = default_on_attach;
flags = lsp_flags,
},
${optionalString cfg.dap.enable ''
debugger = {
enabled = true,
},
''}
}
'';
})
]);
}

View File

@ -1,76 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.lists) isList;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.strings) optionalString;
inherit (lib.trivial) boolToString;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.dart;
ftcfg = cfg.flutter-tools;
servers = {
dart = {
package = pkgs.dart;
lspConfig = ''
lspconfig.dartls.setup{
capabilities = capabilities;
on_attach=default_on_attach;
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/dart", "language-server", "--protocol=lsp"}''
};
${optionalString (cfg.lsp.opts != null) "init_options = ${cfg.lsp.dartOpts}"}
}
'';
};
};
in {
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.dart-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf ftcfg.enable {
vim.startPlugins =
if ftcfg.enableNoResolvePatch
then ["flutter-tools-patched"]
else ["flutter-tools"];
vim.luaConfigRC.flutter-tools = entryAnywhere ''
require('flutter-tools').setup {
lsp = {
color = { -- show the derived colours for dart variables
enabled = ${boolToString ftcfg.color.enable}, -- whether or not to highlight color variables at all, only supported on flutter >= 2.10
background = ${boolToString ftcfg.color.highlightBackground}, -- highlight the background
foreground = ${boolToString ftcfg.color.highlightForeground}, -- highlight the foreground
virtual_text = ${boolToString ftcfg.color.virtualText.enable}, -- show the highlight using virtual text
virtual_text_str = ${ftcfg.color.virtualText.character} -- the virtual text character to highlight
},
capabilities = capabilities,
on_attach = default_on_attach;
flags = lsp_flags,
},
${optionalString cfg.dap.enable ''
debugger = {
enabled = true,
},
''}
}
'';
})
]);
}

View File

@ -1,6 +0,0 @@
{
imports = [
./dart.nix
./config.nix
];
}

View File

@ -2,20 +2,19 @@
inherit (lib.nvim.languages) mkEnable;
in {
imports = [
./bash
./dart
./elixir
./markdown
./tidal
./bash.nix
./dart.nix
./clang.nix
./css.nix
./elixir.nix
./go.nix
./html.nix
./java.nix
./lua.nix
./markdown.nix
./nim.nix
./nix.nix
./ocaml.nix
./php.nix
./python.nix
./rust.nix
@ -24,6 +23,7 @@ in {
./tailwind.nix
./terraform.nix
./ts.nix
./typst.nix
./zig.nix
];

View File

@ -0,0 +1,138 @@
{
config,
pkgs,
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.types) enum either listOf package str;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.elixir;
defaultServer = "elixirls";
servers = {
elixirls = {
package = pkgs.elixir-ls;
lspConfig = ''
-- elixirls setup
lspconfig.elixirls.setup {
capabilities = capabilities,
on_attach = default_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/elixir-ls"}''
}
}
'';
};
};
defaultFormat = "mix";
formats = {
mix = {
package = pkgs.elixir;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.mix.with({
command = "${cfg.format.package}/bin/mix",
})
)
'';
};
};
in {
options.vim.languages.elixir = {
enable = mkEnableOption "Elixir language support";
treesitter = {
enable = mkEnableOption "Elixir treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "elixir";
};
lsp = {
enable = mkEnableOption "Elixir LSP support" // {default = config.vim.languages.enableLSP;};
server = mkOption {
description = "Elixir LSP server to use";
type = enum (attrNames servers);
default = defaultServer;
};
package = mkOption {
description = "Elixir LSP server package, or the command to run as a list of strings";
example = ''[lib.getExe pkgs.jdt-language-server " - data " " ~/.cache/jdtls/workspace "]'';
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
};
};
format = {
enable = mkEnableOption "Elixir formatting" // {default = config.vim.languages.enableFormat;};
type = mkOption {
description = "Elixir formatter to use";
type = enum (attrNames formats);
default = defaultFormat;
};
package = mkOption {
description = "Elixir formatter package";
type = package;
default = formats.${cfg.format.type}.package;
};
};
elixir-tools = {
enable = mkEnableOption "Elixir tools";
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.elixir-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.elixir-format = formats.${cfg.format.type}.nullConfig;
})
(mkIf cfg.elixir-tools.enable {
vim.startPlugins = ["elixir-tools"];
vim.luaConfigRC.elixir-tools = entryAnywhere ''
local elixir-tools = require("elixir")
local elixirls = require("elixir-tools.elixirls")
-- disable imperative insstallations of various
-- elixir related tools installed by elixir-tools
elixir-tools.setup {
nextls = {
enable = false -- defaults to false
},
credo = {
enable = false -- defaults to true
},
elixirls = {
enable = false, -- defaults to true
}
}
'';
})
]);
}

View File

@ -1,67 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.meta) getExe;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.elixir;
in {
config = mkIf (cfg.enable) {
vim.startPlugins = [
"elixir-tools"
];
vim.luaConfigRC.elixir-tools = entryAnywhere ''
local elixir = require("elixir")
local elixirls = require("elixir.elixirls")
elixir.setup {
elixirls = {
-- alternatively, point to an existing elixir-ls installation (optional)
-- not currently supported by elixirls, but can be a table if you wish to pass other args `{"path/to/elixirls", "--foo"}`
cmd = "${getExe pkgs.elixir-ls}",
-- default settings, use the `settings` function to override settings
settings = elixirls.settings {
dialyzerEnabled = true,
fetchDeps = false,
enableTestLenses = false,
suggestSpecs = false,
},
on_attach = function(client, bufnr)
local map_opts = { buffer = true, noremap = true}
-- run the codelens under the cursor
vim.keymap.set("n", "<space>r", vim.lsp.codelens.run, map_opts)
-- remove the pipe operator
vim.keymap.set("n", "<space>fp", ":ElixirFromPipe<cr>", map_opts)
-- add the pipe operator
vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", map_opts)
vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", map_opts)
-- bindings for standard LSP functions.
vim.keymap.set("n", "<space>df", "<cmd>lua vim.lsp.buf.format()<cr>", map_opts)
vim.keymap.set("n", "<space>gd", "<cmd>lua vim.diagnostic.open_float()<cr>", map_opts)
vim.keymap.set("n", "<space>dt", "<cmd>lua vim.lsp.buf.definition()<cr>", map_opts)
vim.keymap.set("n", "<space>K", "<cmd>lua vim.lsp.buf.hover()<cr>", map_opts)
vim.keymap.set("n", "<space>gD","<cmd>lua vim.lsp.buf.implementation()<cr>", map_opts)
vim.keymap.set("n", "<space>1gD","<cmd>lua vim.lsp.buf.type_definition()<cr>", map_opts)
-- keybinds for fzf-lsp.nvim: https://github.com/gfanto/fzf-lsp.nvim
-- you could also use telescope.nvim: https://github.com/nvim-telescope/telescope.nvim
-- there are also core vim.lsp functions that put the same data in the loclist
vim.keymap.set("n", "<space>gr", ":References<cr>", map_opts)
vim.keymap.set("n", "<space>g0", ":DocumentSymbols<cr>", map_opts)
vim.keymap.set("n", "<space>gW", ":WorkspaceSymbols<cr>", map_opts)
vim.keymap.set("n", "<leader>d", ":Diagnostics<cr>", map_opts)
end
}
}
'';
};
}

View File

@ -1,6 +0,0 @@
{
imports = [
./config.nix
./elixir-tools.nix
];
}

View File

@ -1,7 +0,0 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
in {
options.vim.languages.elixir = {
enable = mkEnableOption "Elixir language support";
};
}

View File

@ -4,7 +4,8 @@
lib,
...
}: let
inherit (builtins) attrNames;
inherit (builtins) attrNames concatLists;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.lists) isList;
inherit (lib.types) bool enum either package listOf str;
@ -29,15 +30,31 @@
'';
};
};
defaultFormat = "denofmt";
formats = {
denofmt = {
package = pkgs.deno;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.deno_fmt.with({
filetypes = ${expToLua (concatLists [cfg.format.extraFiletypes ["markdown"]])},
command = "${cfg.format.package}/bin/deno",
})
)
'';
};
};
in {
options.vim.languages.markdown = {
enable = mkEnableOption "Markdown markup language support";
treesitter = {
enable = mkOption {
description = "Enable Markdown treesitter";
type = bool;
default = config.vim.languages.enableTreesitter;
description = "Enable Markdown treesitter";
};
mdPackage = mkGrammarOption pkgs "markdown";
mdInlinePackage = mkGrammarOption pkgs "markdown-inline";
@ -47,17 +64,56 @@ in {
enable = mkEnableOption "Enable Markdown LSP support" // {default = config.vim.languages.enableLSP;};
server = mkOption {
description = "Markdown LSP server to use";
type = enum (attrNames servers);
default = defaultServer;
description = "Markdown LSP server to use";
};
package = mkOption {
description = "Markdown LSP server package, or the command to run as a list of strings";
example = ''[lib.getExe pkgs.jdt-language-server " - data " " ~/.cache/jdtls/workspace "]'';
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
example = ''[lib.getExe pkgs.jdt-language-server " - data " " ~/.cache/jdtls/workspace "]'';
description = "Markdown LSP server package, or the command to run as a list of strings";
};
};
format = {
enable = mkEnableOption "Markdown formatting" // {default = config.vim.languages.enableFormat;};
type = mkOption {
type = enum (attrNames formats);
default = defaultFormat;
description = "Markdown formatter to use";
};
package = mkOption {
type = package;
default = formats.${cfg.format.type}.package;
description = "Markdown formatter package";
};
extraFiletypes = mkOption {
type = listOf str;
default = [];
description = "Extra filetypes to format with the Markdown formatter";
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.mdPackage cfg.treesitter.mdInlinePackage];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.markdown-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.markdown-format = formats.${cfg.format.type}.nullConfig;
})
]);
}

View File

@ -1,40 +0,0 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib.nvim.lua) expToLua;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
cfg = config.vim.languages.markdown;
servers = {
marksman = {
package = pkgs.marksman;
lspConfig = ''
lspconfig.marksman.setup{
capabilities = capabilities;
on_attach = default_on_attach;
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/marksman", "server"}''
},
}
'';
};
};
in {
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.mdPackage cfg.treesitter.mdInlinePackage];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.markdown-lsp = servers.${cfg.lsp.server}.lspConfig;
})
]);
}

View File

@ -1,6 +0,0 @@
{...}: {
imports = [
./config.nix
./markdown.nix
];
}

View File

@ -0,0 +1,105 @@
{
config,
pkgs,
lib,
...
}: let
inherit (builtins) attrNames;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.meta) getExe;
inherit (lib.lists) isList;
inherit (lib.types) either enum listOf package str;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
cfg = config.vim.languages.ocaml;
defaultServer = "ocaml-lsp";
servers = {
ocaml-lsp = {
package = pkgs.ocamlPackages.ocaml-lsp;
lspConfig = ''
lspconfig.ocamllsp.setup {
capabilities = capabilities,
on_attach = default_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${getExe cfg.lsp.package}"}''
};
}
'';
};
};
defaultFormat = "ocamlformat";
formats = {
ocamlformat = {
package = pkgs.ocamlPackages.ocamlformat;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.ocamlformat.with({
command = "${cfg.format.package}/bin/ocamlformat",
})
)
'';
};
};
in {
options.vim.languages.ocaml = {
enable = mkEnableOption "OCaml language support";
treesitter = {
enable = mkEnableOption "OCaml treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "ocaml";
};
lsp = {
enable = mkEnableOption "OCaml LSP support (ocaml-lsp)" // {default = config.vim.languages.enableLSP;};
server = mkOption {
description = "OCaml LSP server to user";
type = enum (attrNames servers);
default = defaultServer;
};
package = mkOption {
description = "OCaml language server package, or the command to run as a list of strings";
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
};
};
format = {
enable = mkEnableOption "OCaml formatting support (ocamlformat)" // {default = config.vim.languages.enableFormat;};
type = mkOption {
description = "OCaml formatter to use";
type = enum (attrNames formats);
default = defaultFormat;
};
package = mkOption {
description = "OCaml formatter package";
type = package;
default = formats.${cfg.format.type}.package;
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.ocaml-lsp = servers.${cfg.lsp.server}.lspConfig;
})
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.ocamlformat = formats.${cfg.format.type}.nullConfig;
vim.extraPackages = [formats.${cfg.format.type}.package];
})
]);
}

View File

@ -17,7 +17,7 @@
defaultServer = "pyright";
servers = {
pyright = {
package = pkgs.nodePackages.pyright;
package = pkgs.pyright;
lspConfig = ''
lspconfig.pyright.setup{
capabilities = capabilities;

View File

@ -54,7 +54,7 @@
defaultDiagnosticsProvider = ["eslint_d"];
diagnosticsProviders = {
eslint_d = {
package = pkgs.nodePackages.eslint_d;
package = pkgs.eslint_d;
nullConfig = pkg: ''
table.insert(
ls_sources,

View File

@ -1,23 +0,0 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim.tidal;
in {
config = mkIf (cfg.enable) {
vim.startPlugins = [
# From tidalcycles flake
pkgs.vimPlugins.vim-tidal
];
vim.globals = {
"tidal_target" = "terminal";
"tidal_flash_duration" = 150;
"tidal_sc_enable" = cfg.openSC;
};
};
}

View File

@ -1,6 +0,0 @@
{...}: {
imports = [
./tidal.nix
./config.nix
];
}

View File

@ -1,24 +0,0 @@
{
config,
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) int bool;
in {
options.vim.tidal = {
enable = mkEnableOption "tidalcycles tools and plugins";
flash = mkOption {
description = ''When sending a paragraph or a single line, vim-tidal will "flash" the selection for some milliseconds'';
type = int;
default = 150;
};
openSC = mkOption {
description = "Automatically run the supercollider CLI, sclang, alongside the Tidal GHCI terminal.";
type = bool;
default = true;
};
};
}

View File

@ -80,7 +80,7 @@
defaultDiagnosticsProvider = ["eslint_d"];
diagnosticsProviders = {
eslint_d = {
package = pkgs.nodePackages.eslint_d;
package = pkgs.eslint_d;
nullConfig = pkg: ''
table.insert(
ls_sources,

View File

@ -0,0 +1,100 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.types) enum either listOf package str;
inherit (lib.attrsets) attrNames;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.types) mkGrammarOption;
cfg = config.vim.languages.typst;
defaultFormat = "typstfmt";
formats = {
typstfmt = {
package = pkgs.typstfmt;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.typstfmt.with({
command = "${cfg.format.package}/bin/typstfmt",
})
)
'';
};
# https://github.com/Enter-tainer/typstyle
typstyle = {
package = pkgs.typstyle;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.typstfmt.with({
command = "${cfg.format.package}/bin/typstyle",
})
)
'';
};
};
in {
options.vim.languages.typst = {
enable = mkEnableOption "Typst language support";
treesitter = {
enable = mkEnableOption "Typst treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "typst";
};
lsp = {
enable = mkEnableOption "Typst LSP support (typst-lsp)" // {default = config.vim.languages.enableLSP;};
package = mkOption {
description = "typst-lsp package, or the command to run as a list of strings";
example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]'';
type = either package (listOf str);
default = pkgs.typst-lsp;
};
};
format = {
enable = mkEnableOption "Typst document formatting" // {default = config.vim.languages.enableFormat;};
type = mkOption {
description = "Typst formatter to use";
type = enum (attrNames formats);
default = defaultFormat;
};
package = mkOption {
description = "Typst formatter package";
type = package;
default = formats.${cfg.format.type}.package;
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.typst-lsp = ''
lspconfig.typst_lsp.setup {
capabilities = capabilities,
on_attach=default_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/typst-lsp"}''
},
}
'';
})
]);
}

View File

@ -16,7 +16,10 @@
mappingDefinitions = self.options.vim.lsp.mappings;
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
mkBinding = binding: action: "vim.api.nvim_buf_set_keymap(bufnr, 'n', '${binding.value}', '<cmd>lua ${action}<CR>', {noremap=true, silent=true, desc='${binding.description}'})";
mkBinding = binding: action:
if binding.value != null
then "vim.api.nvim_buf_set_keymap(bufnr, 'n', '${binding.value}', '<cmd>lua ${action}<CR>', {noremap=true, silent=true, desc='${binding.description}'})"
else "";
in {
config = mkIf cfg.enable {
vim = {

View File

@ -5,6 +5,7 @@
}: let
inherit (lib.modules) mkIf mkMerge;
inherit (lib.attrsets) mapAttrs;
inherit (lib.trivial) boolToString;
inherit (lib.nvim.dag) entryAnywhere entryAfter entryBetween;
cfg = config.vim.lsp;
@ -12,26 +13,36 @@ in {
config = mkIf cfg.null-ls.enable (mkMerge [
{
vim = {
startPlugins = [
"none-ls"
"plenary-nvim"
];
# null-ls implies LSP already being set up
# since it will hook into LSPs to receive information
lsp.enable = true;
startPlugins = ["none-ls"];
luaConfigRC.null_ls-setup = entryAnywhere ''
local null_ls = require("null-ls")
local null_helpers = require("null-ls.helpers")
local null_methods = require("null-ls.methods")
local ls_sources = {}
'';
luaConfigRC = {
# early setup for null-ls
null_ls-setup = entryAnywhere ''
local null_ls = require("null-ls")
local null_helpers = require("null-ls.helpers")
local null_methods = require("null-ls.methods")
local ls_sources = {}
'';
luaConfigRC.null_ls = entryAfter ["null_ls-setup" "lsp-setup"] ''
require('null-ls').setup({
debug = false,
diagnostics_format = "[#{m}] #{s} (#{c})",
debounce = 250,
default_timeout = 5000,
sources = ls_sources,
on_attach = default_on_attach
})
'';
# null-ls setup
null_ls = entryAfter ["null_ls-setup" "lsp-setup"] ''
require('null-ls').setup({
debug = ${boolToString cfg.null-ls.debug},
diagnostics_format = "${cfg.null-ls.diagnostics_format}",
debounce = ${toString cfg.null-ls.debounce},
default_timeout = ${toString cfg.null-ls.default_timeout},
sources = ls_sources,
on_attach = default_on_attach
})
'';
};
};
}
{

View File

@ -1,10 +1,30 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) attrsOf str;
inherit (lib.types) attrsOf str int;
in {
options.vim.lsp.null-ls = {
enable = mkEnableOption "null-ls, also enabled automatically";
debug = mkEnableOption "debugging information for `null-ls";
diagnostics_format = mkOption {
type = str;
default = "[#{m}] #{s} (#{c})";
description = "Diagnostic output format for null-ls";
};
debounce = mkOption {
type = int;
default = 250;
description = "Default debounce";
};
default_timeout = mkOption {
type = int;
default = 5000;
description = "Default timeout value, in miliseconds";
};
sources = mkOption {
description = "null-ls sources";
type = attrsOf str;

View File

@ -15,7 +15,7 @@ in {
];
options.vim.notes.orgmode = {
enable = mkEnableOption "nvim-orgmode: Neovim plugin for Emac Orgmode. Get the best of both worlds";
enable = mkEnableOption "nvim-orgmode: Neovim plugin for Emacs Orgmode. Get the best of both worlds";
setupOpts = mkPluginSetupOption "Orgmode" {
org_agenda_files = mkOption {

View File

@ -3,6 +3,7 @@
lib,
...
}: let
inherit (builtins) map;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.trivial) boolToString;
inherit (lib.nvim.dag) entryAnywhere;
@ -31,44 +32,46 @@ in {
};
})
(mkIf cfg.enable {
vim.startPlugins = [
"lualine"
];
vim = {
startPlugins = ["lualine"];
vim.luaConfigRC.lualine = entryAnywhere ''
local lualine = require('lualine')
lualine.setup ${toLuaObject cfg.setupOpts}
'';
luaConfigRC.lualine = entryAnywhere ''
local lualine = require('lualine')
lualine.setup ${toLuaObject cfg.setupOpts}
'';
# this is for backwards-compatibility
vim.statusline.lualine.setupOpts = {
options = {
icons_enabled = cfg.icons.enable;
theme = cfg.theme;
component_separators = [cfg.componentSeparator.left cfg.componentSeparator.right];
section_separators = [cfg.sectionSeparator.left cfg.sectionSeparator.right];
globalstatus = cfg.globalStatus;
refresh = cfg.refresh;
};
# this is for backwards-compatibility
statusline.lualine.setupOpts = {
options = {
icons_enabled = cfg.icons.enable;
theme = cfg.theme;
component_separators = [cfg.componentSeparator.left cfg.componentSeparator.right];
section_separators = [cfg.sectionSeparator.left cfg.sectionSeparator.right];
globalstatus = cfg.globalStatus;
refresh = cfg.refresh;
};
sections = {
lualine_a = builtins.map mkLuaInline (cfg.activeSection.a ++ cfg.extraActiveSection.a);
lualine_b = builtins.map mkLuaInline (cfg.activeSection.b ++ cfg.extraActiveSection.b);
lualine_c = builtins.map mkLuaInline (cfg.activeSection.c ++ cfg.extraActiveSection.c);
lualine_x = builtins.map mkLuaInline (cfg.activeSection.x ++ cfg.extraActiveSection.x);
lualine_y = builtins.map mkLuaInline (cfg.activeSection.y ++ cfg.extraActiveSection.y);
lualine_z = builtins.map mkLuaInline (cfg.activeSection.z ++ cfg.extraActiveSection.z);
sections = {
lualine_a = map mkLuaInline (cfg.activeSection.a ++ cfg.extraActiveSection.a);
lualine_b = map mkLuaInline (cfg.activeSection.b ++ cfg.extraActiveSection.b);
lualine_c = map mkLuaInline (cfg.activeSection.c ++ cfg.extraActiveSection.c);
lualine_x = map mkLuaInline (cfg.activeSection.x ++ cfg.extraActiveSection.x);
lualine_y = map mkLuaInline (cfg.activeSection.y ++ cfg.extraActiveSection.y);
lualine_z = map mkLuaInline (cfg.activeSection.z ++ cfg.extraActiveSection.z);
};
inactive_sections = {
lualine_a = map mkLuaInline (cfg.inactiveSection.a ++ cfg.extraInactiveSection.a);
lualine_b = map mkLuaInline (cfg.inactiveSection.b ++ cfg.extraInactiveSection.b);
lualine_c = map mkLuaInline (cfg.inactiveSection.c ++ cfg.extraInactiveSection.c);
lualine_x = map mkLuaInline (cfg.inactiveSection.x ++ cfg.extraInactiveSection.x);
lualine_y = map mkLuaInline (cfg.inactiveSection.y ++ cfg.extraInactiveSection.y);
lualine_z = map mkLuaInline (cfg.inactiveSection.z ++ cfg.extraInactiveSection.z);
};
# probably don't need this?
tabline = [];
};
inactive_sections = {
lualine_a = builtins.map mkLuaInline (cfg.inactiveSection.a ++ cfg.extraInactiveSection.a);
lualine_b = builtins.map mkLuaInline (cfg.inactiveSection.b ++ cfg.extraInactiveSection.b);
lualine_c = builtins.map mkLuaInline (cfg.inactiveSection.c ++ cfg.extraInactiveSection.c);
lualine_x = builtins.map mkLuaInline (cfg.inactiveSection.x ++ cfg.extraInactiveSection.x);
lualine_y = builtins.map mkLuaInline (cfg.inactiveSection.y ++ cfg.extraInactiveSection.y);
lualine_z = builtins.map mkLuaInline (cfg.inactiveSection.z ++ cfg.extraInactiveSection.z);
};
# probably don't need this?
tabline = [];
};
})
];

View File

@ -10,19 +10,45 @@
inherit (lib.nvim.types) mkPluginSetupOption;
supported_themes = import ./supported_themes.nix;
colorPuccin =
if config.vim.statusline.lualine.theme == "catppuccin"
then "#181825"
else "none";
builtin_themes = [
"auto"
"16color"
"gruvbox"
"ayu_dark"
"ayu_light"
"ayu_mirage"
"codedark"
"dracula"
"everforest"
"gruvbox"
"gruvbox_light"
"gruvbox_material"
"horizon"
"iceberg_dark"
"iceberg_light"
"jellybeans"
"material"
"modus_vivendi"
"molokai"
"nightfly"
"nord"
"oceanicnext"
"onelight"
"palenight"
"papercolor_dark"
"papercolor_light"
"powerline"
"seoul256"
"solarized_dark"
"tomorrow"
"wombat"
];
in {
options.vim.statusline.lualine = {
enable = mkEnableOption "lualine statusline plugin";
setupOpts = mkPluginSetupOption "Lualine" {};
enable = mkEnableOption "lualine statusline plugin";
icons = {
enable = mkEnableOption "icons for lualine" // {default = true;};
};
icons.enable = mkEnableOption "icons for lualine" // {default = true;};
refresh = {
statusline = mkOption {
@ -73,47 +99,15 @@ in {
theme = let
themeSupported = elem config.vim.theme.name supported_themes;
themesConcatted = builtin_themes ++ optional themeSupported config.vim.theme.name;
in
mkOption {
description = "Theme for lualine";
type = enum ([
"auto"
"16color"
"gruvbox"
"ayu_dark"
"ayu_light"
"ayu_mirage"
"codedark"
"dracula"
"everforest"
"gruvbox"
"gruvbox_light"
"gruvbox_material"
"horizon"
"iceberg_dark"
"iceberg_light"
"jellybeans"
"material"
"modus_vivendi"
"molokai"
"nightfly"
"nord"
"oceanicnext"
"onelight"
"palenight"
"papercolor_dark"
"papercolor_light"
"powerline"
"seoul256"
"solarized_dark"
"tomorrow"
"wombat"
]
++ optional themeSupported config.vim.theme.name);
type = enum themesConcatted;
default = "auto";
# TODO: xml generation error if the closing '' is on a new line.
# issue: https://gitlab.com/rycee/nmd/-/issues/10
defaultText = ''`config.vim.theme.name` if theme supports lualine else "auto"'';
description = "Theme for lualine";
};
sectionSeparator = {
@ -159,6 +153,13 @@ in {
},
}
''
''
{
"",
draw_empty = true,
separator = { left = '', right = '' }
}
''
];
};
@ -171,15 +172,21 @@ in {
"filetype",
colored = true,
icon_only = true,
icon = { align = 'left' },
color = {bg='${colorPuccin}', fg='lavender'},
icon = { align = 'left' }
}
''
''
{
"filename",
color = {bg='${colorPuccin}'},
symbols = {modified = '', readonly = ''},
symbols = {modified = ' ', readonly = ' '},
separator = {right = ''}
}
''
''
{
"",
draw_empty = true,
separator = { left = '', right = '' }
}
''
];
@ -200,13 +207,7 @@ in {
removed = 'DiffDelete', -- Changes the diff's removed color you
},
symbols = {added = '+', modified = '~', removed = '-'}, -- Changes the diff symbols
color = {
bg='${colorPuccin}',
fg='lavender'
},
separator = {
right = ''
},
separator = {right = ''}
}
''
];
@ -251,18 +252,17 @@ in {
return msg
end,
icon = ' ',
color = {bg='${colorPuccin}', fg='lavender'},
separator = {
left = '',
},
separator = {left = ''},
}
''
''
{
"diagnostics",
sources = {'nvim_lsp', 'nvim_diagnostic', 'coc'},
sources = {'nvim_lsp', 'nvim_diagnostic', 'nvim_diagnostic', 'vim_lsp', 'coc'},
symbols = {error = '󰅙 ', warn = ' ', info = ' ', hint = '󰌵 '},
color = {bg='${colorPuccin}', fg='lavender'},
colored = true,
update_in_insert = false,
always_visible = false,
diagnostics_color = {
color_error = { fg = 'red' },
color_warn = { fg = 'yellow' },
@ -277,19 +277,26 @@ in {
type = listOf str;
description = "active config for: | A | B | C X | (Y) | Z |";
default = [
''
{
"",
draw_empty = true,
separator = { left = '', right = '' }
}
''
''
{
'searchcount',
maxcount = 999,
timeout = 120,
color = {bg='${colorPuccin}', fg='lavender'}
separator = {left = ''}
}
''
''
{
"branch",
icon = ' ',
color = {bg='${colorPuccin}', fg='lavender'},
separator = {left = ''}
}
''
];
@ -301,17 +308,20 @@ in {
default = [
''
{
"progress",
separator = {
left = '',
},
"",
draw_empty = true,
separator = { left = '', right = '' }
}
''
''
{
"location",
"progress",
separator = {left = ''}
}
''
''
{"location"}
''
''
{
"fileformat",
@ -320,38 +330,44 @@ in {
unix = '', -- e712
dos = '', -- e70f
mac = '', -- e711
},
}
}
''
];
};
};
extraActiveSection = {
a = mkOption {
type = listOf str;
description = "Extra entries for activeSection.a";
default = [];
};
b = mkOption {
type = listOf str;
description = "Extra entries for activeSection.b";
default = [];
};
c = mkOption {
type = listOf str;
description = "Extra entries for activeSection.c";
default = [];
};
x = mkOption {
type = listOf str;
description = "Extra entries for activeSection.x";
default = [];
};
y = mkOption {
type = listOf str;
description = "Extra entries for activeSection.y";
default = [];
};
z = mkOption {
type = listOf str;
description = "Extra entries for activeSection.z";
@ -402,26 +418,31 @@ in {
description = "Extra entries for inactiveSection.a";
default = [];
};
b = mkOption {
type = listOf str;
description = "Extra entries for inactiveSection.b";
default = [];
};
c = mkOption {
type = listOf str;
description = "Extra entries for inactiveSection.c";
default = [];
};
x = mkOption {
type = listOf str;
description = "Extra entries for inactiveSection.x";
default = [];
};
y = mkOption {
type = listOf str;
description = "Extra entries for inactiveSection.y";
default = [];
};
z = mkOption {
type = listOf str;
description = "Extra entries for inactiveSection.z";

View File

@ -9,7 +9,8 @@
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.tabline.nvimBufferline;
inherit (cfg) mappings;
self = import ./nvim-bufferline.nix {inherit lib;};
inherit (self.options.vim.tabline.nvimBufferline) mappings;
in {
config = mkIf cfg.enable {
vim = {
@ -19,16 +20,16 @@ in {
];
maps.normal = mkMerge [
(mkLuaBinding mappings.closeCurrent "require(\"bufdelete\").bufdelete" mappings.closeCurrent.description)
(mkBinding mappings.cycleNext ":BufferLineCycleNext<CR>" mappings.cycleNext.description)
(mkBinding mappings.cycleNext ":BufferLineCycleNext<CR>" mappings.cycleNext.description)
(mkBinding mappings.cyclePrevious ":BufferLineCyclePrev<CR>" mappings.cyclePrevious.description)
(mkBinding mappings.pick ":BufferLinePick<CR>" mappings.pick.description)
(mkBinding mappings.sortByExtension ":BufferLineSortByExtension<CR>" mappings.sortByExtension.description)
(mkBinding mappings.sortByDirectory ":BufferLineSortByDirectory<CR>" mappings.sortByDirectory.description)
(mkLuaBinding mappings.sortById "function() require(\"bufferline\").sort_buffers_by(function (buf_a, buf_b) return buf_a.id < buf_b.id end) end" mappings.sortById.description)
(mkBinding mappings.moveNext ":BufferLineMoveNext<CR>" mappings.moveNext.description)
(mkBinding mappings.movePrevious ":BufferLineMovePrev<CR>" mappings.movePrevious.description)
(mkLuaBinding cfg.mappings.closeCurrent "require(\"bufdelete\").bufdelete" mappings.closeCurrent.description)
(mkBinding cfg.mappings.cycleNext ":BufferLineCycleNext<CR>" mappings.cycleNext.description)
(mkBinding cfg.mappings.cycleNext ":BufferLineCycleNext<CR>" mappings.cycleNext.description)
(mkBinding cfg.mappings.cyclePrevious ":BufferLineCyclePrev<CR>" mappings.cyclePrevious.description)
(mkBinding cfg.mappings.pick ":BufferLinePick<CR>" mappings.pick.description)
(mkBinding cfg.mappings.sortByExtension ":BufferLineSortByExtension<CR>" mappings.sortByExtension.description)
(mkBinding cfg.mappings.sortByDirectory ":BufferLineSortByDirectory<CR>" mappings.sortByDirectory.description)
(mkLuaBinding cfg.mappings.sortById "function() require(\"bufferline\").sort_buffers_by(function (buf_a, buf_b) return buf_a.id < buf_b.id end) end" mappings.sortById.description)
(mkBinding cfg.mappings.moveNext ":BufferLineMoveNext<CR>" mappings.moveNext.description)
(mkBinding cfg.mappings.movePrevious ":BufferLineMovePrev<CR>" mappings.movePrevious.description)
];
binds.whichKey.register = pushDownDefault {

View File

@ -1,4 +1,10 @@
{lib}: {
{
config,
lib,
}: let
inherit (lib.strings) optionalString;
inherit (lib.trivial) boolToString warnIf;
in {
onedark = {
setup = {
style ? "dark",
@ -19,7 +25,7 @@
transparent,
}: ''
require('tokyonight').setup {
transparent = ${lib.boolToString transparent};
transparent = ${boolToString transparent};
}
vim.cmd[[colorscheme tokyonight-${style}]]
'';
@ -32,7 +38,7 @@
transparent,
}: ''
require('dracula').setup({
transparent_bg = ${lib.boolToString transparent},
transparent_bg = ${boolToString transparent},
});
require('dracula').load();
'';
@ -46,11 +52,11 @@
-- Catppuccin theme
require('catppuccin').setup {
flavour = "${style}",
transparent_background = ${lib.boolToString transparent},
transparent_background = ${boolToString transparent},
integrations = {
nvimtree = {
enabled = true,
transparent_panel = ${lib.boolToString transparent},
transparent_panel = ${boolToString transparent},
show_root = true,
},
@ -85,11 +91,20 @@
transparent ? false,
}: let
style' =
lib.warnIf (style == "light") "oxocarbon: light theme is not well-supported" style;
warnIf (style == "light") "oxocarbon: light theme is not well-supported" style;
in ''
require('oxocarbon')
vim.opt.background = "${style'}"
vim.cmd.colorscheme = "oxocarbon"
require('oxocarbon')
vim.opt.background = "${style'}"
vim.cmd.colorscheme = "oxocarbon"
${optionalString transparent ''
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
vim.api.nvim_set_hl(0, "LineNr", { bg = "none" })
vim.api.nvim_set_hl(0, "SignColumn", { bg = "none" })
${optionalString config.vim.filetree.nvimTree.enable ''
vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = "none" })
''}
''}
'';
styles = ["dark" "light"];
};
@ -122,7 +137,7 @@
palette_overrides = {},
overrides = {},
dim_inactive = false,
transparent_mode = ${lib.boolToString transparent},
transparent_mode = ${boolToString transparent},
})
vim.o.background = "${style}"
vim.cmd("colorscheme gruvbox")
@ -147,7 +162,7 @@
styles = {
bold = false,
italic = false, -- I would like to add more options for this
transparency = ${lib.boolToString transparent},
transparency = ${boolToString transparent},
},
})

View File

@ -10,7 +10,9 @@
inherit (lib.nvim.dag) entryBefore;
cfg = config.vim.theme;
supported_themes = import ./supported_themes.nix {inherit lib;};
supported_themes = import ./supported_themes.nix {
inherit lib config;
};
in {
options.vim.theme = {
enable = mkOption {

View File

@ -30,9 +30,9 @@ in {
normal = mkSetBinding mappings.incrementalSelection.init ":lua require('nvim-treesitter.incremental_selection').init_selection()<CR>";
visualOnly = mkMerge [
(mkSetBinding mappings.incrementalSelection.incrementByNode ":lua require('nvim-treesitter.incremental_selection').node_incremental()<CR>")
(mkSetBinding mappings.incrementalSelection.incrementByScope ":lua require('nvim-treesitter.incremental_selection').scope_incremental()<CR>")
(mkSetBinding mappings.incrementalSelection.decrementByNode ":lua require('nvim-treesitter.incremental_selection').node_decremental()<CR>")
(mkSetBinding mappings.incrementalSelection.incrementByNode "<cmd>lua require('nvim-treesitter.incremental_selection').node_incremental()<CR>")
(mkSetBinding mappings.incrementalSelection.incrementByScope "<cmd>lua require('nvim-treesitter.incremental_selection').scope_incremental()<CR>")
(mkSetBinding mappings.incrementalSelection.decrementByNode "<cmd>lua require('nvim-treesitter.incremental_selection').node_decremental()<CR>")
];
};

View File

@ -4,100 +4,128 @@
...
}: let
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) attrsOf attrs bool enum;
inherit (lib.types) attrsOf enum nullOr submodule bool str;
inherit (lib.modules) mkRenamedOptionModule;
inherit (lib.nvim.types) mkPluginSetupOption;
settingSubmodule = submodule {
options = {
RGB = mkOption {
description = "Colorize #RGB hex codes";
default = null;
type = nullOr bool;
};
RRGGBB = mkOption {
description = "Colorize #RRGGBB hex codes";
default = null;
type = nullOr bool;
};
names = mkOption {
description = ''Colorize "Name" codes like Blue'';
default = null;
type = nullOr bool;
};
RRGGBBAA = mkOption {
description = "Colorize #RRGGBBAA hex codes";
default = null;
type = nullOr bool;
};
AARRGGBB = mkOption {
description = "Colorize 0xAARRGGBB hex codes";
default = null;
type = nullOr bool;
};
rgb_fn = mkOption {
description = "Colorize CSS rgb() and rgba() functions";
default = null;
type = nullOr bool;
};
hsl_fn = mkOption {
description = "Colorize CSS hsl() and hsla() functions";
default = null;
type = nullOr bool;
};
css = mkOption {
description = "Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB";
default = null;
type = nullOr bool;
};
css_fn = mkOption {
description = "Enable all CSS *functions*: rgb_fn, hsl_fn";
default = null;
type = nullOr bool;
};
tailwind = mkOption {
description = "Enable tailwind colors";
default = null;
type = nullOr bool;
};
sass = mkOption {
description = "Enable sass colors";
default = null;
type = nullOr bool;
};
virtualtext = mkOption {
description = "String to display as virtualtext";
type = nullOr str;
default = null;
};
mode = mkOption {
description = "Set the display mode";
type = nullOr (enum ["foreground" "background"]);
default = null;
};
always_update = mkOption {
description = "Update color values even if buffer is not focused. Example use: cmp_menu, cmp_docs";
default = null;
type = nullOr bool;
};
};
};
in {
imports = [
(mkRenamedOptionModule ["vim" "ui" "colorizer" "options"] ["vim" "ui" "colorizer" "setupOpts" "user_default_options"])
(mkRenamedOptionModule ["vim" "ui" "colorizer" "options"] ["vim" "ui" "colorizer" "setupOpts" "defaultOptions"])
(mkRenamedOptionModule ["vim" "ui" "colorizer" "filetypes"] ["vim" "ui" "colorizer" "setupOpts" "filetypes"])
];
options.vim.ui.colorizer = {
enable = mkEnableOption "color highlighting [nvim-colorizer.lua]";
setupOpts = mkPluginSetupOption "nvim-colorizer" {
setupOpts = mkPluginSetupOption "colorizer" {
filetypes = mkOption {
type = attrsOf attrs;
default = {
css = {};
scss = {};
description = ''
Filetypes to enable on and their option overrides.
"*" means enable on all filetypes. Filetypes prefixed with "!" are disabled.
'';
default = {};
example = {
"*" = {};
"!vim" = {};
javascript = {
AARRGGBB = false;
};
};
description = "Filetypes to highlight on";
type = attrsOf settingSubmodule;
};
user_default_options = {
rgb = mkOption {
type = bool;
default = true;
description = "#RGB hex codes";
};
rrggbb = mkOption {
type = bool;
default = true;
description = "#RRGGBB hex codes";
};
names = mkOption {
type = bool;
default = true;
description = ''"Name" codes such as "Blue"'';
};
rgb_fn = mkOption {
type = bool;
default = false;
description = "CSS rgb() and rgba() functions";
};
rrggbbaa = mkOption {
type = bool;
default = false;
description = "#RRGGBBAA hex codes";
};
hsl_fn = mkOption {
type = bool;
default = false;
description = "CSS hsl() and hsla() functions";
};
css = mkOption {
type = bool;
default = false;
description = "Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB";
};
css_fn = mkOption {
type = bool;
default = false;
description = "Enable all CSS *functions*: rgb_fn, hsl_fn";
};
mode = mkOption {
type = enum ["foreground" "background"];
default = "background";
description = "Set the display mode";
};
tailwind = mkOption {
type = bool;
default = false;
description = "Enable tailwind colors";
};
sass = mkOption {
type = bool;
default = false;
description = "Enable sass colors";
};
alwaysUpdate = mkOption {
type = bool;
default = false;
description = "Update color values even if buffer is not focused, like when using cmp_menu, cmp_docs";
};
user_default_options = mkOption {
description = "Default options";
default = {};
type = settingSubmodule;
};
};
};

View File

@ -4,14 +4,14 @@
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) attrsOf str;
inherit (lib.types) attrsOf nullOr str;
in {
options.vim.binds.whichKey = {
enable = mkEnableOption "which-key keybind helper menu";
register = mkOption {
description = "Register label for which-key keybind helper menu";
type = attrsOf str;
type = attrsOf (nullOr str);
default = {};
};
};

View File

@ -4,10 +4,9 @@
...
}: let
inherit (lib.modules) mkRemovedOptionModule mkRenamedOptionModule;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.attrsets) mapAttrs;
inherit (lib.options) mkEnableOption mkOption literalExpression;
inherit (lib.strings) toUpper;
inherit (lib.types) int float bool str enum listOf attrsOf anything;
inherit (lib.types) int float bool str enum listOf attrsOf oneOf nullOr submodule;
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
inherit (lib.generators) mkLuaInline;
in {
@ -176,9 +175,183 @@ in {
'';
};
overrides = mkOption {
description = "Override options from the default notification config";
type = attrsOf (attrsOf anything);
default = {rust_analyzer = {name = "rust-analyzer";};};
description = ''
Overrides the default configuration for a notification group defined
in [](#opt-vim.visuals.fidget-nvim.setupOpts.notification.configs).
If any of the fields are null, the value from the default
configuration is used.
If default configuration is not defined, the following defaults are used:
```lua
{
name = "Notifications",
icon = "",
ttl = 5,
group_style = "Title",
icon_style = "Special",
annote_style = "Question",
debug_style = "Comment",
info_style = "Question",
warn_style = "WarningMsg",
error_style = "ErrorMsg",
debug_annote = "DEBUG",
info_annote = "INFO",
warn_annote = "WARN",
error_annote = "ERROR",
update_hook = function(item)
notification.set_content_key(item)
end,
}
```
'';
type = attrsOf (submodule {
options = {
name = mkOption {
description = ''
Name of the group, displayed in the notification window.
Can be a string or a function that returns a string.
If a function, it is invoked every render cycle with the items
list, useful for rendering animations and other dynamic content.
::: {.note}
If you're looking for detailed information into the function
signature, you can refer to the fidget API documentation available
[here](https://github.com/j-hui/fidget.nvim/blob/1ba38e4cbb24683973e00c2e36f53ae64da38ef5/doc/fidget-api.txt#L70-L77)
:::
'';
type = nullOr (oneOf [str luaInline]);
default = null;
};
icon = mkOption {
description = ''
Icon of the group, displayed in the notification window.
Can be a string or a function that returns a string.
If a function, it is invoked every render cycle with the items
list, useful for rendering animations and other dynamic content.
::: {.note}
If you're looking for detailed information into the function
signature, you can refer to the fidget API documentation available
[here](https://github.com/j-hui/fidget.nvim/blob/1ba38e4cbb24683973e00c2e36f53ae64da38ef5/doc/fidget-api.txt#L70-L77)
:::
'';
type = nullOr (oneOf [str luaInline]);
default = null;
};
icon_on_left = mkOption {
description = "If true, icon is rendered on the left instead of right";
type = nullOr bool;
default = null;
};
annote_separator = mkOption {
description = "Separator between message from annote";
type = nullOr str;
default = " ";
};
ttl = mkOption {
description = "How long a notification item should exist";
type = nullOr int;
default = 5;
};
render_limit = mkOption {
description = "How many notification items to show at once";
type = nullOr int;
default = null;
};
group_style = mkOption {
description = "Style used to highlight group name";
type = nullOr str;
default = "Title";
};
icon_style = mkOption {
description = "Style used to highlight icon, if null, use group_style";
type = nullOr str;
default = null;
};
annote_style = mkOption {
description = "Default style used to highlight item annotes";
type = nullOr str;
default = "Question";
};
debug_style = mkOption {
description = "Style used to highlight debug item annotes";
type = nullOr str;
default = null;
};
info_style = mkOption {
description = "Style used to highlight info item annotes";
type = nullOr str;
default = null;
};
warn_style = mkOption {
description = "Style used to highlight warn item annotes";
type = nullOr str;
default = null;
};
error_style = mkOption {
description = "Style used to highlight error item annotes";
type = nullOr str;
default = null;
};
debug_annote = mkOption {
description = "Default annotation for debug items";
type = nullOr str;
default = null;
};
info_annote = mkOption {
description = "Default annotation for info items";
type = nullOr str;
default = null;
};
warn_annote = mkOption {
description = "Default annotation for warn items";
type = nullOr str;
default = null;
};
error_annote = mkOption {
description = "Default annotation for error items";
type = nullOr str;
default = null;
};
priority = mkOption {
description = "Order in which group should be displayed";
type = nullOr int;
default = 50;
};
skip_history = mkOption {
description = "Whether messages should be preserved in history";
type = nullOr bool;
default = null;
};
update_hook = mkOption {
description = ''
Called when an item is updated.
If false, no action is taken.
If a function, it is invoked with the item being updated.
::: {.note}
If you're looking for detailed information into the function
signature, you can refer to the fidget API documentation available
[here](https://github.com/j-hui/fidget.nvim/blob/1ba38e4cbb24683973e00c2e36f53ae64da38ef5/doc/fidget-api.txt#L114)
:::
'';
type = nullOr (oneOf [bool luaInline]);
default = false;
};
};
});
default = {};
example = literalExpression ''
{
rust_analyzer = {
name = "Rust Analyzer";
};
}
'';
};
};

View File

@ -1,53 +0,0 @@
{
pkgs,
lib,
...
}: let
inherit (lib) mkMappingOption mkEnableOption mkOption types;
in {
options.vim.telescope = {
mappings = {
findProjects = mkMappingOption "Find files [Telescope]" "<leader>fp";
findFiles = mkMappingOption "Find files [Telescope]" "<leader>ff";
liveGrep = mkMappingOption "Live grep [Telescope]" "<leader>fg";
buffers = mkMappingOption "Buffers [Telescope]" "<leader>fb";
helpTags = mkMappingOption "Help tags [Telescope]" "<leader>fh";
open = mkMappingOption "Open [Telescope]" "<leader>ft";
gitCommits = mkMappingOption "Git commits [Telescope]" "<leader>fvcw";
gitBufferCommits = mkMappingOption "Git buffer commits [Telescope]" "<leader>fvcb";
gitBranches = mkMappingOption "Git branches [Telescope]" "<leader>fvb";
gitStatus = mkMappingOption "Git status [Telescope]" "<leader>fvs";
gitStash = mkMappingOption "Git stash [Telescope]" "<leader>fvx";
lspDocumentSymbols = mkMappingOption "LSP Document Symbols [Telescope]" "<leader>flsb";
lspWorkspaceSymbols = mkMappingOption "LSP Workspace Symbols [Telescope]" "<leader>flsw";
lspReferences = mkMappingOption "LSP References [Telescope]" "<leader>flr";
lspImplementations = mkMappingOption "LSP Implementations [Telescope]" "<leader>fli";
lspDefinitions = mkMappingOption "LSP Definitions [Telescope]" "<leader>flD";
lspTypeDefinitions = mkMappingOption "LSP Type Definitions [Telescope]" "<leader>flt";
diagnostics = mkMappingOption "Diagnostics [Telescope]" "<leader>fld";
treesitter = mkMappingOption "Treesitter [Telescope]" "<leader>fs";
};
enable = mkEnableOption "telescope.nvim: multi-purpose search and picker utility";
vimgrep_arguments = mkOption {
description = "Arguments to use for the grep command";
type = types.listOf types.str;
default = [
"${pkgs.ripgrep}/bin/rg"
"--color=never"
"--no-heading"
"--with-filename"
"--line-number"
"--column"
"--smart-case"
"--hidden"
"--no-ignore"
];
};
};
}

View File

@ -3,7 +3,7 @@
lib,
...
}: let
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.options) mkOption mkEnableOption literalMD;
inherit (lib.types) package bool str listOf attrsOf;
inherit (lib.nvim.types) pluginsOpt extraPluginType;
in {
@ -38,7 +38,7 @@ in {
startPlugins = pluginsOpt {
default = ["plenary-nvim"];
example = literalExpression ''
example = ''
[pkgs.vimPlugins.telescope-nvim]
'';
@ -54,7 +54,7 @@ in {
optPlugins = pluginsOpt {
default = [];
example = literalExpression ''
example = ''
[pkgs.vimPlugins.vim-ghost]
'';
description = ''
@ -80,7 +80,8 @@ in {
your custom plugins using nvf's modified DAG library.
'';
example = literalExpression ''
example = literalMD ''
```nix
with pkgs.vimPlugins; {
aerial = {
package = aerial-nvim;
@ -93,13 +94,14 @@ in {
after = ["aerial"]; # place harpoon configuration after aerial
};
}
```
'';
};
extraPackages = mkOption {
type = listOf package;
default = [];
example = literalExpression ''[pkgs.fzf pkgs.ripgrep]'';
example = ''[pkgs.fzf pkgs.ripgrep]'';
description = ''
List of additional packages to make available to the Neovim
wrapper.
@ -107,7 +109,7 @@ in {
};
# this defaults to `true` in the wrapper
# and since we passs this value to the wrapper
# and since we pass this value to the wrapper
# with an inherit, it should be `true` here as well
withRuby =
mkEnableOption ''
@ -118,29 +120,25 @@ in {
};
withNodeJs = mkEnableOption ''
NodeJs support in the Neovim wrapper.
NodeJs support in the Neovim wrapper
'';
luaPackages = mkOption {
type = listOf str;
default = [];
example = literalExpression ''["magick" "serpent"]'';
description = ''
List of lua packages to install.
'';
example = ''["magick" "serpent"]'';
description = "List of lua packages to install";
};
withPython3 = mkEnableOption ''
Python3 support in the Neovim wrapper.
Python3 support in the Neovim wrapper
'';
python3Packages = mkOption {
type = listOf str;
default = [];
example = literalExpression ''["pynvim"]'';
description = ''
List of python packages to install.
'';
example = ''["pynvim"]'';
description = "List of python packages to install";
};
};
}

View File

@ -60,16 +60,11 @@
config = (attrs) the configuration options for this mapping (noremap, silent...)
}
*/
normalizeAction = action: let
normalizeAction = action: {
# Extract the values of the config options that have been explicitly set by the user
config =
filterAttrs (_: v: v != null)
(getAttrs (attrNames mapConfigOptions) action);
in {
config =
if config == {}
then {"__empty" = null;}
else config;
action =
if action.lua
then mkLuaInline action.action
@ -133,6 +128,14 @@ in {
configRC = {
globalsScript = entryAnywhere (concatStringsSep "\n" globalsScript);
# Call additional lua files with :luafile in Vimscript
# section of the configuration, only after
# the luaScript section has been evaluated
extraLuaFiles = let
callLuaFiles = map (file: "luafile ${file}") cfg.extraLuaFiles;
in
entryAfter ["globalScript"] (concatStringsSep "\n" callLuaFiles);
# wrap the lua config in a lua block
# using the wrapLuaConfic function from the lib
luaScript = let
@ -148,7 +151,7 @@ in {
inherit mapResult;
};
in
entryAfter ["globalsScript"] luaConfig;
entryAnywhere luaConfig;
extraPluginConfigs = let
mapResult = result: (wrapLuaConfig {

View File

@ -37,8 +37,8 @@ in {
To avoid leaking imperative user configuration into your
configuration, this is enabled by default. If you wish
to load configuration from user configuration directories
(e.g. `$HOME/.config/nvim`, `$HOME/.config/nvim/after`
and `$HOME/.local/share/nvim/site`) you may set this
(e.g. {file}`$HOME/.config/nvim`, {file}`$HOME/.config/nvim/after`
and {file}`$HOME/.local/share/nvim/site`) you may set this
option to true.
:::
'';
@ -68,16 +68,52 @@ in {
active runtimepath of the Neovim. This can be used to
add additional lookup paths for configs, plugins, spell
languages and other things you would generally place in
your `$HOME/.config/nvim`.
your {file}`$HOME/.config/nvim`.
This is meant as a declarative alternative to throwing
files into `~/.config/nvim` and having the Neovim
files into {file}`~/.config/nvim` and having the Neovim
wrapper pick them up. For more details on
`vim.o.runtimepath`, and what paths to use; please see
[the official documentation](https://neovim.io/doc/user/options.html#'runtimepath')
'';
};
extraLuaFiles = mkOption {
type = listOf (either path str);
default = [];
example = literalExpression ''
[
# absolute path, as a string - impure
"$HOME/.config/nvim/my-lua-file.lua"
# relative path, as a path - pure
./nvim/my-lua-file.lua
# source type path - pure and reproducible
(builtins.source {
path = ./nvim/my-lua-file.lua;
name = "my-lua-file";
})
]
'';
description = ''
Additional lua files that will be sourced by Neovim.
Takes both absolute and relative paths, all of which
will be called via the `luafile` command in Neovim.
See [lua-commands](https://neovim.io/doc/user/lua.html#lua-commands)
on the Neovim documentation for more details.
::: {.warning}
All paths passed to this option must be valid. If Neovim cannot
resolve the path you are attempting to sourcee, then your configuration
will error, and Neovim will not start. Please ensure that all paths
are correct before using this option.
:::
'';
};
globals = mkOption {
type = attrs;
default = {};