From 7c730a78e5dab142e09feadac9bd9e4a23182ef3 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 7 Apr 2024 17:16:08 +0300 Subject: [PATCH 01/14] treewide: begin restructuring the module tree --- flake/modules/home-manager.nix | 20 +- lib/default.nix | 1 - modules/basic/config.nix | 188 --------- modules/core/build/config.nix | 322 ++++++++++++++ modules/{basic => core/build}/default.nix | 4 +- modules/core/build/options.nix | 87 ++++ modules/core/default.nix | 396 +----------------- modules/core/warnings/default.nix | 31 ++ modules/modules.nix | 75 ++-- .../module.nix => neovim/basic/configrc.nix} | 177 ++++++-- modules/neovim/basic/default.nix | 6 + modules/neovim/basic/spellcheck.nix | 38 ++ modules/neovim/config.nix | 5 + modules/neovim/default.nix | 8 + modules/neovim/mappings/default.nix | 55 +++ .../assistant/copilot/config.nix | 0 .../assistant/copilot/copilot.nix | 0 .../assistant/copilot/default.nix | 0 modules/{ => plugins}/assistant/default.nix | 0 modules/{ => plugins}/autopairs/default.nix | 0 .../autopairs/nvim-autopairs/config.nix | 0 .../autopairs/nvim-autopairs/default.nix | 0 .../nvim-autopairs/nvim-autopairs.nix | 0 .../comments/comment-nvim/comment-nvim.nix | 0 .../comments/comment-nvim/config.nix | 0 .../comments/comment-nvim/default.nix | 0 modules/{ => plugins}/comments/default.nix | 0 modules/{ => plugins}/completion/default.nix | 0 .../completion/nvim-cmp/config.nix | 0 .../completion/nvim-cmp/default.nix | 0 .../completion/nvim-cmp/nvim-cmp.nix | 0 .../{ => plugins}/dashboard/alpha/alpha.nix | 0 .../{ => plugins}/dashboard/alpha/config.nix | 0 .../{ => plugins}/dashboard/alpha/default.nix | 0 .../dashboard/dashboard-nvim/config.nix | 0 .../dashboard-nvim/dashboard-nvim.nix | 0 .../dashboard/dashboard-nvim/default.nix | 0 modules/{ => plugins}/dashboard/default.nix | 0 .../dashboard/startify/config.nix | 0 .../dashboard/startify/default.nix | 0 .../dashboard/startify/startify.nix | 0 modules/{ => plugins}/debugger/default.nix | 0 .../debugger/nvim-dap/config.nix | 0 .../debugger/nvim-dap/default.nix | 0 .../debugger/nvim-dap/nvim-dap.nix | 0 modules/{ => plugins}/filetree/default.nix | 0 .../filetree/nvimtree/config.nix | 0 .../filetree/nvimtree/default.nix | 0 .../filetree/nvimtree/nvimtree.nix | 0 modules/{ => plugins}/git/config.nix | 0 modules/{ => plugins}/git/default.nix | 0 modules/{ => plugins}/git/git.nix | 0 modules/{ => plugins}/languages/bash/bash.nix | 0 .../{ => plugins}/languages/bash/config.nix | 0 .../{ => plugins}/languages/bash/default.nix | 0 modules/{ => plugins}/languages/clang.nix | 0 modules/{ => plugins}/languages/css.nix | 0 .../{ => plugins}/languages/dart/config.nix | 0 modules/{ => plugins}/languages/dart/dart.nix | 0 .../{ => plugins}/languages/dart/default.nix | 0 modules/{ => plugins}/languages/default.nix | 0 .../{ => plugins}/languages/elixir/config.nix | 0 .../languages/elixir/default.nix | 0 .../languages/elixir/elixir-tools.nix | 0 modules/{ => plugins}/languages/go.nix | 0 modules/{ => plugins}/languages/html.nix | 0 modules/{ => plugins}/languages/java.nix | 0 modules/{ => plugins}/languages/lua.nix | 0 .../languages/markdown/config.nix | 0 .../languages/markdown/default.nix | 0 .../languages/markdown/markdown.nix | 0 modules/{ => plugins}/languages/nim.nix | 0 modules/{ => plugins}/languages/nix.nix | 0 modules/{ => plugins}/languages/php.nix | 0 modules/{ => plugins}/languages/python.nix | 0 modules/{ => plugins}/languages/rust.nix | 0 modules/{ => plugins}/languages/sql.nix | 0 modules/{ => plugins}/languages/svelte.nix | 0 modules/{ => plugins}/languages/tailwind.nix | 0 modules/{ => plugins}/languages/terraform.nix | 0 .../{ => plugins}/languages/tidal/config.nix | 0 .../{ => plugins}/languages/tidal/default.nix | 0 .../{ => plugins}/languages/tidal/tidal.nix | 0 modules/{ => plugins}/languages/ts.nix | 0 modules/{ => plugins}/languages/zig.nix | 0 modules/{ => plugins}/lsp/config.nix | 0 modules/{ => plugins}/lsp/default.nix | 0 .../{ => plugins}/lsp/lightbulb/config.nix | 0 .../{ => plugins}/lsp/lightbulb/default.nix | 0 .../{ => plugins}/lsp/lightbulb/lightbulb.nix | 0 .../lsp/lsp-signature/config.nix | 0 .../lsp/lsp-signature/default.nix | 0 .../lsp/lsp-signature/lsp-signature.nix | 0 .../{ => plugins}/lsp/lspconfig/config.nix | 0 .../{ => plugins}/lsp/lspconfig/default.nix | 0 .../{ => plugins}/lsp/lspconfig/lspconfig.nix | 0 modules/{ => plugins}/lsp/lspkind/config.nix | 0 modules/{ => plugins}/lsp/lspkind/default.nix | 0 modules/{ => plugins}/lsp/lspkind/lspkind.nix | 0 modules/{ => plugins}/lsp/lsplines/config.nix | 0 .../{ => plugins}/lsp/lsplines/default.nix | 0 .../{ => plugins}/lsp/lsplines/lsplines.nix | 0 modules/{ => plugins}/lsp/lspsaga/config.nix | 0 modules/{ => plugins}/lsp/lspsaga/default.nix | 0 modules/{ => plugins}/lsp/lspsaga/lspsaga.nix | 0 modules/{ => plugins}/lsp/module.nix | 0 modules/{ => plugins}/lsp/null-ls/config.nix | 0 modules/{ => plugins}/lsp/null-ls/default.nix | 0 modules/{ => plugins}/lsp/null-ls/null-ls.nix | 0 .../lsp/nvim-code-action-menu/config.nix | 0 .../lsp/nvim-code-action-menu/default.nix | 0 .../nvim-code-action-menu.nix | 0 .../lsp/nvim-docs-view/config.nix | 0 .../lsp/nvim-docs-view/default.nix | 0 .../lsp/nvim-docs-view/nvim-docs-view.nix | 0 modules/{ => plugins}/lsp/trouble/config.nix | 0 modules/{ => plugins}/lsp/trouble/default.nix | 0 modules/{ => plugins}/lsp/trouble/trouble.nix | 0 .../minimap/codewindow/codewindow.nix | 0 .../minimap/codewindow/config.nix | 0 .../minimap/codewindow/default.nix | 0 modules/{ => plugins}/minimap/default.nix | 0 .../minimap/minimap-vim/config.nix | 0 .../minimap/minimap-vim/default.nix | 0 .../minimap/minimap-vim/minimap-vim.nix | 0 modules/{ => plugins}/notes/default.nix | 0 .../{ => plugins}/notes/mind-nvim/config.nix | 0 .../{ => plugins}/notes/mind-nvim/default.nix | 0 .../notes/mind-nvim/mind-nvim.nix | 0 .../{ => plugins}/notes/obsidian/config.nix | 0 .../{ => plugins}/notes/obsidian/default.nix | 0 .../{ => plugins}/notes/obsidian/obsidian.nix | 0 .../{ => plugins}/notes/orgmode/config.nix | 0 .../{ => plugins}/notes/orgmode/default.nix | 0 .../{ => plugins}/notes/orgmode/orgmode.nix | 0 .../notes/todo-comments/config.nix | 0 .../notes/todo-comments/default.nix | 0 .../notes/todo-comments/todo-comments.nix | 0 modules/{ => plugins}/projects/default.nix | 0 .../projects/project-nvim/config.nix | 0 .../projects/project-nvim/default.nix | 0 .../projects/project-nvim/project-nvim.nix | 0 .../{ => plugins}/rich-presence/default.nix | 0 .../rich-presence/neocord/config.nix | 0 .../rich-presence/neocord/default.nix | 0 .../rich-presence/neocord/neocord.nix | 0 modules/{ => plugins}/session/default.nix | 0 .../session/nvim-session-manager/config.nix | 0 .../session/nvim-session-manager/default.nix | 0 .../nvim-session-manager.nix | 0 modules/{ => plugins}/snippets/default.nix | 0 .../{ => plugins}/snippets/vsnip/config.nix | 0 .../{ => plugins}/snippets/vsnip/default.nix | 0 .../{ => plugins}/snippets/vsnip/vsnip.nix | 0 modules/{ => plugins}/statusline/default.nix | 0 .../statusline/lualine/config.nix | 0 .../statusline/lualine/default.nix | 0 .../statusline/lualine/lualine.nix | 0 .../statusline/lualine/supported_themes.nix | 0 modules/{ => plugins}/tabline/default.nix | 0 .../tabline/nvim-bufferline/config.nix | 0 .../tabline/nvim-bufferline/default.nix | 0 .../nvim-bufferline/nvim-bufferline.nix | 0 modules/{ => plugins}/terminal/default.nix | 0 .../terminal/toggleterm/config.nix | 0 .../terminal/toggleterm/default.nix | 0 .../terminal/toggleterm/toggleterm.nix | 0 modules/{ => plugins}/theme/config.nix | 0 modules/{ => plugins}/theme/default.nix | 0 .../{ => plugins}/theme/supported_themes.nix | 0 modules/{ => plugins}/theme/theme.nix | 0 modules/{ => plugins}/treesitter/config.nix | 0 modules/{ => plugins}/treesitter/context.nix | 0 modules/{ => plugins}/treesitter/default.nix | 0 .../{ => plugins}/treesitter/treesitter.nix | 0 modules/{ => plugins}/ui/borders/borders.nix | 0 modules/{ => plugins}/ui/borders/default.nix | 0 .../ui/breadcrumbs/breadcrumbs.nix | 0 .../{ => plugins}/ui/breadcrumbs/config.nix | 0 .../{ => plugins}/ui/breadcrumbs/default.nix | 0 .../{ => plugins}/ui/colorizer/colorizer.nix | 0 modules/{ => plugins}/ui/colorizer/config.nix | 0 .../{ => plugins}/ui/colorizer/default.nix | 0 modules/{ => plugins}/ui/default.nix | 0 .../{ => plugins}/ui/illuminate/config.nix | 0 .../{ => plugins}/ui/illuminate/default.nix | 0 .../ui/illuminate/illuminate.nix | 0 modules/{ => plugins}/ui/modes/config.nix | 0 modules/{ => plugins}/ui/modes/default.nix | 0 modules/{ => plugins}/ui/modes/modes.nix | 0 modules/{ => plugins}/ui/noice/config.nix | 0 modules/{ => plugins}/ui/noice/default.nix | 0 modules/{ => plugins}/ui/noice/noice.nix | 0 .../ui/notifications/default.nix | 0 .../ui/notifications/nvim-notify/config.nix | 0 .../ui/notifications/nvim-notify/default.nix | 0 .../notifications/nvim-notify/nvim-notify.nix | 0 .../{ => plugins}/ui/smartcolumn/config.nix | 0 .../{ => plugins}/ui/smartcolumn/default.nix | 0 .../ui/smartcolumn/smartcolumn.nix | 0 .../utility/binds/cheatsheet/cheatsheet.nix | 0 .../utility/binds/cheatsheet/config.nix | 0 .../utility/binds/cheatsheet/default.nix | 0 .../{ => plugins}/utility/binds/default.nix | 0 .../utility/binds/which-key/config.nix | 0 .../utility/binds/which-key/default.nix | 0 .../utility/binds/which-key/which-key.nix | 0 modules/{ => plugins}/utility/ccc/ccc.nix | 0 modules/{ => plugins}/utility/ccc/config.nix | 0 modules/{ => plugins}/utility/ccc/default.nix | 0 modules/{ => plugins}/utility/default.nix | 0 .../{ => plugins}/utility/diffview/config.nix | 0 .../utility/diffview/default.nix | 0 .../utility/diffview/diffview.nix | 0 .../utility/gestures/default.nix | 0 .../utility/gestures/gesture-nvim/config.nix | 0 .../utility/gestures/gesture-nvim/default.nix | 0 .../gestures/gesture-nvim/gesture-nvim.nix | 0 .../utility/icon-picker/config.nix | 0 .../utility/icon-picker/default.nix | 0 .../utility/icon-picker/icon-picker.nix | 0 .../{ => plugins}/utility/images/default.nix | 0 .../utility/images/image-nvim/config.nix | 0 .../utility/images/image-nvim/default.nix | 0 .../utility/images/image-nvim/image-nvim.nix | 0 .../{ => plugins}/utility/motion/default.nix | 0 .../utility/motion/hop/config.nix | 0 .../utility/motion/hop/default.nix | 0 .../{ => plugins}/utility/motion/hop/hop.nix | 0 .../utility/motion/leap/config.nix | 0 .../utility/motion/leap/default.nix | 0 .../utility/motion/leap/leap.nix | 0 .../{ => plugins}/utility/preview/default.nix | 0 .../utility/preview/glow/config.nix | 0 .../utility/preview/glow/default.nix | 0 .../utility/preview/glow/glow.nix | 0 .../preview/markdown-preview/config.nix | 0 .../preview/markdown-preview/default.nix | 0 .../markdown-preview/markdown-preview.nix | 0 .../{ => plugins}/utility/surround/config.nix | 0 .../utility/surround/default.nix | 0 .../utility/surround/surround.nix | 0 .../utility/telescope/config.nix | 0 .../utility/telescope/default.nix | 0 .../utility/telescope/telescope.nix | 0 .../{ => plugins}/utility/wakatime/config.nix | 0 .../utility/wakatime/default.nix | 0 .../utility/wakatime/vim-wakatime.nix | 0 modules/{ => plugins}/visuals/config.nix | 0 modules/{ => plugins}/visuals/default.nix | 0 .../{ => plugins}/visuals/fidget/config.nix | 0 .../{ => plugins}/visuals/fidget/default.nix | 0 .../{ => plugins}/visuals/fidget/fidget.nix | 0 modules/{ => plugins}/visuals/visuals.nix | 0 254 files changed, 749 insertions(+), 664 deletions(-) delete mode 100644 modules/basic/config.nix create mode 100644 modules/core/build/config.nix rename modules/{basic => core/build}/default.nix (63%) create mode 100644 modules/core/build/options.nix create mode 100644 modules/core/warnings/default.nix rename modules/{basic/module.nix => neovim/basic/configrc.nix} (54%) create mode 100644 modules/neovim/basic/default.nix create mode 100644 modules/neovim/basic/spellcheck.nix create mode 100644 modules/neovim/config.nix create mode 100644 modules/neovim/default.nix create mode 100644 modules/neovim/mappings/default.nix rename modules/{ => plugins}/assistant/copilot/config.nix (100%) rename modules/{ => plugins}/assistant/copilot/copilot.nix (100%) rename modules/{ => plugins}/assistant/copilot/default.nix (100%) rename modules/{ => plugins}/assistant/default.nix (100%) rename modules/{ => plugins}/autopairs/default.nix (100%) rename modules/{ => plugins}/autopairs/nvim-autopairs/config.nix (100%) rename modules/{ => plugins}/autopairs/nvim-autopairs/default.nix (100%) rename modules/{ => plugins}/autopairs/nvim-autopairs/nvim-autopairs.nix (100%) rename modules/{ => plugins}/comments/comment-nvim/comment-nvim.nix (100%) rename modules/{ => plugins}/comments/comment-nvim/config.nix (100%) rename modules/{ => plugins}/comments/comment-nvim/default.nix (100%) rename modules/{ => plugins}/comments/default.nix (100%) rename modules/{ => plugins}/completion/default.nix (100%) rename modules/{ => plugins}/completion/nvim-cmp/config.nix (100%) rename modules/{ => plugins}/completion/nvim-cmp/default.nix (100%) rename modules/{ => plugins}/completion/nvim-cmp/nvim-cmp.nix (100%) rename modules/{ => plugins}/dashboard/alpha/alpha.nix (100%) rename modules/{ => plugins}/dashboard/alpha/config.nix (100%) rename modules/{ => plugins}/dashboard/alpha/default.nix (100%) rename modules/{ => plugins}/dashboard/dashboard-nvim/config.nix (100%) rename modules/{ => plugins}/dashboard/dashboard-nvim/dashboard-nvim.nix (100%) rename modules/{ => plugins}/dashboard/dashboard-nvim/default.nix (100%) rename modules/{ => plugins}/dashboard/default.nix (100%) rename modules/{ => plugins}/dashboard/startify/config.nix (100%) rename modules/{ => plugins}/dashboard/startify/default.nix (100%) rename modules/{ => plugins}/dashboard/startify/startify.nix (100%) rename modules/{ => plugins}/debugger/default.nix (100%) rename modules/{ => plugins}/debugger/nvim-dap/config.nix (100%) rename modules/{ => plugins}/debugger/nvim-dap/default.nix (100%) rename modules/{ => plugins}/debugger/nvim-dap/nvim-dap.nix (100%) rename modules/{ => plugins}/filetree/default.nix (100%) rename modules/{ => plugins}/filetree/nvimtree/config.nix (100%) rename modules/{ => plugins}/filetree/nvimtree/default.nix (100%) rename modules/{ => plugins}/filetree/nvimtree/nvimtree.nix (100%) rename modules/{ => plugins}/git/config.nix (100%) rename modules/{ => plugins}/git/default.nix (100%) rename modules/{ => plugins}/git/git.nix (100%) rename modules/{ => plugins}/languages/bash/bash.nix (100%) rename modules/{ => plugins}/languages/bash/config.nix (100%) rename modules/{ => plugins}/languages/bash/default.nix (100%) rename modules/{ => plugins}/languages/clang.nix (100%) rename modules/{ => plugins}/languages/css.nix (100%) rename modules/{ => plugins}/languages/dart/config.nix (100%) rename modules/{ => plugins}/languages/dart/dart.nix (100%) rename modules/{ => plugins}/languages/dart/default.nix (100%) rename modules/{ => plugins}/languages/default.nix (100%) rename modules/{ => plugins}/languages/elixir/config.nix (100%) rename modules/{ => plugins}/languages/elixir/default.nix (100%) rename modules/{ => plugins}/languages/elixir/elixir-tools.nix (100%) rename modules/{ => plugins}/languages/go.nix (100%) rename modules/{ => plugins}/languages/html.nix (100%) rename modules/{ => plugins}/languages/java.nix (100%) rename modules/{ => plugins}/languages/lua.nix (100%) rename modules/{ => plugins}/languages/markdown/config.nix (100%) rename modules/{ => plugins}/languages/markdown/default.nix (100%) rename modules/{ => plugins}/languages/markdown/markdown.nix (100%) rename modules/{ => plugins}/languages/nim.nix (100%) rename modules/{ => plugins}/languages/nix.nix (100%) rename modules/{ => plugins}/languages/php.nix (100%) rename modules/{ => plugins}/languages/python.nix (100%) rename modules/{ => plugins}/languages/rust.nix (100%) rename modules/{ => plugins}/languages/sql.nix (100%) rename modules/{ => plugins}/languages/svelte.nix (100%) rename modules/{ => plugins}/languages/tailwind.nix (100%) rename modules/{ => plugins}/languages/terraform.nix (100%) rename modules/{ => plugins}/languages/tidal/config.nix (100%) rename modules/{ => plugins}/languages/tidal/default.nix (100%) rename modules/{ => plugins}/languages/tidal/tidal.nix (100%) rename modules/{ => plugins}/languages/ts.nix (100%) rename modules/{ => plugins}/languages/zig.nix (100%) rename modules/{ => plugins}/lsp/config.nix (100%) rename modules/{ => plugins}/lsp/default.nix (100%) rename modules/{ => plugins}/lsp/lightbulb/config.nix (100%) rename modules/{ => plugins}/lsp/lightbulb/default.nix (100%) rename modules/{ => plugins}/lsp/lightbulb/lightbulb.nix (100%) rename modules/{ => plugins}/lsp/lsp-signature/config.nix (100%) rename modules/{ => plugins}/lsp/lsp-signature/default.nix (100%) rename modules/{ => plugins}/lsp/lsp-signature/lsp-signature.nix (100%) rename modules/{ => plugins}/lsp/lspconfig/config.nix (100%) rename modules/{ => plugins}/lsp/lspconfig/default.nix (100%) rename modules/{ => plugins}/lsp/lspconfig/lspconfig.nix (100%) rename modules/{ => plugins}/lsp/lspkind/config.nix (100%) rename modules/{ => plugins}/lsp/lspkind/default.nix (100%) rename modules/{ => plugins}/lsp/lspkind/lspkind.nix (100%) rename modules/{ => plugins}/lsp/lsplines/config.nix (100%) rename modules/{ => plugins}/lsp/lsplines/default.nix (100%) rename modules/{ => plugins}/lsp/lsplines/lsplines.nix (100%) rename modules/{ => plugins}/lsp/lspsaga/config.nix (100%) rename modules/{ => plugins}/lsp/lspsaga/default.nix (100%) rename modules/{ => plugins}/lsp/lspsaga/lspsaga.nix (100%) rename modules/{ => plugins}/lsp/module.nix (100%) rename modules/{ => plugins}/lsp/null-ls/config.nix (100%) rename modules/{ => plugins}/lsp/null-ls/default.nix (100%) rename modules/{ => plugins}/lsp/null-ls/null-ls.nix (100%) rename modules/{ => plugins}/lsp/nvim-code-action-menu/config.nix (100%) rename modules/{ => plugins}/lsp/nvim-code-action-menu/default.nix (100%) rename modules/{ => plugins}/lsp/nvim-code-action-menu/nvim-code-action-menu.nix (100%) rename modules/{ => plugins}/lsp/nvim-docs-view/config.nix (100%) rename modules/{ => plugins}/lsp/nvim-docs-view/default.nix (100%) rename modules/{ => plugins}/lsp/nvim-docs-view/nvim-docs-view.nix (100%) rename modules/{ => plugins}/lsp/trouble/config.nix (100%) rename modules/{ => plugins}/lsp/trouble/default.nix (100%) rename modules/{ => plugins}/lsp/trouble/trouble.nix (100%) rename modules/{ => plugins}/minimap/codewindow/codewindow.nix (100%) rename modules/{ => plugins}/minimap/codewindow/config.nix (100%) rename modules/{ => plugins}/minimap/codewindow/default.nix (100%) rename modules/{ => plugins}/minimap/default.nix (100%) rename modules/{ => plugins}/minimap/minimap-vim/config.nix (100%) rename modules/{ => plugins}/minimap/minimap-vim/default.nix (100%) rename modules/{ => plugins}/minimap/minimap-vim/minimap-vim.nix (100%) rename modules/{ => plugins}/notes/default.nix (100%) rename modules/{ => plugins}/notes/mind-nvim/config.nix (100%) rename modules/{ => plugins}/notes/mind-nvim/default.nix (100%) rename modules/{ => plugins}/notes/mind-nvim/mind-nvim.nix (100%) rename modules/{ => plugins}/notes/obsidian/config.nix (100%) rename modules/{ => plugins}/notes/obsidian/default.nix (100%) rename modules/{ => plugins}/notes/obsidian/obsidian.nix (100%) rename modules/{ => plugins}/notes/orgmode/config.nix (100%) rename modules/{ => plugins}/notes/orgmode/default.nix (100%) rename modules/{ => plugins}/notes/orgmode/orgmode.nix (100%) rename modules/{ => plugins}/notes/todo-comments/config.nix (100%) rename modules/{ => plugins}/notes/todo-comments/default.nix (100%) rename modules/{ => plugins}/notes/todo-comments/todo-comments.nix (100%) rename modules/{ => plugins}/projects/default.nix (100%) rename modules/{ => plugins}/projects/project-nvim/config.nix (100%) rename modules/{ => plugins}/projects/project-nvim/default.nix (100%) rename modules/{ => plugins}/projects/project-nvim/project-nvim.nix (100%) rename modules/{ => plugins}/rich-presence/default.nix (100%) rename modules/{ => plugins}/rich-presence/neocord/config.nix (100%) rename modules/{ => plugins}/rich-presence/neocord/default.nix (100%) rename modules/{ => plugins}/rich-presence/neocord/neocord.nix (100%) rename modules/{ => plugins}/session/default.nix (100%) rename modules/{ => plugins}/session/nvim-session-manager/config.nix (100%) rename modules/{ => plugins}/session/nvim-session-manager/default.nix (100%) rename modules/{ => plugins}/session/nvim-session-manager/nvim-session-manager.nix (100%) rename modules/{ => plugins}/snippets/default.nix (100%) rename modules/{ => plugins}/snippets/vsnip/config.nix (100%) rename modules/{ => plugins}/snippets/vsnip/default.nix (100%) rename modules/{ => plugins}/snippets/vsnip/vsnip.nix (100%) rename modules/{ => plugins}/statusline/default.nix (100%) rename modules/{ => plugins}/statusline/lualine/config.nix (100%) rename modules/{ => plugins}/statusline/lualine/default.nix (100%) rename modules/{ => plugins}/statusline/lualine/lualine.nix (100%) rename modules/{ => plugins}/statusline/lualine/supported_themes.nix (100%) rename modules/{ => plugins}/tabline/default.nix (100%) rename modules/{ => plugins}/tabline/nvim-bufferline/config.nix (100%) rename modules/{ => plugins}/tabline/nvim-bufferline/default.nix (100%) rename modules/{ => plugins}/tabline/nvim-bufferline/nvim-bufferline.nix (100%) rename modules/{ => plugins}/terminal/default.nix (100%) rename modules/{ => plugins}/terminal/toggleterm/config.nix (100%) rename modules/{ => plugins}/terminal/toggleterm/default.nix (100%) rename modules/{ => plugins}/terminal/toggleterm/toggleterm.nix (100%) rename modules/{ => plugins}/theme/config.nix (100%) rename modules/{ => plugins}/theme/default.nix (100%) rename modules/{ => plugins}/theme/supported_themes.nix (100%) rename modules/{ => plugins}/theme/theme.nix (100%) rename modules/{ => plugins}/treesitter/config.nix (100%) rename modules/{ => plugins}/treesitter/context.nix (100%) rename modules/{ => plugins}/treesitter/default.nix (100%) rename modules/{ => plugins}/treesitter/treesitter.nix (100%) rename modules/{ => plugins}/ui/borders/borders.nix (100%) rename modules/{ => plugins}/ui/borders/default.nix (100%) rename modules/{ => plugins}/ui/breadcrumbs/breadcrumbs.nix (100%) rename modules/{ => plugins}/ui/breadcrumbs/config.nix (100%) rename modules/{ => plugins}/ui/breadcrumbs/default.nix (100%) rename modules/{ => plugins}/ui/colorizer/colorizer.nix (100%) rename modules/{ => plugins}/ui/colorizer/config.nix (100%) rename modules/{ => plugins}/ui/colorizer/default.nix (100%) rename modules/{ => plugins}/ui/default.nix (100%) rename modules/{ => plugins}/ui/illuminate/config.nix (100%) rename modules/{ => plugins}/ui/illuminate/default.nix (100%) rename modules/{ => plugins}/ui/illuminate/illuminate.nix (100%) rename modules/{ => plugins}/ui/modes/config.nix (100%) rename modules/{ => plugins}/ui/modes/default.nix (100%) rename modules/{ => plugins}/ui/modes/modes.nix (100%) rename modules/{ => plugins}/ui/noice/config.nix (100%) rename modules/{ => plugins}/ui/noice/default.nix (100%) rename modules/{ => plugins}/ui/noice/noice.nix (100%) rename modules/{ => plugins}/ui/notifications/default.nix (100%) rename modules/{ => plugins}/ui/notifications/nvim-notify/config.nix (100%) rename modules/{ => plugins}/ui/notifications/nvim-notify/default.nix (100%) rename modules/{ => plugins}/ui/notifications/nvim-notify/nvim-notify.nix (100%) rename modules/{ => plugins}/ui/smartcolumn/config.nix (100%) rename modules/{ => plugins}/ui/smartcolumn/default.nix (100%) rename modules/{ => plugins}/ui/smartcolumn/smartcolumn.nix (100%) rename modules/{ => plugins}/utility/binds/cheatsheet/cheatsheet.nix (100%) rename modules/{ => plugins}/utility/binds/cheatsheet/config.nix (100%) rename modules/{ => plugins}/utility/binds/cheatsheet/default.nix (100%) rename modules/{ => plugins}/utility/binds/default.nix (100%) rename modules/{ => plugins}/utility/binds/which-key/config.nix (100%) rename modules/{ => plugins}/utility/binds/which-key/default.nix (100%) rename modules/{ => plugins}/utility/binds/which-key/which-key.nix (100%) rename modules/{ => plugins}/utility/ccc/ccc.nix (100%) rename modules/{ => plugins}/utility/ccc/config.nix (100%) rename modules/{ => plugins}/utility/ccc/default.nix (100%) rename modules/{ => plugins}/utility/default.nix (100%) rename modules/{ => plugins}/utility/diffview/config.nix (100%) rename modules/{ => plugins}/utility/diffview/default.nix (100%) rename modules/{ => plugins}/utility/diffview/diffview.nix (100%) rename modules/{ => plugins}/utility/gestures/default.nix (100%) rename modules/{ => plugins}/utility/gestures/gesture-nvim/config.nix (100%) rename modules/{ => plugins}/utility/gestures/gesture-nvim/default.nix (100%) rename modules/{ => plugins}/utility/gestures/gesture-nvim/gesture-nvim.nix (100%) rename modules/{ => plugins}/utility/icon-picker/config.nix (100%) rename modules/{ => plugins}/utility/icon-picker/default.nix (100%) rename modules/{ => plugins}/utility/icon-picker/icon-picker.nix (100%) rename modules/{ => plugins}/utility/images/default.nix (100%) rename modules/{ => plugins}/utility/images/image-nvim/config.nix (100%) rename modules/{ => plugins}/utility/images/image-nvim/default.nix (100%) rename modules/{ => plugins}/utility/images/image-nvim/image-nvim.nix (100%) rename modules/{ => plugins}/utility/motion/default.nix (100%) rename modules/{ => plugins}/utility/motion/hop/config.nix (100%) rename modules/{ => plugins}/utility/motion/hop/default.nix (100%) rename modules/{ => plugins}/utility/motion/hop/hop.nix (100%) rename modules/{ => plugins}/utility/motion/leap/config.nix (100%) rename modules/{ => plugins}/utility/motion/leap/default.nix (100%) rename modules/{ => plugins}/utility/motion/leap/leap.nix (100%) rename modules/{ => plugins}/utility/preview/default.nix (100%) rename modules/{ => plugins}/utility/preview/glow/config.nix (100%) rename modules/{ => plugins}/utility/preview/glow/default.nix (100%) rename modules/{ => plugins}/utility/preview/glow/glow.nix (100%) rename modules/{ => plugins}/utility/preview/markdown-preview/config.nix (100%) rename modules/{ => plugins}/utility/preview/markdown-preview/default.nix (100%) rename modules/{ => plugins}/utility/preview/markdown-preview/markdown-preview.nix (100%) rename modules/{ => plugins}/utility/surround/config.nix (100%) rename modules/{ => plugins}/utility/surround/default.nix (100%) rename modules/{ => plugins}/utility/surround/surround.nix (100%) rename modules/{ => plugins}/utility/telescope/config.nix (100%) rename modules/{ => plugins}/utility/telescope/default.nix (100%) rename modules/{ => plugins}/utility/telescope/telescope.nix (100%) rename modules/{ => plugins}/utility/wakatime/config.nix (100%) rename modules/{ => plugins}/utility/wakatime/default.nix (100%) rename modules/{ => plugins}/utility/wakatime/vim-wakatime.nix (100%) rename modules/{ => plugins}/visuals/config.nix (100%) rename modules/{ => plugins}/visuals/default.nix (100%) rename modules/{ => plugins}/visuals/fidget/config.nix (100%) rename modules/{ => plugins}/visuals/fidget/default.nix (100%) rename modules/{ => plugins}/visuals/fidget/fidget.nix (100%) rename modules/{ => plugins}/visuals/visuals.nix (100%) diff --git a/flake/modules/home-manager.nix b/flake/modules/home-manager.nix index 7da3e2a..66246e3 100644 --- a/flake/modules/home-manager.nix +++ b/flake/modules/home-manager.nix @@ -1,15 +1,19 @@ # Home Manager module packages: inputs: { - pkgs, config, + pkgs, lib ? pkgs.lib, - self, ... -}: -with lib; let +}: let + inherit (lib) maintainers; + inherit (lib.modules) mkIf; + inherit (lib.options) mkOption mkEnableOption literalExpression; + inherit (lib.types) attrsOf anything; + cfg = config.programs.neovim-flake; inherit (import ../../configuration.nix inputs) neovimConfiguration; - set = neovimConfiguration { + + builtPackage = neovimConfiguration { inherit pkgs; modules = [cfg.settings]; }; @@ -17,10 +21,10 @@ in { meta.maintainers = with maintainers; [NotAShelf]; options.programs.neovim-flake = { - enable = mkEnableOption "A NeoVim IDE with a focus on configurability and extensibility."; + enable = mkEnableOption "neovim-flake, the extensible neovim-wrapper"; settings = mkOption { - type = types.attrsOf types.anything; + type = attrsOf anything; default = {}; example = literalExpression '' { @@ -44,6 +48,6 @@ in { }; config = mkIf cfg.enable { - home.packages = [set.neovim]; + home.packages = [builtPackage]; }; } diff --git a/lib/default.nix b/lib/default.nix index 94db90b..333e832 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,6 +1,5 @@ {lib}: { types = import ./types {inherit lib;}; - binds = import ./binds.nix {inherit lib;}; dag = import ./dag.nix {inherit lib;}; languages = import ./languages.nix {inherit lib;}; diff --git a/modules/basic/config.nix b/modules/basic/config.nix deleted file mode 100644 index a74a6a9..0000000 --- a/modules/basic/config.nix +++ /dev/null @@ -1,188 +0,0 @@ -{ - lib, - config, - ... -}: let - inherit (builtins) concatStringsSep; - inherit (lib.modules) mkIf; - inherit (lib.lists) optionals; - inherit (lib.strings) optionalString; - inherit (lib.nvim.dag) entryAfter; - - cfg = config.vim; -in { - config = { - vim.startPlugins = ["plenary-nvim"] ++ optionals (cfg.spellChecking.enableProgrammingWordList) ["vim-dirtytalk"]; - - vim.maps.normal = - mkIf cfg.disableArrows { - "" = { - action = ""; - - noremap = false; - }; - "" = { - action = ""; - - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - } - // mkIf cfg.mapLeaderSpace { - "" = { - action = ""; - }; - }; - - vim.maps.insert = mkIf cfg.disableArrows { - "" = { - action = ""; - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - "" = { - action = ""; - noremap = false; - }; - }; - - vim.configRC.basic = entryAfter ["globalsScript"] '' - " Settings that are set for everything - set encoding=utf-8 - set mouse=${cfg.mouseSupport} - set tabstop=${toString cfg.tabWidth} - set shiftwidth=${toString cfg.tabWidth} - set softtabstop=${toString cfg.tabWidth} - set expandtab - set cmdheight=${toString cfg.cmdHeight} - set updatetime=${toString cfg.updateTime} - set shortmess+=c - set tm=${toString cfg.mapTimeout} - set hidden - set cursorlineopt=${toString cfg.cursorlineOpt} - set scrolloff=${toString cfg.scrollOffset} - - ${optionalString cfg.debugMode.enable '' - " Debug mode settings - set verbose=${toString cfg.debugMode.level} - set verbosefile=${cfg.debugMode.logFile} - ''} - - ${optionalString cfg.splitBelow '' - set splitbelow - ''} - - ${optionalString cfg.splitRight '' - set splitright - ''} - - ${optionalString cfg.showSignColumn '' - set signcolumn=yes - ''} - - ${optionalString cfg.autoIndent '' - set autoindent - ''} - - ${optionalString cfg.preventJunkFiles '' - set noswapfile - set nobackup - set nowritebackup - ''} - - ${optionalString (cfg.bell == "none") '' - set noerrorbells - set novisualbell - ''} - - ${optionalString (cfg.bell == "on") '' - set novisualbell - ''} - - ${optionalString (cfg.bell == "visual") '' - set noerrorbells - ''} - - ${optionalString (cfg.lineNumberMode == "relative") '' - set relativenumber - ''} - - ${optionalString (cfg.lineNumberMode == "number") '' - set number - ''} - - ${optionalString (cfg.lineNumberMode == "relNumber") '' - set number relativenumber - ''} - - ${optionalString cfg.useSystemClipboard '' - set clipboard+=unnamedplus - ''} - - ${optionalString cfg.mapLeaderSpace '' - let mapleader=" " - let maplocalleader=" " - ''} - - ${optionalString cfg.syntaxHighlighting '' - syntax on - ''} - - ${optionalString (!cfg.wordWrap) '' - set nowrap - ''} - - ${optionalString cfg.hideSearchHighlight '' - set nohlsearch - set incsearch - ''} - - ${optionalString cfg.colourTerm '' - set termguicolors - set t_Co=256 - ''} - - ${optionalString (!cfg.enableEditorconfig) '' - let g:editorconfig = v:false - ''} - - ${optionalString cfg.spellChecking.enable '' - set spell - set spelllang=${concatStringsSep "," cfg.spellChecking.languages}${optionalString cfg.spellChecking.enableProgrammingWordList ",programming"} - ''} - - ${optionalString (cfg.leaderKey != null) '' - let mapleader = "${toString cfg.leaderKey}" - ''} - - ${optionalString (cfg.searchCase == "ignore") '' - set nosmartcase - set ignorecase - ''} - - ${optionalString (cfg.searchCase == "smart") '' - set smartcase - set ignorecase - ''} - - ${optionalString (cfg.searchCase == "sensitive") '' - set nosmartcase - set noignorecase - ''} - ''; - }; -} diff --git a/modules/core/build/config.nix b/modules/core/build/config.nix new file mode 100644 index 0000000..068319e --- /dev/null +++ b/modules/core/build/config.nix @@ -0,0 +1,322 @@ +{ + config, + lib, + ... +}: let + inherit (builtins) attrValues attrNames map mapAttrs toJSON isString concatStringsSep filter; + inherit (lib.options) mkOption; + inherit (lib.attrsets) filterAttrs getAttrs; + inherit (lib.strings) optionalString; + inherit (lib.misc) mapAttrsFlatten; + inherit (lib.trivial) showWarnings; + inherit (lib.types) bool str oneOf attrsOf nullOr attrs submodule lines; + inherit (lib.nvim.types) dagOf; + inherit (lib.nvim.dag) entryAnywhere entryAfter topoSort; + inherit (lib.generators) mkLuaInline; + inherit (lib.nvim.lua) toLuaObject; + inherit (lib.nvim.vim) valToVim; + + cfg = config.vim; + + wrapLuaConfig = luaConfig: '' + lua << EOF + ${optionalString cfg.enableLuaLoader '' + vim.loader.enable() + ''} + ${luaConfig} + EOF + ''; + + mkBool = value: description: + mkOption { + type = bool; + default = value; + inherit description; + }; + + # Most of the keybindings code is highly inspired by pta2002/nixvim. Thank you! + mapConfigOptions = { + silent = + mkBool false + "Whether this mapping should be silent. Equivalent to adding to a map."; + + nowait = + mkBool false + "Whether to wait for extra input on ambiguous mappings. Equivalent to adding to a map."; + + script = + mkBool false + "Equivalent to adding