| ... | @@ -6,8 +6,9 @@ | ... | @@ -6,8 +6,9 @@ |
| 6 | }: | 6 | }: |
| 7 | { | 7 | { |
| 8 | imports = [ | 8 | imports = [ |
| 9 | ./options.nix | | |
| 10 | ./formatter.nix | 9 | ./formatter.nix |
| | 10 | ./keybind.nix |
| | 11 | ./options.nix |
| 11 | ]; | 12 | ]; |
| 12 | # based on default options from upstream: | 13 | # based on default options from upstream: |
| 13 | # https://github.com/NotAShelf/nvf/blob/main/configuration.nix | 14 | # https://github.com/NotAShelf/nvf/blob/main/configuration.nix |
| ... | @@ -18,6 +19,10 @@ | ... | @@ -18,6 +19,10 @@ |
| 18 | # override level 999 is used to not conflict with mkDefault as used by nvf. | 19 | # override level 999 is used to not conflict with mkDefault as used by nvf. |
| 19 | # which allows user configurations to disable/override anything here. | 20 | # which allows user configurations to disable/override anything here. |
| 20 | config.vim = lib.mkOverride 999 { | 21 | config.vim = lib.mkOverride 999 { |
| | 22 | extraLuaFiles = [ |
| | 23 | ./lib.lua |
| | 24 | ]; |
| | 25 | |
| 21 | theme = { | 26 | theme = { |
| 22 | enable = true; | 27 | enable = true; |
| 23 | }; | 28 | }; |
| ... | @@ -60,8 +65,8 @@ | ... | @@ -60,8 +65,8 @@ |
| 60 | listReferences = "gr"; | 65 | listReferences = "gr"; |
| 61 | goToType = "gy"; | 66 | goToType = "gy"; |
| 62 | hover = "K"; | 67 | hover = "K"; |
| 63 | nextDiagnostic = "<leader>d"; | 68 | nextDiagnostic = null; # ]d |
| 64 | openDiagnosticFloat = "<leader>df"; | 69 | openDiagnosticFloat = "<leader>d"; |
| 65 | renameSymbol = "rn"; | 70 | renameSymbol = "rn"; |
| 66 | documentHighlight = null; | 71 | documentHighlight = null; |
| 67 | listDocumentSymbols = null; | 72 | listDocumentSymbols = null; |
| ... | @@ -78,11 +83,9 @@ | ... | @@ -78,11 +83,9 @@ |
| 78 | enable = true; | 83 | enable = true; |
| 79 | addDefaultGrammars = true; | 84 | addDefaultGrammars = true; |
| 80 | }; | 85 | }; |
| 81 | debugger = { | 86 | debugger.nvim-dap = { |
| 82 | nvim-dap = { | 87 | enable = true; |
| 83 | enable = true; | 88 | ui.enable = true; |
| 84 | ui.enable = true; | | |
| 85 | }; | | |
| 86 | }; | 89 | }; |
| 87 | languages = { | 90 | languages = { |
| 88 | enableFormat = true; | 91 | enableFormat = true; |
| ... | @@ -96,36 +99,58 @@ | ... | @@ -96,36 +99,58 @@ |
| 96 | clang.enable = true; | 99 | clang.enable = true; |
| 97 | css.enable = true; | 100 | css.enable = true; |
| 98 | html.enable = true; | 101 | html.enable = true; |
| | 102 | lua.enable = true; |
| 99 | markdown.enable = true; | 103 | markdown.enable = true; |
| | 104 | nix.enable = true; |
| 100 | python.enable = true; | 105 | python.enable = true; |
| 101 | rust.crates.enable = true; | 106 | rust.crates.enable = true; |
| 102 | rust.enable = true; | 107 | rust.enable = true; |
| 103 | ts.enable = true; | 108 | ts.enable = true; |
| 104 | zig.enable = true; | 109 | zig.enable = true; |
| 105 | lua.enable = true; | | |
| 106 | # sort-lines: off | 110 | # sort-lines: off |
| 107 | | | |
| 108 | nix = { | | |
| 109 | enable = true; | | |
| 110 | format.type = "nixfmt"; # looks so much nicer | | |
| 111 | }; | | |
| 112 | }; | 111 | }; |
| 113 | filetree = { | 112 | filetree.neo-tree = { |
| 114 | neo-tree = { | 113 | enable = true; |
| 115 | enable = false; | 114 | setupOpts = { |
| | 115 | enable_cursor_hijack = true; |
| | 116 | git_status_async = true; |
| 116 | }; | 117 | }; |
| 117 | }; | 118 | }; |
| 118 | tabline = { | 119 | fzf-lua = { |
| 119 | nvimBufferline.enable = true; | 120 | enable = true; |
| | 121 | setupOpts = { |
| | 122 | fzf_colors = true; |
| | 123 | }; |
| 120 | }; | 124 | }; |
| 121 | autocomplete = { | 125 | autocomplete.blink-cmp = { |
| 122 | blink-cmp = { | 126 | enable = true; |
| 123 | enable = true; | 127 | mappings = { |
| 124 | sourcePlugins = { | 128 | close = null; |
| 125 | ripgrep.enable = true; | 129 | complete = null; |
| | 130 | confirm = null; |
| | 131 | next = null; |
| | 132 | previous = null; |
| | 133 | scrollDocsDown = null; |
| | 134 | scrollDocsUp = null; |
| | 135 | }; |
| | 136 | setupOpts = { |
| | 137 | keymap = { |
| | 138 | preset = "super-tab"; |
| 126 | }; | 139 | }; |
| 127 | friendly-snippets.enable = true; | 140 | completion = { |
| | 141 | ghost_text.enabled = false; |
| | 142 | list.selection.preselect = true; |
| | 143 | trigger = { |
| | 144 | show_in_snippet = true; |
| | 145 | }; |
| | 146 | accept.auto_brackets.enabled = true; |
| | 147 | }; |
| | 148 | signature.enabled = true; |
| 128 | }; | 149 | }; |
| | 150 | sourcePlugins = { |
| | 151 | ripgrep.enable = true; |
| | 152 | }; |
| | 153 | friendly-snippets.enable = true; |
| 129 | }; | 154 | }; |
| 130 | statusline = { | 155 | statusline = { |
| 131 | lualine = { | 156 | lualine = { |
| ... | @@ -137,71 +162,6 @@ | ... | @@ -137,71 +162,6 @@ |
| 137 | }; | 162 | }; |
| 138 | }; | 163 | }; |
| 139 | }; | 164 | }; |
| 140 | | | |
| 141 | utility = { | | |
| 142 | snacks-nvim = { | | |
| 143 | enable = true; | | |
| 144 | setupOpts = { | | |
| 145 | bigfile.enable = true; | | |
| 146 | dashboard = { | | |
| 147 | preset.keys = [ | | |
| 148 | { | | |
| 149 | icon = " "; | | |
| 150 | key = "n"; | | |
| 151 | desc = "New File"; | | |
| 152 | action = ":ene | startinsert"; | | |
| 153 | } | | |
| 154 | { | | |
| 155 | icon = " "; | | |
| 156 | key = "r"; | | |
| 157 | desc = "Recent Files"; | | |
| 158 | action = ":lua Snacks.dashboard.pick('oldfiles')"; | | |
| 159 | } | | |
| 160 | ]; | | |
| 161 | sections = [ | | |
| 162 | { section = "header"; } | | |
| 163 | { | | |
| 164 | section = "keys"; | | |
| 165 | indent = 2; | | |
| 166 | padding = 1; | | |
| 167 | } | | |
| 168 | { | | |
| 169 | icon = " "; | | |
| 170 | title = "Projects"; | | |
| 171 | section = "projects"; | | |
| 172 | indent = 2; | | |
| 173 | padding = 1; | | |
| 174 | } | | |
| 175 | { | | |
| 176 | icon = " "; | | |
| 177 | title = "Git"; | | |
| 178 | section = "terminal"; | | |
| 179 | enabled = lib.options.literalExpression '' | | |
| 180 | function() | | |
| 181 | return Snacks.git.get_root() ~= nil | | |
| 182 | end | | |
| 183 | ''; | | |
| 184 | cmd = "git status --short --branch --renames"; | | |
| 185 | height = 10; | | |
| 186 | padding = 1; | | |
| 187 | ttl = 5 * 60; | | |
| 188 | indent = 3; | | |
| 189 | } | | |
| 190 | ]; | | |
| 191 | }; | | |
| 192 | image = { | | |
| 193 | enable = true; | | |
| 194 | math.enabled = false; | | |
| 195 | }; | | |
| 196 | notifier.timeout = 3000; | | |
| 197 | picker = { | | |
| 198 | enable = true; | | |
| 199 | sources = { | | |
| 200 | }; | | |
| 201 | }; | | |
| 202 | }; | | |
| 203 | }; | | |
| 204 | }; | | |
| 205 | binds = { | 165 | binds = { |
| 206 | whichKey.enable = true; | 166 | whichKey.enable = true; |
| 207 | cheatsheet.enable = true; | 167 | cheatsheet.enable = true; |