From 7a303815d17482316853a382a50ad40dbf7763b0 Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Mon, 30 Sep 2024 23:52:24 -0600 Subject: [PATCH] add neovim home-manager config --- .../fabian@posixlycorrect/apps/default.nix | 2 +- .../fabian@posixlycorrect/apps/neovim.nix | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 home/platforms/fabian@posixlycorrect/apps/neovim.nix diff --git a/home/platforms/fabian@posixlycorrect/apps/default.nix b/home/platforms/fabian@posixlycorrect/apps/default.nix index a85aaa8..36b4784 100644 --- a/home/platforms/fabian@posixlycorrect/apps/default.nix +++ b/home/platforms/fabian@posixlycorrect/apps/default.nix @@ -7,6 +7,7 @@ imports = [ ./steam ./terminal + ./neovim.nix ]; home.packages = with pkgs; [ @@ -26,7 +27,6 @@ man-pages man-pages-posix mpv - neovim obs-studio openrct2 pavucontrol diff --git a/home/platforms/fabian@posixlycorrect/apps/neovim.nix b/home/platforms/fabian@posixlycorrect/apps/neovim.nix new file mode 100644 index 0000000..7492348 --- /dev/null +++ b/home/platforms/fabian@posixlycorrect/apps/neovim.nix @@ -0,0 +1,40 @@ +{ + config, + lib, + pkgs, + ... +}: { + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + defaultEditor = true; + + extraConfig = '' + set nobackup + set showmatch " show matching + set hlsearch " highlight search + set incsearch " incremental search + set tabstop=4 " number of columns occupied by a tab + set softtabstop=4 " see multiple spaces as tabstops so does the right thing + set shiftwidth=4 " width for autoindents + set autoindent " indent a new line the same amount as the line just typed + set number " add line numbers + set wildmode=longest,list " get bash-like tab completions + set cc=80 " set an 80 column border for good coding style + filetype plugin indent on " allow auto-indenting depending on file type + syntax on " syntax highlighting + set mouse=a " enable mouse click + set clipboard=unnamedplus " using system clipboard + filetype plugin on + set cursorline " highlight current cursorline + set ttyfast " Speed up scrolling in Vim + set noswapfile " disable creating swap file + ''; + + plugins = with pkgs.vimPlugins; [ + vim-nix + vim-multiple-cursors + ]; + }; +}