updated nvim config

This commit is contained in:
joelchrono12 2022-12-06 11:59:10 -06:00
parent 4f3e563f47
commit 60210ffed4
Signed by: chrono
GPG Key ID: E23D9C7FA57497A6
21 changed files with 67 additions and 44 deletions

View File

@ -242,6 +242,8 @@ function! plug#begin(...)
let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p'))
elseif exists('g:plug_home')
let home = s:path(g:plug_home)
elseif has('nvim')
let home = stdpath('data') . '/plugged'
elseif !empty(&rtp)
let home = s:path(split(&rtp, ',')[0]) . '/plugged'
else
@ -350,7 +352,7 @@ function! plug#end()
endif
let lod = { 'ft': {}, 'map': {}, 'cmd': {} }
if exists('g:did_load_filetypes')
if get(g:, 'did_load_filetypes', 0)
filetype off
endif
for name in g:plugs_order
@ -405,7 +407,7 @@ function! plug#end()
for [map, names] in items(lod.map)
for [mode, map_prefix, key_prefix] in
\ [['i', '<C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
\ [['i', '<C-\><C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
execute printf(
\ '%snoremap <silent> %s %s:<C-U>call <SID>lod_map(%s, %s, %s, "%s")<CR>',
\ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix)
@ -2619,26 +2621,34 @@ function! s:preview_commit()
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}')
if empty(sha)
return
let name = matchstr(getline('.'), '^- \zs[^:]*\ze:$')
if empty(name)
return
endif
let title = 'HEAD@{1}..'
let command = 'git diff --no-color HEAD@{1}'
else
let title = sha
let command = 'git show --no-color --pretty=medium '.sha
let name = s:find_name(line('.'))
endif
let name = s:find_name(line('.'))
if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir)
return
endif
if exists('g:plug_pwindow') && !s:is_preview_window_open()
execute g:plug_pwindow
execute 'e' sha
execute 'e' title
else
execute 'pedit' sha
execute 'pedit' title
wincmd P
endif
setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable
setlocal previewwindow filetype=git buftype=nofile bufhidden=wipe nobuflisted modifiable
let batchfile = ''
try
let [sh, shellcmdflag, shrd] = s:chsh(1)
let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha
let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && '.command
if s:is_win
let [batchfile, cmd] = s:batchfile(cmd)
endif
@ -2764,9 +2774,9 @@ function! s:snapshot(force, ...) abort
1
let anchor = line('$') - 3
let names = sort(keys(filter(copy(g:plugs),
\'has_key(v:val, "uri") && !has_key(v:val, "commit") && isdirectory(v:val.dir)')))
\'has_key(v:val, "uri") && isdirectory(v:val.dir)')))
for name in reverse(names)
let sha = s:git_revision(g:plugs[name].dir)
let sha = has_key(g:plugs[name], 'commit') ? g:plugs[name].commit : s:git_revision(g:plugs[name].dir)
if !empty(sha)
call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha))
redraw

View File

@ -1208,7 +1208,8 @@ function! s:update_impl(pull, force, args) abort
normal! 2G
silent! redraw
let s:clone_opt = []
" Set remote name, overriding a possible user git config's clone.defaultRemoteName
let s:clone_opt = ['--origin', 'origin']
if get(g:, 'plug_shallow', 1)
call extend(s:clone_opt, ['--depth', '1'])
if s:git_version_requirement(1, 7, 10)

@ -1 +1 @@
Subproject commit eed488b1cd1867bd25f19f90e10440c5cc7d6424
Subproject commit fc85a6f07c2cd694be93496ffad75be126240068

@ -1 +1 @@
Subproject commit 287c743c9f227fdf0e1db452bbb8ae3c5caffc36
Subproject commit 24347d43c066fb8e60206c4be3fa6432fa7d3e8a

@ -1 +1 @@
Subproject commit 208cb28ed1d81d9207509f7254f436335822ec93
Subproject commit 0c40bb889262bd275d15de62f2a719c2bccd004b

@ -1 +1 @@
Subproject commit a9c7283dce60ffcdec952384f6451ff42f8914f2
Subproject commit 7f5d35a65510083ea5c2d0941797244b9963d4a9

@ -1 +1 @@
Subproject commit 961cc1850bd7d5657aa5789f81487d4d85747d2b
Subproject commit 2b5b1f777f0583ffb39086d6c16f39e6e37459c0

@ -1 +1 @@
Subproject commit eebac6c4fce06d3b849cccd213b7233d37ab037f
Subproject commit 86aaec1700b27618d33d6182f44691d84d2cb6e5

@ -1 +1 @@
Subproject commit eddd535bdf8472db469b48ac8cf826871b340c4b
Subproject commit 98cc4a2d64ca67cccbf5b5cf47c682ebadaaff58

@ -1 +1 @@
Subproject commit df497a7b396d32a721fa72bd9119db2bca3deed6
Subproject commit 0748955e9e8d9770b44f2bec8456189430b37d9d

@ -1 +1 @@
Subproject commit e86ce939d85576fb7ce6c1c45fd49c8a570c24cc
Subproject commit b6b5ffe31a195a3077338d7a506b905e4a51590f

@ -1 +1 @@
Subproject commit 24cb98f48fbe5ba7a64d1099d334430a5937a175
Subproject commit 91b67e3ca2d7bc66544724f9c702265c564a1f2e

@ -1 +1 @@
Subproject commit 365231384cf9edc32b2fc34f6c3e1b31eeabfedf
Subproject commit 49cc58573e746d02024110d9af99e95994ea4b72

@ -1 +1 @@
Subproject commit a319aaf6bf652dadb197807e4629ff5b1750a17b
Subproject commit 0550762a69a2ef13d9f723c9478155dbc6ad7ddb

@ -1 +1 @@
Subproject commit c68ce5504fa64b31a5bc3029460faa84f84b598c
Subproject commit d1cde72d9ba5b8e811df7bb28b2606685453f375

@ -1 +1 @@
Subproject commit 3f35acfb753cc9ea22182400b075c5b6e896ad71
Subproject commit 526cffde2cb013ae337cdf48e244bb15881ab7ce

@ -1 +1 @@
Subproject commit ae7753878f8740fbdb2cef5617911ef83255349b
Subproject commit 6fb52e32863646e38cdebce57ae0d1688f334a79

@ -1 +1 @@
Subproject commit 918610d427503c5c7b380eae4a954bd8cb427db5
Subproject commit bc8a81d3592dab86334f27d1d43c080ebf680d42

@ -1 +1 @@
Subproject commit c547471c0ed32b8511f62752974cde5277e13df4
Subproject commit 9555a3e6e5bcf285ec181b7fc983eea90500feb4

View File

@ -1,8 +1,8 @@
" Call all plugins from a different file script.
source $HOME/.config/nvim/vim-plug/plugins.vim
syntax on
set encoding=utf-8
"syntax on
"set encoding=utf-8
"set tabstop=4 softtabstop=4
"set shiftwidth=4
"set expandtab
@ -17,9 +17,24 @@ set signcolumn=yes
set smartcase
set incsearch
colorscheme nord
" Example config in VimScript
let g:tokyonight_style = "night"
"let g:tokyonight_italic_functions = 1
"let g:tokyonight_sidebars = [ "qf", "vista_kind", "terminal", "packer" ]
highlight ColorColumn ctermbg=0 guibg=lightgrey
"" Change the "hint" color to the "orange" color, and make the "error" color bright red
"let g:tokyonight_colors = {
"\ 'hint': 'orange',
"\ 'error': '#ff0000'
"\ }
colorscheme tokyonight
let g:lightline = {
\ 'colorscheme': 'tokyonight',
\ }
"highlight ColorColumn ctermbg=blue guibg=lightgrey
highlight Comment cterm=italic gui=italic
highlight htmlBold gui=bold guifg=#af0000 ctermfg=green
highlight htmlItalic gui=italic guifg=#ff8700 ctermfg=blue
@ -70,16 +85,12 @@ augroup MarkdownConfiguration
augroup END
let g:lightline = {
\ 'colorscheme': 'nord',
\ }
nmap <leader>gh :diffget //3<CR>
nmap <leader>gu :diffget //2<CR>
nmap <leader>gs :G<CR>
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
"nmap <silent> gd <Plug>(coc-definition)
"nmap <silent> gy <Plug>(coc-type-definition)
"nmap <silent> gi <Plug>(coc-implementation)
"nmap <silent> gr <Plug>(coc-references)

View File

@ -16,7 +16,8 @@ call plug#begin('~/.config/nvim/autoload/plugged')
Plug 'jiangmiao/auto-pairs'
Plug 'rwxrob/vim-pandoc-syntax-simple'
Plug 'arcticicestudio/nord-vim'
"Plug 'itchyny/lightline.vim'
Plug 'folke/tokyonight.nvim', { 'branch': 'main' }
Plug 'itchyny/lightline.vim'
"Plug 'vifm/vifm.vim'
Plug 'tpope/vim-fugitive'
"Plug 'vim-scripts/AutoComplPop'
@ -29,7 +30,7 @@ call plug#begin('~/.config/nvim/autoload/plugged')
Plug 'kien/ctrlp.vim'
Plug 'dhruvasagar/vim-table-mode'
"Plug 'ycm-core/YouCompleteMe'
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'gruvbox-community/gruvbox'
Plug 'sickill/vim-monokai'
@ -38,7 +39,7 @@ call plug#begin('~/.config/nvim/autoload/plugged')
"Starting to learn go
Plug 'fatih/vim-go'
Plug 'masukomi/vim-markdown-folding'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
"Plug 'vim-airline/vim-airline'
"Plug 'vim-airline/vim-airline-themes'
Plug 'editorconfig/editorconfig-vim'
call plug#end()