nix-configs

Personal NixOS and home-manager configuration files
Log | Files | Refs

commit 5a04f88b65066d60dc6e80ec893a2a67a3b1f281
parent f4f469c9d7c1b1290e0194785a7fa2a9acaf19f3
Author: Peter <peter@minskio.co.uk>
Date:   Tue, 22 Sep 2026 16:53:37 +0100

Include sortblock in neovim config

Diffstat:
Mhome/neovim.nix | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/home/neovim.nix b/home/neovim.nix @@ -1,13 +1,17 @@ { pkgs, ... }: +let + sortblock = pkgs.callPackage ../scripts/neovim-sortblock.nix { }; +in { programs.neovim = { enable = true; withPython3 = false; withRuby = false; defaultEditor = true; - plugins = with pkgs.vimPlugins; [ vim-nix ]; + plugins = with pkgs.vimPlugins; [ vim-nix sortblock ]; extraConfig = '' + " Options set smartcase set nocompatible let mapleader ="," @@ -26,19 +30,23 @@ set softtabstop=2 set tabstop=2 syntax on + " Remapping map <C-H> <C-W> map <C-Del> X<Esc>ce<del> map <F8> :setlocal spell! spelllang=en_gb<CR> xnoremap <A-z> :s/^.<CR>gv " alt-z removes first character of line nnoremap <A-z> 0x " alt-z in normal mode removes first char + " Abbreviations :iab <expr> _date strftime("%F") :iab <expr> _time strftime("%H:%M") :iab <expr> _stamp strftime("%F\T%H:%M:00") + " Tidy lines on save autocmd BufWritePre * %s/\s\+$//e autocmd BufWritepre * %s/\n\+\%$//e - lua << EOF ''; initLua = '' + require("sortblock").setup() + vim.api.nvim_create_user_command("Uppercase", function() vim.cmd("'<,'>s/.*/\\U&/") end, { range = true })