diff --git a/users/modules/programs/nixvim.nix b/users/modules/programs/nixvim.nix deleted file mode 100644 index 42b3df3..0000000 --- a/users/modules/programs/nixvim.nix +++ /dev/null @@ -1,61 +0,0 @@ -{inputs, ...}: { - imports = [ - inputs.nixvim.homeManagerModules.nixvim - ./nixvim/conform-nvim.nix # formatter - ./nixvim/lualine.nix # custom statusline - ./nixvim/noice.nix # custom CMDLINE - ./nixvim/nvim-tree.nix # filetree - ./nixvim/treesitter-context.nix # context line - ./nixvim/treesitter.nix # syntax highlighting - ./nixvim/which-key.nix # show keybind hints - ]; - programs.nixvim = { - enable = true; - defaultEditor = true; - viAlias = true; - vimAlias = true; - vimdiffAlias = true; - - opts = { - # Indentation - autoindent = true; - smartindent = true; - expandtab = true; - smarttab = true; - wrap = false; - shiftwidth = 2; - tabstop = 2; - foldlevel = 1000; # Open all folds by default - - # Search - hlsearch = true; - ignorecase = true; - incsearch = true; - smartcase = true; # case-sensitive if search contains uppercase - - # Visual - number = true; - relativenumber = true; - cursorline = true; - visualbell = true; - termguicolors = true; - - # Input - backspace = "indent,eol,start"; - }; - - keymaps = [ - { - # make gf create the file if it doesnt exist - # cd to the working directory to handle relative file paths - key = "gf"; - action = ":cd %:p:h:e "; - options = { - silent = true; - }; - } - ]; - - clipboard.providers.wl-copy.enable = true; - }; -} diff --git a/users/modules/programs/nixvim/conform-nvim.nix b/users/modules/programs/nixvim/conform-nvim.nix deleted file mode 100644 index f512fc6..0000000 --- a/users/modules/programs/nixvim/conform-nvim.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.nixvim.plugins.conform-nvim = { - enable = true; - }; -} diff --git a/users/modules/programs/nixvim/lualine.nix b/users/modules/programs/nixvim/lualine.nix deleted file mode 100644 index 5b52dc2..0000000 --- a/users/modules/programs/nixvim/lualine.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.nixvim.plugins.lualine = { - enable = true; - }; -} diff --git a/users/modules/programs/nixvim/noice.nix b/users/modules/programs/nixvim/noice.nix deleted file mode 100644 index dfcbb7c..0000000 --- a/users/modules/programs/nixvim/noice.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.nixvim.plugins.noice = { - enable = true; - }; -} diff --git a/users/modules/programs/nixvim/nvim-tree.nix b/users/modules/programs/nixvim/nvim-tree.nix deleted file mode 100644 index cef2e14..0000000 --- a/users/modules/programs/nixvim/nvim-tree.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - programs.nixvim = { - keymaps = [ - { - mode = "n"; - key = "t"; - action = ":NvimTreeToggle"; - options = { - silent = true; - }; - } - ]; - plugins = { - web-devicons.enable = true; - - nvim-tree = { - enable = true; - autoClose = true; - disableNetrw = true; - hijackNetrw = true; - hijackCursor = true; - view = { - cursorline = true; - side = "right"; - width = "25%"; - }; - }; - }; - }; -} diff --git a/users/modules/programs/nixvim/treesitter-context.nix b/users/modules/programs/nixvim/treesitter-context.nix deleted file mode 100644 index 5e08da4..0000000 --- a/users/modules/programs/nixvim/treesitter-context.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.nixvim.plugins.treesitter-context = { - enable = true; - }; -} diff --git a/users/modules/programs/nixvim/treesitter.nix b/users/modules/programs/nixvim/treesitter.nix deleted file mode 100644 index eb074aa..0000000 --- a/users/modules/programs/nixvim/treesitter.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - programs.nixvim.plugins.treesitter = { - enable = true; - folding = true; - settings = { - auto_install = true; - highlight.enable = true; - indent.enable = true; - }; - }; -} diff --git a/users/modules/programs/nixvim/which-key.nix b/users/modules/programs/nixvim/which-key.nix deleted file mode 100644 index 3841b71..0000000 --- a/users/modules/programs/nixvim/which-key.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.nixvim.plugins.which-key = { - enable = true; - }; -} diff --git a/users/modules/programs/nvf.nix b/users/modules/programs/nvf.nix index b6b8b3c..937bdbc 100644 --- a/users/modules/programs/nvf.nix +++ b/users/modules/programs/nvf.nix @@ -1,17 +1,10 @@ {inputs, ...}: { imports = [ inputs.nvf.homeManagerModules.default - ./nvf/debugger.nix - ./nvf/filetree.nix ./nvf/input.nix - ./nvf/keymaps.nix ./nvf/languages.nix - ./nvf/lsp.nix - ./nvf/notes.nix - ./nvf/options.nix - ./nvf/search.nix + ./nvf/ui.nix ./nvf/utilities.nix - ./nvf/visual.nix ]; home.sessionVariables.EDITOR = "nvim"; programs.nvf = { @@ -20,6 +13,40 @@ settings.vim = { viAlias = true; vimAlias = true; + options = { + # Indentation + autoindent = true; + smartindent = true; + expandtab = true; + smarttab = true; + wrap = true; + shiftwidth = 2; + tabstop = 2; + foldlevel = 1000; # Open all folds by default + + # Search + hlsearch = true; + ignorecase = true; + incsearch = true; + smartcase = true; # case-sensitive if search contains uppercase + + # Visual + number = true; + cursorline = true; + visualbell = true; + termguicolors = true; + + # Input + backspace = "indent,eol,start"; + }; + keymaps = [ + { + key = "gf"; + mode = "n"; + action = ":cd %:p:h:e "; + silent = true; + } + ]; }; }; } diff --git a/users/modules/programs/nvf/blink-cmp.nix b/users/modules/programs/nvf/blink-cmp.nix deleted file mode 100644 index fb427de..0000000 --- a/users/modules/programs/nvf/blink-cmp.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - programs.nvf.settings.vim.autocomplete.blink-cmp = { - enable = true; - friendly-snippets.enable = true; # code snippets - setupOpts = { - completion = { - documentation.auto_show_delay_ms = 0; - }; - }; - sourcePlugins = { - emoji.enable = true; - ripgrep.enable = true; - spell.enable = true; - }; - }; -} diff --git a/users/modules/programs/nvf/conform-nvim.nix b/users/modules/programs/nvf/conform-nvim.nix deleted file mode 100644 index 4f34095..0000000 --- a/users/modules/programs/nvf/conform-nvim.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.nvf.settings.vim.formatter.conform-nvim = { - enable = true; - }; -} diff --git a/users/modules/programs/nvf/debugger.nix b/users/modules/programs/nvf/debugger.nix deleted file mode 100644 index 2408f21..0000000 --- a/users/modules/programs/nvf/debugger.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - programs.nvf.settings.vim.debugger.nvim-dap = { - # nvim-dap enables debugging - # you can set breakpoints and step through code or use a REPL - enable = true; - mappings = { - # default mappings: - # - Continue:dc - # - Go down stacktrace:dvi - # - Go up stacktrace:dvo - # - Hover:dh - # - Restart:dR - # - Re-run Last Debug Session:d. - # - Continue to the current cursor:dgc - # - Step back:dgk - # - Step into function:dgi - # - Step out of function:dgo - # - Next step:dgj - # - Terminate:dq - # - Toggle breakpoint:db - # - Toggle DAP-UI:du - # - Toggle Repl:dr - }; - # list of debuggers to install - sources = {}; - # install nvim-dap-ui which provides a debugging ui - ui = { - enable = true; - setupOpts = {}; - }; - }; -} diff --git a/users/modules/programs/nvf/filetree.nix b/users/modules/programs/nvf/filetree.nix deleted file mode 100644 index 492f26d..0000000 --- a/users/modules/programs/nvf/filetree.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - programs.nvf.settings.vim.filetree = { - # press ? in the tree view for a list of keybindings - # < and > to switch sources - # backspace to go up one level - neo-tree = { - enable = true; - setupOpts = { - enable_cursor_hijack = true; # keep the cursor on the first char - hijack_netrw_behavior = "disabled"; - }; - }; - # TODO: add keymap for :NeoTree action=show position=right toggle=true reveal=true - # action=show is to not focus the window - # toggle will toggle the window - # reveal will find and focus the current file - }; -} diff --git a/users/modules/programs/nvf/git.nix b/users/modules/programs/nvf/git.nix deleted file mode 100644 index 2c63c08..0000000 --- a/users/modules/programs/nvf/git.nix +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/users/modules/programs/nvf/input.nix b/users/modules/programs/nvf/input.nix index 33c9a79..f16c19d 100644 --- a/users/modules/programs/nvf/input.nix +++ b/users/modules/programs/nvf/input.nix @@ -1,7 +1,9 @@ {lib, ...}: { programs.nvf.settings.vim = { - autopairs = { - nvim-autopairs.enable = true; + autopairs.nvim-autopairs.enable = true; + snippets.luasnip = { + enable = true; + setupOpts.enable_autosnippets = true; }; autocomplete = { blink-cmp = { @@ -32,19 +34,12 @@ }; }; }; - # enable code snippets using luasnip - # loads from vscode by default using friendly-snippets - snippets.luasnip = { - enable = true; - setupOpts = { - enable_autosnippets = true; + utility = { + motion = { + hop.enable = true; # h + precognition.enable = false; }; - }; - binds = { - # cheatsheet.nvim provides cheatsheets with fuzzy finding with ? - cheatsheet.enable = true; - # whichkey provides a popup window with hotkeys - whichKey.enable = true; + yanky-nvim.enable = true; }; }; } diff --git a/users/modules/programs/nvf/keymaps.nix b/users/modules/programs/nvf/keymaps.nix deleted file mode 100644 index 1fa331e..0000000 --- a/users/modules/programs/nvf/keymaps.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - programs.nvf.settings.vim.keymaps = [ - { - key = "gf"; - mode = "n"; - action = ":cd %:p:h:e "; - silent = true; - } - ]; -} diff --git a/users/modules/programs/nvf/languages/nix.nix b/users/modules/programs/nvf/languages/nix.nix deleted file mode 100644 index 373b2f5..0000000 --- a/users/modules/programs/nvf/languages/nix.nix +++ /dev/null @@ -1,13 +0,0 @@ -{pkgs, ...}: { - home.packages = [pkgs.nixd]; - programs.nvf.settings.vim.languages.nix = { - enable = true; - # lsp = { - # server = "nixd"; - # options = { - # nixpkgs.expr = ''(builtins.getFlake ("git+file://" + toString ./.)).inputs.nixpkgs''; - # options.nixos.expr = ''(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.${builtins.getEnv "HOSTNAME"}.options''; - # }; - # }; - }; -} diff --git a/users/modules/programs/nvf/lsp.nix b/users/modules/programs/nvf/lsp.nix deleted file mode 100644 index 05e6bfb..0000000 --- a/users/modules/programs/nvf/lsp.nix +++ /dev/null @@ -1,119 +0,0 @@ -{ - programs.nvf.settings.vim.lsp = { - # enable is automatically set by null-ls and lspconfig options - # enable = true; - formatOnSave = true; - # lightbulb shows a lightbulb when code actions are available - # TODO: Look into code actions and how to enable them with telescope - lightbulb = { - enable = true; - setupOpts = {}; - }; - # ls-signature shows a small signature for functions etc - # TODO: Look into configuring this - # does not work with blink cmp - lspSignature = { - enable = false; - setupOpts = {}; - }; - # lspconfig should be enabled and configured automatically - lspconfig = { - enable = true; - sources = {}; # strings for snippet sources? - }; - # lspkind provides vs code like icons for signatures - lspkind = { - enable = true; - setupOpts = { - # call before lspkind modifications are applied - before = null; # takes luainline - # defines orders of symbols shown, e.g. text_symbol or symbol - mode = "symbol_text"; - }; - }; - # lsplines moves diagnostics to virtual lines after the actual line - lsplines.enable = false; # TODO: add a keymap to toggle this - # lspsaga provides many features: - # - breadcrumbs: provides trace to current symbol at top - # - callhierarchy: provides a list of the call hierarchy - # - code actions: shows a list of available code actions - # - definition: peek or go to definitions - # - diagnostic: jump around the diagnostics in the file and see the diagnostic in a floating window - # - finder: search for references etc - # - float terminal: open a floating terminal - # - hover: opens a floating docs window - # - implement: see interfaces - # - lightbulb: same as lightbulb - # - outline: see entire file outline - # - rename: change all occurrences - # - ui beacon: highlight the cursor - # default keybinds: - # - codeAction "ca" - # - lspFinder "lf" - # - nextDiagnostic "ln" - # - previewDefinition "ld" - # - previousDiagnostic "lp" - # - rename "lr" - # - renderHoveredDoc "lh" - # - showCursorDiagnostics "lc" - # - showLineDiagnostics "ll" - # - signatureHelp "ls" - # - smartScrollDown "" - # - smartScrollUp "" - lspsaga.enable = false; - # null-ls exposes nvim as a language server, also used automatically - null-ls = { - enable = true; - sources = {}; - }; - # nvim-docs-view provides documentation in the side panel - nvim-docs-view = { - enable = true; - # default mappings: - # - viewToggle "lvt" - # - viewUpdate "lvu" - mappings = {}; - setupOpts = {}; - }; - # otter-nvim allows embedding code in other documents - otter-nvim = { - enable = true; - mappings.toggle = "lo"; # default - setupOpts = {}; - }; - # trouble.nvim shows diagnostics and search results - trouble = { - enable = true; - # default mappings: - # - documentDiagnostics "ld" - # - locList "xl" - # - lspReferences "lr" - # - quickfix "xq" - # - symbols "xs" - # - workspaceDiagnostics "lwd" - mappings = {}; - setupOpts = {}; - }; - # default mappings for lsp: - # - addWorkspaceFolder "lwa" - # - codeAction "la" - # - documentHighlight "lH" - # - format "lf" - # - goToDeclaration "lgD" - # - goToDefinition "lgd" - # - goToType "lgt" - # - hover "lh" - # - listDocumentSymbols "lS" - # - listImplementations "lgi" - # - listReferences "lgr" - # - listWorkspaceFolders "lwl" - # - listWorkspaceSymbols "lws" - # - nextDiagnostic "lgn" - # - openDiagnosticFloat "le" - # - previousDiagnostic "lgp" - # - removeWorkspaceFolder "lwr" - # - renameSymbol "ln" - # - signatureHelp "ls" - # - toggleFormatOnSave "ltf" - }; -} diff --git a/users/modules/programs/nvf/lualine.nix b/users/modules/programs/nvf/lualine.nix deleted file mode 100644 index 829d8c5..0000000 --- a/users/modules/programs/nvf/lualine.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.nvf.settings.vim.statusline.lualine = { - enable = true; - }; -} diff --git a/users/modules/programs/nvf/noice.nix b/users/modules/programs/nvf/noice.nix deleted file mode 100644 index 09bfa4c..0000000 --- a/users/modules/programs/nvf/noice.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.nvf.settings.vim.ui.noice = { - enable = true; - }; -} diff --git a/users/modules/programs/nvf/notes.nix b/users/modules/programs/nvf/notes.nix deleted file mode 100644 index bf3a0f9..0000000 --- a/users/modules/programs/nvf/notes.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - programs.nvf.settings.vim.notes = { - # TODO: look into mind nvim - # todo-comments provides quick search for keywords like TODO - # default mappings - # - Open Todo-s in a quickfix list:tdq - # - Open Todo-s in telescope:tds - # - Open Todo-s in Trouble:tdt - todo-comments.enable = true; - }; -} diff --git a/users/modules/programs/nvf/nvim-tree.nix b/users/modules/programs/nvf/nvim-tree.nix deleted file mode 100644 index 84b9d1a..0000000 --- a/users/modules/programs/nvf/nvim-tree.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - programs.nvf.settings.vim = { - keymaps = [ - { - key = "t"; - mode = "n"; - action = ":NvimTreeToggle"; - silent = true; - } - ]; - filetree.nvimTree = { - enable = true; - setupOpts = { - disable_netrw = true; - hijack_netrw = true; - hijack_cursor = true; - actions.open_file.quit_on_open = true; - hijack_directories.auto_open = false; - view = { - cursorline = true; - side = "right"; - width = { - min = "25%"; - max = "25%"; - }; - }; - }; - }; - }; -} diff --git a/users/modules/programs/nvf/options.nix b/users/modules/programs/nvf/options.nix deleted file mode 100644 index d2850fb..0000000 --- a/users/modules/programs/nvf/options.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - programs.nvf.settings.vim = { - options = { - # Indentation - autoindent = true; - smartindent = true; - expandtab = true; - smarttab = true; - wrap = true; - shiftwidth = 2; - tabstop = 2; - foldlevel = 1000; # Open all folds by default - - # Search - hlsearch = true; - ignorecase = true; - incsearch = true; - smartcase = true; # case-sensitive if search contains uppercase - - # Visual - number = true; - relativenumber = true; - cursorline = true; - visualbell = true; - termguicolors = true; - - # Input - backspace = "indent,eol,start"; - }; - }; -} diff --git a/users/modules/programs/nvf/search.nix b/users/modules/programs/nvf/search.nix deleted file mode 100644 index 36e0062..0000000 --- a/users/modules/programs/nvf/search.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - programs.nvf.settings.vim.telescope = { - enable = true; - mappings = { - # default mappings - # - Buffers [Telescope]:fb - # - Diagnostics [Telescope]:fld - # - Find files [Telescope]:ff - # - Find projects [Telescope]:fp - # - Git branches [Telescope]:fvb - # - Git buffer commits [Telescope]:fvcb - # - Git commits [Telescope]:fvcw - # - Git stash [Telescope]:fvx - # - Git status [Telescope]:fvs - # - Help tags [Telescope]:fh - # - Live grep [Telescope]:fg - # - LSP Definitions [Telescope]:flD - # - LSP Document Symbols [Telescope]:flsb - # - LSP Implementations [Telescope]:fli - # - LSP References [Telescope]:flr - # - LSP Type Definitions [Telescope]:flt - # - LSP Workspace Symbols [Telescope]:flsw - # - Open [Telescope]:ft - # - Resume (previous search) [Telescope]:fr - # - Treesitter [Telescope]:fs - }; - setupOpts = {}; - }; -} diff --git a/users/modules/programs/nvf/ui.nix b/users/modules/programs/nvf/ui.nix new file mode 100644 index 0000000..90b9ffc --- /dev/null +++ b/users/modules/programs/nvf/ui.nix @@ -0,0 +1,52 @@ +{ + programs.nvf.settings.vim = { + lsp = { + formatOnSave = true; + lightbulb.enable = true; + lspkind.enable = true; + otter-nvim.enable = true; + trouble.enable = true; + }; + binds = { + cheatsheet.enable = true; + whichKey.enable = true; + }; + debugger.nvim-dap = { + enable = true; + ui.enable = true; + }; + notes.todo-comments.enable = true; + telescope.enable = true; + statusline.lualine.enable = true; + treesitter = { + enable = true; + autotagHtml = true; + fold = true; + }; + notify.nvim-notify.enable = true; + visuals = { + fidget-nvim.enable = true; + indent-blankline.enable = true; + rainbow-delimiters.enable = true; + nvim-web-devicons.enable = true; + tiny-devicons-auto-colors.enable = true; + }; + ui = { + borders.enable = true; + breadcrumbs.enable = true; + breadcrumbs.navbuddy.enable = true; + colorizer.enable = true; + noice.enable = true; + nvim-ufo.enable = true; + }; + utility = { + ccc.enable = true; + images.image-nvim = { + enable = true; + setupOpts.backend = "kitty"; + }; + yazi-nvim.enable = true; + yazi-nvim.setupOpts.open_for_directories = true; # FIXME: does this work with neotree? + }; + }; +} diff --git a/users/modules/programs/nvf/utilities.nix b/users/modules/programs/nvf/utilities.nix index 93709cc..a36c5f8 100644 --- a/users/modules/programs/nvf/utilities.nix +++ b/users/modules/programs/nvf/utilities.nix @@ -1,23 +1,8 @@ { programs.nvf.settings.vim = { - projects.project-nvim.enable = true; utility = { - # ccc is a colour picker - ccc.enable = true; - # diffview-nvim lets you easily go through diffs for a given rev - diffview-nvim.enable = true; - # direnv.vim syncs the nvim shell environment with direnv direnv.enable = true; - # icon-picker gives you a way to pick icons from nerd fonts - # TODO: find out keybinds - icon-picker.enable = true; - # image rendering - # TODO: look into image-magick and if it is needed - images.image-nvim = { - enable = true; - setupOpts.backend = "kitty"; - }; - # leetcode + nix-develop.enable = true; leetcode-nvim = { enable = true; setupOpts = { @@ -25,68 +10,13 @@ lang = "rust"; }; }; - # mkdir.nvim creates directory when the path doesnt exist mkdir.enable = true; - motion = { - hop.enable = true; # h - leap.enable = true; - leap.mappings = { - # default mappings - # - Leap backward till:sX - # - Leap backward to:sS - # - Leap forward till:sx - # - Leap forward to:ss - # - Leap from window:gs - }; - # precognition.nvim shows hints for motions - precognition = { - enable = false; - setupOpts = { - # TODO: may want to fix dashboard - }; - }; - }; - # multicursors.nvim enables vscode like multicursors - multicursors.enable = true; - # new-file-template.nvim automatically inserts templates in new files new-file-template = { enable = true; # add a directory containing lua/tempaltes/*.lua to vim.additionalRuntimePaths # TODO: add for nix }; - # allows usage of nix commands in nvim - nix-develop.enable = true; - # aerial.nvim shows a preview of your entire code file - outline.aerial-nvim.enable = true; # "g0" - # glow.nvim displays a floating window with a markdown preview - preview.glow.enable = true; # "p" - # nvim-surround allows you to easily surround and delete words or phrases - surround.enable = true; - # vim-wakatime allows sending statistics to wakatime or a compatible backend vim-wakatime.enable = true; - # yanky allows cycling through yank history when putting text - yanky-nvim.enable = true; - # yazi-nvim gives integration with yazi - # default mappings: - # - Open yazi at the current file [yazi.nvim]:- - # - Open the file manager in nvim’s working directory [yazi.nvim]:cw - # - Resume the last yazi session [yazi.nvim]: - yazi-nvim.enable = true; - yazi-nvim.setupOpts.open_for_directories = true; # FIXME: does this work with neotree? }; - # TODO: look into terminal integration - terminal.toggleterm.enable = true; - terminal.toggleterm.lazygit.enable = true; - # nvim session manager manages sessions like folders in vscode - session.nvim-session-manager = { - enable = true; - mappings = { - # default mappings: - # - Delete session:sd - # - Load last session:slt - # - Load session:sl - # - Save current session:sc - }; - }; - comments.comment-nvim.enable = true; + session.nvim-session-manager.enable = true; }; } diff --git a/users/modules/programs/nvf/visual.nix b/users/modules/programs/nvf/visual.nix deleted file mode 100644 index 7a7be1e..0000000 --- a/users/modules/programs/nvf/visual.nix +++ /dev/null @@ -1,130 +0,0 @@ -{ - programs.nvf.settings.vim = { - visuals = { - # fidget.nvim shows messages in the bottom right - fidget-nvim = { - enable = true; - setupOpts = {}; - }; - # highlight-undo.nvim highlights what text was changed when performing an action that modifies the buffer while not in insert mode - highlight-undo = { - enable = true; - setupOpts = { - duration = 100; # in ms - }; - }; - # indent-blankline.nvim adds indentation guides - indent-blankline = { - enable = true; - setupOpts = {}; - }; - # nvim-cursorline provides cursor word and line highlighting - nvim-cursorline = { - enable = false; - setupOpts = { - cursorword.enable = true; - cursorline.enable = false; - }; - }; - nvim-scrollbar.enable = true; - rainbow-delimiters.enable = true; - nvim-web-devicons.enable = true; - tiny-devicons-auto-colors.enable = true; - }; - statusline.lualine = { - enable = true; - }; - tabline.nvimBufferline = { - enable = false; - mappings = { - # default mappings: - # - Close buffer:null - # - Next buffer:bn - # - Previous buffer:bp - # - Move next buffer:bmn - # - Move previous buffer:bmp - # - Pick buffer:bc - # - Sort buffers by directory:bsd - # - Sort buffers by extension:bse - # - Sort buffers by ID:bsi - # closeCurrent = ""; - # TODO: check these mappigns - # cycleNext = ""; - # cyclePrevious = ""; - }; - setupOpts = {}; - }; - # treesitter handles syntax highlighting - treesitter = { - enable = true; - autotagHtml = true; - fold = true; - # provide context for current scope - context = { - enable = false; - setupOpts = { - mode = "topline"; - }; - }; - mappings.incrementalSelection = { - # - Decrement selection by node [treesitter]:grm - # - Increment selection by node [treesitter]:grn - # - Increment selection by scope [treesitter]:grc - # - Init selection [treesitter]:gnn - }; - }; - git = { - enable = true; - # gitsigns indicates added, changed, deleted lines among other things - gitsigns.mappings = { - # - Blame line [Gitsigns]:hb - # - Diff project [Gitsigns]:hD - # - Diff this [Gitsigns]:hd - # - Next hunk [Gitsigns]:]c - # - Preview hunk [Gitsigns]:hP - # - Previous hunk [Gitsigns]:[c - # - Reset buffer [Gitsigns]:hR - # - Reset hunk [Gitsigns]:hr - # - Stage buffer [Gitsigns]:hS - # - Stage hunk [Gitsigns]:hs - # - Toggle blame [Gitsigns]:tb - # - Toggle deleted [Gitsigns]:td - # - Undo stage hunk [Gitsigns]:hu - }; - # git-conflict visualises git conflicts and resolves - git-conflict.mappings = { - # Default mappings: - # - Choose Both [Git-Conflict]:cb - # - Go to the next Conflict [Git-Conflict]:[x - # - Choose None [Git-Conflict]:c0 - # - Choose Ours [Git-Conflict]:co - # - Go to the previous Conflict [Git-Conflict]:]x - # - Choose Theirs [Git-Conflict]:ct - }; - # vim-fugitive provides git cmds - }; - dashboard.alpha.enable = true; - notify.nvim-notify.enable = true; - ui = { - borders.enable = true; # TODO: enable plugin specific - breadcrumbs.enable = true; - breadcrumbs.navbuddy.enable = true; # nvim-navic - # nvim-colorizer highlights color codes - colorizer.enable = true; # TODO: check if it works - # fastaction.nvim overrides vim.ui.select with fast action - # TODO: look into this - fastaction.enable = true; - # vim-illuminate highlights all occurrences - illuminate.enable = true; # TOOD: check if neotree is covered - # modes-nvim colors the whole line - modes-nvim.enable = true; - # noice displays the command window in a floating window and disables the cmd line - # TODO: look at the options - noice.enable = true; - # nvim-ufo makes folds look nicer - nvim-ufo.enable = true; - # smartcolumn enables line length indicators - smartcolumn.enable = true; - }; - }; -} diff --git a/users/modules/programs/nvim.nix b/users/modules/programs/nvim.nix deleted file mode 100644 index 675bf57..0000000 --- a/users/modules/programs/nvim.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - programs.neovim = { - enable = true; - defaultEditor = true; - viAlias = true; - vimAlias = true; - vimdiffAlias = true; - extraLuaConfig = '' - vim.opt.shiftwidth = 2; - vim.opt.number = true; - vim.opt.relativenumber = true; - ''; - }; -}