add basic neovim configuration

This commit is contained in:
Daniel Micay 2024-11-16 11:12:11 -05:00
parent e9102f0065
commit 9710fd01bf
4 changed files with 1494 additions and 0 deletions

View File

@ -0,0 +1,41 @@
" -----------------------------------------------------------------------------
" File: gruvbox.vim
" Description: Retro groove color scheme for Vim
" Author: morhetz <morhetz@gmail.com>
" Source: https://github.com/morhetz/gruvbox
" Last Modified: 09 Apr 2014
" -----------------------------------------------------------------------------
function! gruvbox#invert_signs_toggle()
if g:gruvbox_invert_signs == 0
let g:gruvbox_invert_signs=1
else
let g:gruvbox_invert_signs=0
endif
colorscheme gruvbox
endfunction
" Search Highlighting {{{
function! gruvbox#hls_show()
set hlsearch
call GruvboxHlsShowCursor()
endfunction
function! gruvbox#hls_hide()
set nohlsearch
call GruvboxHlsHideCursor()
endfunction
function! gruvbox#hls_toggle()
if &hlsearch
call gruvbox#hls_hide()
else
call gruvbox#hls_show()
endif
endfunction
" }}}
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
set title
set mouse=a
set cursorline
set number
set whichwrap+=<,>,[,]
set virtualedit=block
set scrolloff=3
set shortmess=atToOI
" double slash to use full path to file
set backup backupdir=~/.local/state/nvim/backup//
set undofile
set wildmode=list:longest,full
set expandtab softtabstop=4 shiftwidth=4
set cinoptions=(0
set ignorecase
set smartcase
let mapleader = ","
colorscheme gruvbox
" highlight trailing whitespace, except when typing at eol
highlight ExtraWhitespace ctermbg=darkred guibg=darkred
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()

View File

@ -0,0 +1,3 @@
d /root/.local/state/nvim/backup 0700 root root 10d
d /root/.local/state/nvim/swap 0700 root root 10d
d /root/.local/state/nvim/undo 0700 root root 10d