From b6bca8d50fd338f4b6b5bb10be56e35630382d16 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 14 Oct 2021 00:32:55 +0100 Subject: [PATCH] refactor(nvim): split options into their own file --- nvim/.config/nvim/init.vim | 30 --------------------------- nvim/.config/nvim/plugins/options.vim | 27 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 30 deletions(-) create mode 100644 nvim/.config/nvim/plugins/options.vim diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 2562859..d3debda 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -1,5 +1,3 @@ -let mapleader = " " - function! s:LoadPlugins() call plug#begin('~/.local/share/nvim/plugins') source ~/.config/nvim/plugins.vim @@ -16,31 +14,6 @@ function! s:SourceConfigFilesIn(directory) endfunction call s:LoadPlugins() - -syntax on -filetype on -filetype indent on -filetype plugin on - -set autoindent -set breakindent -set clipboard+=unnamedplus -set complete+=kspell -set expandtab -set foldlevelstart=99 " Start unfolded -set foldmethod=indent -set formatoptions=l -set linebreak -set mouse=n -set noswapfile -set nowrap -set number relativenumber -set scrolloff=10 " Automatically scroll -set shiftwidth=2 -set smartindent -set tabstop=2 softtabstop=2 -set termguicolors - call s:SourceConfigFilesIn('plugins') autocmd FileType gitcommit highlight ColorColumn ctermbg=8 @@ -48,7 +21,4 @@ autocmd FileType gitcommit setlocal colorcolumn=50,72 autocmd FileType gitcommit setlocal textwidth=72 autocmd FileType gitcommit setlocal spell -" Display extra whitespace -set list listchars=tab:»·,trail:· - lua require("opdavies") diff --git a/nvim/.config/nvim/plugins/options.vim b/nvim/.config/nvim/plugins/options.vim new file mode 100644 index 0000000..7397fe5 --- /dev/null +++ b/nvim/.config/nvim/plugins/options.vim @@ -0,0 +1,27 @@ +let mapleader = " " + +syntax on +filetype on +filetype indent on +filetype plugin on + +set autoindent +set breakindent +set clipboard+=unnamedplus +set complete+=kspell +set expandtab +set foldlevelstart=99 " Start unfolded +set foldmethod=indent +set formatoptions=l +set linebreak +set list listchars=tab:»·,trail:· " Display extra whitespace +set mouse=n +set noswapfile +set nowrap +set number relativenumber +set scrolloff=10 " Automatically scroll +set shiftwidth=2 +set smartindent +set tabstop=2 softtabstop=2 +set termguicolors +