desktop update
This commit is contained in:
parent
c667df83fa
commit
140f471283
6 changed files with 88 additions and 15 deletions
|
|
@ -171,7 +171,7 @@ font:
|
||||||
#
|
#
|
||||||
# Thin strokes are suitable for retina displays, but for non-retina screens
|
# Thin strokes are suitable for retina displays, but for non-retina screens
|
||||||
# it is recommended to set `use_thin_strokes` to `false`.
|
# it is recommended to set `use_thin_strokes` to `false`.
|
||||||
use_thin_strokes: true
|
#use_thin_strokes: true
|
||||||
|
|
||||||
# If `true`, bold text is drawn using the bright color variants.
|
# If `true`, bold text is drawn using the bright color variants.
|
||||||
draw_bold_text_with_bright_colors: false
|
draw_bold_text_with_bright_colors: false
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
hist = show-branch -a
|
hist = show-branch -a
|
||||||
undo-last = reset HEAD^
|
undo-last = reset HEAD^
|
||||||
unstage = restore --staged
|
unstage = restore --staged
|
||||||
|
latest = branch --sort=committerdate
|
||||||
|
|
||||||
[diff]
|
[diff]
|
||||||
renamelimit = 0
|
renamelimit = 0
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
|
" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
|
||||||
"
|
"
|
||||||
" " On-demand loading
|
" " On-demand loading
|
||||||
" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
" Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||||
" Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
|
" Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
|
||||||
"
|
"
|
||||||
" " Using a non-default branch
|
" " Using a non-default branch
|
||||||
|
|
@ -242,6 +242,8 @@ function! plug#begin(...)
|
||||||
let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p'))
|
let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p'))
|
||||||
elseif exists('g:plug_home')
|
elseif exists('g:plug_home')
|
||||||
let home = s:path(g:plug_home)
|
let home = s:path(g:plug_home)
|
||||||
|
elseif has('nvim')
|
||||||
|
let home = stdpath('data') . '/plugged'
|
||||||
elseif !empty(&rtp)
|
elseif !empty(&rtp)
|
||||||
let home = s:path(split(&rtp, ',')[0]) . '/plugged'
|
let home = s:path(split(&rtp, ',')[0]) . '/plugged'
|
||||||
else
|
else
|
||||||
|
|
@ -350,7 +352,7 @@ function! plug#end()
|
||||||
endif
|
endif
|
||||||
let lod = { 'ft': {}, 'map': {}, 'cmd': {} }
|
let lod = { 'ft': {}, 'map': {}, 'cmd': {} }
|
||||||
|
|
||||||
if exists('g:did_load_filetypes')
|
if get(g:, 'did_load_filetypes', 0)
|
||||||
filetype off
|
filetype off
|
||||||
endif
|
endif
|
||||||
for name in g:plugs_order
|
for name in g:plugs_order
|
||||||
|
|
@ -405,7 +407,7 @@ function! plug#end()
|
||||||
|
|
||||||
for [map, names] in items(lod.map)
|
for [map, names] in items(lod.map)
|
||||||
for [mode, map_prefix, key_prefix] in
|
for [mode, map_prefix, key_prefix] in
|
||||||
\ [['i', '<C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
|
\ [['i', '<C-\><C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
|
||||||
execute printf(
|
execute printf(
|
||||||
\ '%snoremap <silent> %s %s:<C-U>call <SID>lod_map(%s, %s, %s, "%s")<CR>',
|
\ '%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)
|
\ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix)
|
||||||
|
|
@ -1208,7 +1210,8 @@ function! s:update_impl(pull, force, args) abort
|
||||||
normal! 2G
|
normal! 2G
|
||||||
silent! redraw
|
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)
|
if get(g:, 'plug_shallow', 1)
|
||||||
call extend(s:clone_opt, ['--depth', '1'])
|
call extend(s:clone_opt, ['--depth', '1'])
|
||||||
if s:git_version_requirement(1, 7, 10)
|
if s:git_version_requirement(1, 7, 10)
|
||||||
|
|
@ -2618,26 +2621,34 @@ function! s:preview_commit()
|
||||||
|
|
||||||
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}')
|
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}')
|
||||||
if empty(sha)
|
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
|
endif
|
||||||
|
|
||||||
let name = s:find_name(line('.'))
|
|
||||||
if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir)
|
if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir)
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists('g:plug_pwindow') && !s:is_preview_window_open()
|
if exists('g:plug_pwindow') && !s:is_preview_window_open()
|
||||||
execute g:plug_pwindow
|
execute g:plug_pwindow
|
||||||
execute 'e' sha
|
execute 'e' title
|
||||||
else
|
else
|
||||||
execute 'pedit' sha
|
execute 'pedit' title
|
||||||
wincmd P
|
wincmd P
|
||||||
endif
|
endif
|
||||||
setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable
|
setlocal previewwindow filetype=git buftype=nofile bufhidden=wipe nobuflisted modifiable
|
||||||
let batchfile = ''
|
let batchfile = ''
|
||||||
try
|
try
|
||||||
let [sh, shellcmdflag, shrd] = s:chsh(1)
|
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
|
if s:is_win
|
||||||
let [batchfile, cmd] = s:batchfile(cmd)
|
let [batchfile, cmd] = s:batchfile(cmd)
|
||||||
endif
|
endif
|
||||||
|
|
@ -2763,9 +2774,9 @@ function! s:snapshot(force, ...) abort
|
||||||
1
|
1
|
||||||
let anchor = line('$') - 3
|
let anchor = line('$') - 3
|
||||||
let names = sort(keys(filter(copy(g:plugs),
|
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)
|
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)
|
if !empty(sha)
|
||||||
call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha))
|
call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha))
|
||||||
redraw
|
redraw
|
||||||
|
|
|
||||||
54
.vim/indent/gohtmltmpl.vim
Normal file
54
.vim/indent/gohtmltmpl.vim
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
if exists("b:did_indent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
runtime! indent/html.vim
|
||||||
|
|
||||||
|
" Indent Golang HTML templates
|
||||||
|
setlocal indentexpr=GetGoHTMLTmplIndent(v:lnum)
|
||||||
|
setlocal indentkeys+==else,=end
|
||||||
|
|
||||||
|
" Only define the function once.
|
||||||
|
if exists("*GetGoHTMLTmplIndent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" don't spam the user when Vim is started in Vi compatibility mode
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
function! GetGoHTMLTmplIndent(lnum)
|
||||||
|
" Get HTML indent
|
||||||
|
if exists('*HtmlIndent')
|
||||||
|
let ind = HtmlIndent()
|
||||||
|
else
|
||||||
|
let ind = HtmlIndentGet(a:lnum)
|
||||||
|
endif
|
||||||
|
|
||||||
|
" The value of a single shift-width
|
||||||
|
if exists('*shiftwidth')
|
||||||
|
let sw = shiftwidth()
|
||||||
|
else
|
||||||
|
let sw = &sw
|
||||||
|
endif
|
||||||
|
|
||||||
|
" If need to indent based on last line
|
||||||
|
let last_line = getline(a:lnum-1)
|
||||||
|
if last_line =~ '^\s*{{-\=\s*\%(if\|else\|range\|with\|define\|block\).*}}'
|
||||||
|
let ind += sw
|
||||||
|
endif
|
||||||
|
|
||||||
|
" End of FuncMap block
|
||||||
|
let current_line = getline(a:lnum)
|
||||||
|
if current_line =~ '^\s*{{-\=\s*\%(else\|end\).*}}'
|
||||||
|
let ind -= sw
|
||||||
|
endif
|
||||||
|
|
||||||
|
return ind
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" restore Vi compatibility settings
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
" vim: sw=2 ts=2 et
|
||||||
|
|
@ -355,18 +355,23 @@ require 'nvim-treesitter.configs'.setup {
|
||||||
"c",
|
"c",
|
||||||
"cpp",
|
"cpp",
|
||||||
"css",
|
"css",
|
||||||
|
"dockerfile",
|
||||||
"fish",
|
"fish",
|
||||||
"go",
|
"go",
|
||||||
|
"haskell",
|
||||||
|
"html",
|
||||||
"javascript",
|
"javascript",
|
||||||
"json",
|
"json",
|
||||||
"lua",
|
"lua",
|
||||||
"make",
|
"make",
|
||||||
"markdown",
|
"markdown",
|
||||||
|
"proto",
|
||||||
"python",
|
"python",
|
||||||
"query",
|
"query",
|
||||||
"rust",
|
"rust",
|
||||||
"svelte",
|
"svelte",
|
||||||
"typescript",
|
"typescript",
|
||||||
|
"toml",
|
||||||
"vim",
|
"vim",
|
||||||
"yaml",
|
"yaml",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
6
.vimrc
6
.vimrc
|
|
@ -172,6 +172,7 @@ Plug 'plytophogy/vim-virtualenv'
|
||||||
Plug 'lunaru/vim-less'
|
Plug 'lunaru/vim-less'
|
||||||
Plug 'hylang/vim-hy', {'for': 'hy'}
|
Plug 'hylang/vim-hy', {'for': 'hy'}
|
||||||
Plug 'jneen/ragel.vim'
|
Plug 'jneen/ragel.vim'
|
||||||
|
Plug 'NoahTheDuke/vim-just'
|
||||||
"Plug 'mhartington/nvim-typescript'
|
"Plug 'mhartington/nvim-typescript'
|
||||||
"Plug 'leafgarland/typescript-vim'
|
"Plug 'leafgarland/typescript-vim'
|
||||||
Plug 'leafOfTree/vim-svelte-plugin'
|
Plug 'leafOfTree/vim-svelte-plugin'
|
||||||
|
|
@ -181,7 +182,7 @@ Plug 'Shougo/context_filetype.vim'
|
||||||
Plug 'fedorenchik/AnsiEsc'
|
Plug 'fedorenchik/AnsiEsc'
|
||||||
Plug 'hwayne/tla.vim'
|
Plug 'hwayne/tla.vim'
|
||||||
Plug 'zchee/vim-goasm'
|
Plug 'zchee/vim-goasm'
|
||||||
"Plug 'cappyzawa/starlark.vim'
|
Plug 'cappyzawa/starlark.vim'
|
||||||
|
|
||||||
" Plugins that autocomplete
|
" Plugins that autocomplete
|
||||||
"Plug 'Shougo/deoplete.nvim'
|
"Plug 'Shougo/deoplete.nvim'
|
||||||
|
|
@ -1016,6 +1017,7 @@ nnoremap <silent> <C-k> <cmd>lua file_list{}<cr>
|
||||||
nnoremap <silent> <Leader>ag <cmd>lua live_grep_repo{ word_match = "-w", only_sort_text = true, search = ''}<cr>
|
nnoremap <silent> <Leader>ag <cmd>lua live_grep_repo{ word_match = "-w", only_sort_text = true, search = ''}<cr>
|
||||||
nnoremap <silent> <Leader>aw <cmd>lua git_grep_word{ word_match = "-w", only_sort_text = true, initial_mode = "normal" }<cr>
|
nnoremap <silent> <Leader>aw <cmd>lua git_grep_word{ word_match = "-w", only_sort_text = true, initial_mode = "normal" }<cr>
|
||||||
nnoremap <silent> <Leader>q <cmd>lua require('telescope.builtin').quickfix{ initial_mode = "normal" }<cr>
|
nnoremap <silent> <Leader>q <cmd>lua require('telescope.builtin').quickfix{ initial_mode = "normal" }<cr>
|
||||||
|
nnoremap <silent> <Leader>ff <cmd>lua require('telescope.builtin').quickfix{ initial_mode = "normal" }<cr>
|
||||||
|
|
||||||
" For C++ -- A is a great plugin which allows you to jump from the c file to the
|
" For C++ -- A is a great plugin which allows you to jump from the c file to the
|
||||||
" header and vice-versa. Mneumonic here is headerheader.
|
" header and vice-versa. Mneumonic here is headerheader.
|
||||||
|
|
@ -1023,7 +1025,7 @@ nnoremap <Leader>hh :A<CR>
|
||||||
" CommandT is useful, but if I'm juggling lots of buffers, limit it to another
|
" CommandT is useful, but if I'm juggling lots of buffers, limit it to another
|
||||||
" one I have open (instead of standard <Leader>t).
|
" one I have open (instead of standard <Leader>t).
|
||||||
"nnoremap <silent> <Leader>o :<C-u>Buffers<CR>
|
"nnoremap <silent> <Leader>o :<C-u>Buffers<CR>
|
||||||
nnoremap <silent> <Leader>o <cmd>lua buffer_telescope{initial_mode = "normal"}<cr>
|
nnoremap <silent> <Leader>o <cmd>lua buffer_telescope{}<cr>
|
||||||
"nnoremap <Leader>j <C-^>
|
"nnoremap <Leader>j <C-^>
|
||||||
"nnoremap <Leader>p :PTW
|
"nnoremap <Leader>p :PTW
|
||||||
nnoremap <Leader>p :LustyJugglePrevious<CR>
|
nnoremap <Leader>p :LustyJugglePrevious<CR>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue