nvim: settings organization

This commit is contained in:
PowerUser64 2021-12-02 03:01:45 -08:00
parent 62bc48fa5d
commit 7b521bdbe6

View file

@ -30,14 +30,14 @@ set.scrolloff = 5
--set.wildmenu
--set.wildmode = full
set.hidden = true
set.shortmess = 'filnxtToOFc'
-- set.spell = true
set.shortmess = 'filnxtToOFc' -- the funny thing is this is a short mess
set.spell = true
set.spelllang = 'en_us'
set.showcmd = true
set.signcolumn = 'yes'
set.makeprg = 'make -j$(nproc)'
set.ruler = false
set.listchars = "eol:↵,trail:~,tab:>-,nbsp:␣"
set.listchars = "eol:↴,trail:~,tab:'»',nbsp:␣,space:·"
----------------------------------------------
--- Key bindings (needs to be translated?) ---
@ -103,10 +103,12 @@ vim.cmd 'nnoremap Q gw'
--- Things that can't be translated to lua ---
----------------------------------------------
vim.cmd 'syntax enable'
vim.cmd "let g:markdown_fenced_languages = [ 'bash=sh', 'javascript', 'cpp=cpp', 'c++=cpp', 'js=javascript', 'json=javascript', 'typescript', 'ts=typescript', 'php', 'html', 'css' ]"
vim.cmd 'let g:markdown_fenced_languages = [ "bash=sh", "javascript", "cpp=cpp", "c++=cpp", "js=javascript", "json=javascript", "typescript", "ts=typescript", "php", "html", "css" ]'
--- autocmd's ---
-- Automatically jump to the last position in a file when opening
vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]]
-- Spell check in git commits by default
vim.cmd 'autocmd Filetype gitcommit setlocal spell'
@ -168,16 +170,3 @@ vim.cmd [[
endfunction
]]
-- Automatically jump to the last position in a file when opening
vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]]
-- Highlight trailing whitespace in red
vim.cmd [[
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
au BufWinEnter * match ExtraWhitespace /\s\+$/
au InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
au InsertLeave * match ExtraWhitespace /\s\+$/
au BufWinLeave * call clearmatches()
]]