From f38b64fb51a16278726285545b9c2f4042ad8799 Mon Sep 17 00:00:00 2001 From: buffet Date: Wed, 17 Aug 2022 11:24:05 +0000 Subject: [PATCH] Misc vim options --- programs/nvim.nix | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/programs/nvim.nix b/programs/nvim.nix index cac73db..53f70de 100644 --- a/programs/nvim.nix +++ b/programs/nvim.nix @@ -35,13 +35,19 @@ { plugin = gitsigns-nvim; - config = "lua require 'gitsigns'.setup()"; + config = '' + lua require 'gitsigns'.setup() + set signcolumn=yes + ''; } # TODO: replace with own bar { plugin = lightline-vim; - config = "let g:lightline = { 'colorscheme': 'solarized' }"; + config = '' + let g:lightline = { 'colorscheme': 'solarized' } + set noshowmode + ''; } { @@ -125,7 +131,10 @@ } ]; - extraConfig = '' + extraConfig = let + theme = import ../theme.nix; + in '' + " keybinds let mapleader = "${leader}" let g:mapleader = "${leader}" @@ -140,6 +149,38 @@ nnoremap l nnoremap s :w + + " misc + set termguicolors + set mouse=a + set undofile + set hidden + set encoding=utf-8 + set hlsearch + set incsearch + set ignorecase + set smartcase + set lazyredraw + set splitbelow + set splitright + set matchtime=2 + set showmatch + set nowrap + set nowritebackup + set updatetime=250 + set colorcolumn=+1 + set cursorline + + set shiftwidth=4 + set tabstop=4 + set expandtab + + set shiftround + set autoindent + set smartindent + + highlight! ExtraWhitespace guibg=${theme.normal.red} + match ExtraWhitespace /\s\+$/ ''; }; };