updated setup
This commit is contained in:
parent
79f4fe3aff
commit
230cd69759
|
@ -170,6 +170,7 @@ snippet makedoc
|
|||
\usepackage{hyperref}
|
||||
\usepackage{geometry}
|
||||
\usepackage{enumerate}
|
||||
\usepackage{braket}
|
||||
\geometry{left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm}
|
||||
|
||||
\title{$1}
|
||||
|
@ -223,3 +224,20 @@ snippet subfigures
|
|||
\end{figure}
|
||||
|
||||
endsnippet
|
||||
|
||||
snippet ketup
|
||||
\ket{\uparrow}
|
||||
endsnippet
|
||||
snippet ketdown
|
||||
\ket{\downarrow}
|
||||
endsnippet
|
||||
|
||||
snippet dmath
|
||||
\begin{dmath}
|
||||
$1
|
||||
\end{dmath}
|
||||
endsnippet
|
||||
|
||||
snippet ->
|
||||
\rightarrow
|
||||
endsnippet
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
|
||||
"
|
||||
" " On-demand loading
|
||||
" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||
" Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||
" Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
|
||||
"
|
||||
" " 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'))
|
||||
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)
|
||||
|
@ -1208,7 +1210,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)
|
||||
|
@ -2618,26 +2621,34 @@ function! s:preview_commit()
|
|||
|
||||
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}')
|
||||
if empty(sha)
|
||||
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
|
||||
|
||||
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
|
||||
|
@ -2763,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
|
||||
|
|
108
init.vim
108
init.vim
|
@ -168,9 +168,11 @@ nvim_lsp.clangd.setup{on_attach=on_attach
|
|||
--, flags = { debounce_text_changes = 150, }
|
||||
}
|
||||
--nvim_lsp.vimls.setup{on_attach=on_attach, capabilities=nvim_lsp_status.capabilities}
|
||||
--nvim_lsp.pylsp.setup{on_attach=on_attach, capabilities=nvim_lsp_status.capabilities}
|
||||
nvim_lsp.pylsp.setup{on_attach=on_attach, capabilities=nvim_lsp_status.capabilities}
|
||||
--nvim_lsp.bashls.setup{on_attach=on_attach, capabilities=nvim_lsp_status.capabilities}
|
||||
--nvim_lsp.yamlls.setup{on_attach=on_attach, capabilities=nvim_lsp_status.capabilities}
|
||||
nvim_lsp.texlab.setup{on_attach=on_attach, capabilities=nvim_lsp_status.capabilities}
|
||||
nvim_lsp.rust_analyzer.setup{on_attach=on_attach, capabilities=nvim_lsp_status.capabilities}
|
||||
|
||||
EOF
|
||||
|
||||
|
@ -301,6 +303,7 @@ lua <<EOF
|
|||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = {"latex"},
|
||||
},
|
||||
-- indent = {
|
||||
-- enable = true,
|
||||
|
@ -336,7 +339,7 @@ nmap <leader>r <Plug>SlimeParagraphSend
|
|||
"===============================================================================
|
||||
|
||||
if exists('g:started_by_firenvim')
|
||||
let g:firenvim_config['.*'] = { 'takeover': 'never' }
|
||||
"let g:firenvim_config['.*'] = { 'takeover': 'never' }
|
||||
imap <C-j> <C-n>
|
||||
set fileformat=dos
|
||||
colorscheme morning
|
||||
|
@ -359,3 +362,104 @@ set laststatus=2
|
|||
"===============================================================================
|
||||
|
||||
set updatetime=200
|
||||
|
||||
|
||||
|
||||
"================== Settings related to NVim-Tree.lua ==========================
|
||||
"===============================================================================
|
||||
|
||||
lua <<EOF
|
||||
require'nvim-tree'.setup { -- BEGIN_DEFAULT_OPTS
|
||||
--auto_close = false,
|
||||
auto_reload_on_write = true,
|
||||
disable_netrw = false,
|
||||
--hide_root_folder = false,
|
||||
hijack_cursor = false,
|
||||
hijack_netrw = true,
|
||||
hijack_unnamed_buffer_when_opening = false,
|
||||
--ignore_buffer_on_setup = false,
|
||||
--open_on_setup = false,
|
||||
open_on_tab = false,
|
||||
sort_by = "name",
|
||||
update_cwd = false,
|
||||
view = {
|
||||
width = 30,
|
||||
side = "left",
|
||||
preserve_window_proportions = false,
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
signcolumn = "yes",
|
||||
mappings = {
|
||||
custom_only = false,
|
||||
list = {
|
||||
-- user mappings go here
|
||||
},
|
||||
},
|
||||
},
|
||||
hijack_directories = {
|
||||
enable = true,
|
||||
auto_open = true,
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = false,
|
||||
update_cwd = false,
|
||||
ignore_list = {},
|
||||
},
|
||||
--ignore_ft_on_setup = {},
|
||||
system_open = {
|
||||
cmd = nil,
|
||||
args = {},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = false,
|
||||
show_on_dirs = false,
|
||||
icons = {
|
||||
hint = "",
|
||||
info = "",
|
||||
warning = "",
|
||||
error = "",
|
||||
},
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
custom = {},
|
||||
exclude = {},
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = true,
|
||||
timeout = 400,
|
||||
},
|
||||
actions = {
|
||||
change_dir = {
|
||||
enable = true,
|
||||
global = false,
|
||||
},
|
||||
open_file = {
|
||||
quit_on_open = false,
|
||||
resize_window = false,
|
||||
window_picker = {
|
||||
enable = true,
|
||||
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
|
||||
exclude = {
|
||||
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
|
||||
buftype = { "nofile", "terminal", "help" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
trash = {
|
||||
cmd = "trash",
|
||||
require_confirm = true,
|
||||
},
|
||||
log = {
|
||||
enable = false,
|
||||
truncate = false,
|
||||
types = {
|
||||
all = false,
|
||||
config = false,
|
||||
git = false,
|
||||
},
|
||||
},
|
||||
} -- END_DEFAULT_OPTS
|
||||
EOF
|
||||
|
|
Loading…
Reference in New Issue
Block a user