From: Skullheadx Date: Fri, 1 May 2026 17:12:13 +0000 (-0400) Subject: neovim config X-Git-Url: http://git.skullheadx.com/nixos/static/batman.png?a=commitdiff_plain;h=9ed65da9cf65abf204f36a9c7f823bc5e35e04c3;p=nixos.git neovim config --- diff --git a/configuration.nix b/configuration.nix index 7660ce3..dddce33 100644 --- a/configuration.nix +++ b/configuration.nix @@ -79,10 +79,6 @@ }; }; - - - - programs.steam = { enable = true; remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play diff --git a/sh.nix b/sh.nix index 71b0647..2e280dc 100644 --- a/sh.nix +++ b/sh.nix @@ -1,4 +1,5 @@ -{config, pkgs, ... }:{ +{ config, pkgs, ... }: +{ programs.bash = { enable = true; interactiveShellInit = '' @@ -18,7 +19,7 @@ shellAliases = { nix-sw = "sudo nixos-rebuild switch --flake ."; nix-upd-sl = "sudo nix flake update my-slstatus my-dwm my-surf my-st my-dmenu"; - + }; }; diff --git a/todo b/todo index a25da8f..c212dcc 100644 --- a/todo +++ b/todo @@ -29,7 +29,7 @@ - [x] toggable transparency - [ ] vim - [ ] find a non ai fork? vim classic? - - [ ] line nums + - [x] line nums - [ ] color theme - [ ] password manager diff --git a/vim.nix b/vim.nix index 90db98d..0e81b04 100644 --- a/vim.nix +++ b/vim.nix @@ -1,4 +1,4 @@ -{config, pkgs, ... }: +{ config, pkgs, ... }: { environment.systemPackages = with pkgs; [ @@ -10,67 +10,127 @@ exec ${pkgs.nvi}/bin/vi "$@" ''; }) - neovim ]; - environment.etc."vimrc".text = '' -set autoread -au FocusGained,BufEnter * silent! checktime + set autoread + au FocusGained,BufEnter * silent! checktime -" :W sudo saves the file -" (useful for handling the permission-denied error) -command! W execute 'w !sudo tee % > /dev/null' edit! + " :W sudo saves the file + " (useful for handling the permission-denied error) + command! W execute 'w !sudo tee % > /dev/null' edit! -" Turn on the Wild menu -set wildmenu + " Turn on the Wild menu + set wildmenu -" Ignore compiled files -set wildignore=*.o,*~,*.pyc -set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store + " Ignore compiled files + set wildignore=*.o,*~,*.pyc + set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store -set ruler + set ruler -set ignorecase -set smartcase -set hlsearch -set incsearch -set lazyredraw -set magic -set showmatch + set ignorecase + set smartcase + set hlsearch + set incsearch + set lazyredraw + set magic + set showmatch -syntax enable -set noswapfile + syntax enable + set noswapfile -" Use spaces instead of tabs -set expandtab + " Use spaces instead of tabs + set expandtab -" Be smart when using tabs ;) -set smarttab + " Be smart when using tabs ;) + set smarttab -" 1 tab == 4 spaces -set shiftwidth=4 -set tabstop=4 + " 1 tab == 4 spaces + set shiftwidth=4 + set tabstop=4 -" Linebreak on 500 characters -set lbr -set tw=500 + " Linebreak on 500 characters + set lbr + set tw=500 -set ai "Auto indent -set si "Smart indent -set wrap "Wrap lines + set ai "Auto indent + set si "Smart indent + set wrap "Wrap lines -" Always show the status line -set laststatus=2 + " Always show the status line + set laststatus=2 -set number relativenumber + set number relativenumber - " Force the cursor to a Block when Vim starts -let &t_ti = &t_ti . "\e[2 q" -let &t_te = &t_te . "\e[2 q" -let &t_EI = "\e[2 q" -let &t_SI = "\e[2 q" + " Force the cursor to a Block when Vim starts + let &t_ti = &t_ti . "\e[2 q" + let &t_te = &t_te . "\e[2 q" + let &t_EI = "\e[2 q" + let &t_SI = "\e[2 q" ''; + + programs.neovim = { + enable = true; + defaultEditor = true; + configure = { + customRC = '' + + set autoread + au FocusGained,BufEnter * silent! checktime + + " :W sudo saves the file + " (useful for handling the permission-denied error) + command! W execute 'w !sudo tee % > /dev/null' edit! + + " Turn on the Wild menu + set wildmenu + + " Ignore compiled files + set wildignore=*.o,*~,*.pyc + set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store + + + set ruler + + set ignorecase + set smartcase + set hlsearch + set incsearch + set lazyredraw + set magic + set showmatch + + syntax enable + set noswapfile + + " Use spaces instead of tabs + set expandtab + + " Be smart when using tabs ;) + set smarttab + + " 1 tab == 4 spaces + set shiftwidth=4 + set tabstop=4 + + " Linebreak on 500 characters + set lbr + set tw=500 + + set ai "Auto indent + set si "Smart indent + set wrap "Wrap lines + + " Always show the status line + set laststatus=2 + + set number relativenumber + + ''; + }; + }; + }