diff --git a/modules/editors/nvf/default.nix b/modules/editors/nvf/default.nix index 22fe562..07f7a65 100644 --- a/modules/editors/nvf/default.nix +++ b/modules/editors/nvf/default.nix @@ -12,7 +12,7 @@ mkNeovimModule = { path, - ignoredPaths ? [./nvf.nix ./plugins/sources/default.nix ./plugins], + ignoredPaths ? [], }: filter (hasSuffix ".nix") ( map toString ( @@ -28,28 +28,6 @@ in { imports = concatLists [ # neovim-flake home-manager module [nvf.nixosModules.default] - # [./plugins/settings/ui.nix] - # [./plugins/settings/filetree.nix] - # [ - # ./plugins/settings/autocomplete.nix - # ./plugins/settings/visuals.nix - # ./plugins/settings/autopairs.nix - # ./plugins/settings/binds.nix - # ./plugins/settings/comments.nix - # ./plugins/settings/dashboard.nix - # ./plugins/settings/debugger.nix - # ./plugins/settings/languages.nix - # ./plugins/settings/lsp.nix - # ./plugins/settings/telescope.nix - # ./plugins/settings/notes.nix - # ./plugins/settings/notify.nix - # ./plugins/settings/projects.nix - # ./plugins/settings/statusline.nix - # ./plugins/settings/tabline.nix - # ./plugins/settings/theme.nix - # ./plugins/settings/treesitter.nix - # ./plugins/settings/utility.nix - # ./plugins/settings/git.nix # construct this entore directory as a module # which means all default.nix files will be imported automtically (mkNeovimModule {path = ./.;}) diff --git a/modules/editors/nvf/mappings/normal.nix b/modules/editors/nvf/mappings/normal.nix index 2b2b585..e0f146f 100644 --- a/modules/editors/nvf/mappings/normal.nix +++ b/modules/editors/nvf/mappings/normal.nix @@ -1,11 +1,11 @@ { programs.neovim-flake.settings.vim.maps = { normal = { + "gg".action = "LazyGit"; /* # General "fd".action = ":lua vim.g.formatsave = not vim.g.formatsave"; "zt".action = ":let g:default_terminal = v:count1"; - #"e".action = ":NvimTreeToggle"; # "ld".action = ":lua vim.diagnostic.setqflist({open = true})"; # "lf".action = ":lua vim.lsp.buf.format()"; # "li".action = ":lua vim.lsp.buf.implementation()"; @@ -28,17 +28,17 @@ "gb".action = "Gitsigns blame_line"; "gD".action = "Gitsigns diffthis HEAD"; "gw".action = "Gitsigns toggle_word_diff"; - + */ # Movement "".action = "h"; "".action = "j"; "".action = "k"; "".action = "l"; # Telescope - "".action = ":Telescope resume"; + "".action = "Telescope resume"; "fq".action = ":Telescope quickfix"; "f/".action = ":Telescope live_grep"; - + /* # Aerial "".action = ":AerialToggle"; diff --git a/modules/editors/nvf/plugins/extra.nix b/modules/editors/nvf/plugins/extra.nix index cde7908..06ab136 100644 --- a/modules/editors/nvf/plugins/extra.nix +++ b/modules/editors/nvf/plugins/extra.nix @@ -82,66 +82,66 @@ in { programs.neovim-flake.settings.vim.extraPlugins = { # plugins that are pulled from nixpkgs + # direnv = {package = direnv-vim;}; + friendly-snippets = {package = friendly-snippets;}; + mkdir-nvim = {package = mkdir-nvim;}; + lazygit-nvim = {package = lazygit-nvim;}; + aerial = { + package = aerial-nvim; + setup = "require('aerial').setup {}"; + }; + + nvim-surround = { + package = nvim-surround; + setup = "require('nvim-surround').setup {}"; + }; /* - direnv = {package = direnv-vim;}; - friendly-snippets = {package = friendly-snippets;}; - mkdir-nvim = {package = mkdir-nvim;}; - lazygit-nvim = {package = lazygit-nvim;}; - aerial = { - package = aerial-nvim; - setup = "require('aerial').setup {}"; - }; + undotree = { + package = undotree; + setup = '' + vim.g.undotree_ShortIndicators = true + vim.g.undotree_TreeVertShape = '│' + ''; + }; + */ + ssr-nvim = { + package = ssr-nvim; + setup = "require('ssr').setup {}"; + }; - nvim-surround = { - package = nvim-surround; - setup = "require('nvim-surround').setup {}"; - }; + legendary = { + package = legendary-nvim; + setup = '' + require('legendary').setup {}; + ''; + }; - undotree = { - package = undotree; - setup = '' - vim.g.undotree_ShortIndicators = true - vim.g.undotree_TreeVertShape = '│' - ''; - }; - - ssr-nvim = { - package = ssr-nvim; - setup = "require('ssr').setup {}"; - }; - - legendary = { - package = legendary-nvim; - setup = '' - require('legendary').setup {}; - ''; - }; - - # plugins that are built from their sources - regexplainer = {package = pluginSources.regexplainer;}; - vim-nftables = {package = pluginSources.vim-nftables;}; + # plugins that are built from their sources + # regexplainer = {package = pluginSources.regexplainer;}; + # vim-nftables = {package = pluginSources.vim-nftables;}; /* - data-view = { - package = pluginSources.data-viewer-nvim; - setup = '' - -- open data files in data-viewer.nvim - vim.api.nvim_exec([[ - autocmd BufReadPost,BufNewFile *.sqlite,*.csv,*.tsv DataViewer - ]], false) + data-view = { + package = pluginSources.data-viewer-nvim; + setup = '' + -- open data files in data-viewer.nvim + vim.api.nvim_exec([[ + autocmd BufReadPost,BufNewFile *.sqlite,*.csv,*.tsv DataViewer + ]], false) - -- keybinds - vim.api.nvim_set_keymap('n', 'dv', ':DataViewer', {noremap = true}) - vim.api.nvim_set_keymap('n', 'dvn', ':DataViewerNextTable', {noremap = true}) - vim.api.nvim_set_keymap('n', 'dvp', ':DataViewerPrevTable', {noremap = true}) - vim.api.nvim_set_keymap('n', 'dvc', ':DataViewerClose', {noremap = true}) - ''; - }; + -- keybinds + vim.api.nvim_set_keymap('n', 'dv', ':DataViewer', {noremap = true}) + vim.api.nvim_set_keymap('n', 'dvn', ':DataViewerNextTable', {noremap = true}) + vim.api.nvim_set_keymap('n', 'dvp', ':DataViewerPrevTable', {noremap = true}) + vim.api.nvim_set_keymap('n', 'dvc', ':DataViewerClose', {noremap = true}) + ''; + }; + */ smart-splits = { package = pluginSources.smart-splits; setup = "require('smart-splits').setup {}"; }; - + /* neotab-nvim = { package = pluginSources.neotab-nvim; setup = '' @@ -173,7 +173,7 @@ in { } ''; }; - + */ specs-nvim = { package = pluginSources.specs-nvim; setup = '' @@ -202,6 +202,5 @@ in { vim.api.nvim_set_keymap('n', 'N', 'N:lua require("specs").show_specs()', { noremap = true, silent = true }) ''; }; - */ }; } diff --git a/modules/editors/nvf/plugins/settings/comments.nix b/modules/editors/nvf/plugins/settings/comments.nix index a8659fa..00b6e2f 100644 --- a/modules/editors/nvf/plugins/settings/comments.nix +++ b/modules/editors/nvf/plugins/settings/comments.nix @@ -1,6 +1,4 @@ -{config, ...}: let - inherit (config.modules.other.system) username; -in { +_: { programs.neovim-flake.settings.vim = { comments.comment-nvim.enable = true; }; diff --git a/modules/editors/nvf/plugins/settings/dashboard.nix b/modules/editors/nvf/plugins/settings/dashboard.nix index 6f041e6..f2384ed 100644 --- a/modules/editors/nvf/plugins/settings/dashboard.nix +++ b/modules/editors/nvf/plugins/settings/dashboard.nix @@ -1,9 +1,7 @@ -{config, ...}: let - inherit (config.modules.other.system) username; -in { +_: { programs.neovim-flake.settings.vim = { dashboard = { - alpha.enable = false; + alpha.enable = true; }; }; } diff --git a/modules/editors/nvf/plugins/settings/debugger.nix b/modules/editors/nvf/plugins/settings/debugger.nix index 07d5f48..6e23318 100644 --- a/modules/editors/nvf/plugins/settings/debugger.nix +++ b/modules/editors/nvf/plugins/settings/debugger.nix @@ -1,6 +1,4 @@ -{config, ...}: let - inherit (config.modules.other.system) username; -in { +_: { programs.neovim-flake.settings.vim = { debugger.nvim-dap = { enable = true; diff --git a/modules/editors/nvf/settings.nix b/modules/editors/nvf/settings.nix index bd75f22..23611c8 100644 --- a/modules/editors/nvf/settings.nix +++ b/modules/editors/nvf/settings.nix @@ -38,7 +38,6 @@ in { # alternatively, neovim-nightly from the neovim-nightly overlay # via inputs.neovim-nightly.packages.${pkgs.stdenv.system}.neovim package = pkgs.neovim-unwrapped; - /* viAlias = true; vimAlias = true; @@ -57,15 +56,15 @@ in { enableLuaLoader = true; enableEditorconfig = true; - debugMode = { - enable = false; - logFile = "/tmp/nvim.log"; - }; + debugMode = { + enable = false; + logFile = "/tmp/nvim.log"; + }; - additionalRuntimePaths = [ - (mkRuntimeDir "after") - (mkRuntimeDir "spell") - ]; + additionalRuntimePaths = [ + (mkRuntimeDir "after") + (mkRuntimeDir "spell") + ]; # while I should be doing this in luaConfigRC below # I have come to realise that spellfile contents are @@ -80,20 +79,21 @@ in { # the lua configuration of my Neovim configuration # wrapper. this is recursively read from the lua # directory, so we do not need to use require - luaConfigRC = let - # get the name of each lua file in the lua directory, where setting files reside - # and import them recursively - configPaths = filter (hasSuffix ".lua") (map toString (listFilesRecursive ./lua)); + /* + luaConfigRC = let + # get the name of each lua file in the lua directory, where setting files reside + # and import them recursively + configPaths = filter (hasSuffix ".lua") (map toString (listFilesRecursive ./lua)); - # generates a key-value pair that looks roughly as follows: - # ` = entryAnywhere ''''` - # which is expected by neovim-flake's modified DAG library - luaConfig = genAttrs configPaths (file: - entryBefore ["luaScript"] '' - ${fileContents "${file}"} - ''); - in - luaConfig; + # generates a key-value pair that looks roughly as follows: + # ` = entryAnywhere ''''` + # which is expected by neovim-flake's modified DAG library + luaConfig = genAttrs configPaths (file: + entryBefore ["luaScript"] '' + ${fileContents "${file}"} + ''); + in + luaConfig; */ }; };