Merge branch 'master' of https://github.com/mightypanders/dotfiles
This commit is contained in:
commit
859f1679b2
@ -42,8 +42,6 @@ var sites = {
|
||||
Work: {
|
||||
gitlab: "https://gitlab.com/nutmountain/landgard?sort=updated_desc",
|
||||
"enfore api docs": "https://docs.apis.enfore.com/",
|
||||
"n4 daily":
|
||||
"https://zoom.us/j/274186354?pwd=Z29yamZaZ3dHV2ZOM1o2UkVHVUdpQT09",
|
||||
apex:
|
||||
"https://18.185.159.119:8443/ords/f?p=123:LOGIN_DESKTOP:15410784571178:::::",
|
||||
aws:
|
||||
@ -79,8 +77,7 @@ var sites = {
|
||||
sffpc: "https://reddit.com/r/sffpc",
|
||||
unixporn: "https://reddit.com/r/unixporn",
|
||||
games: "https://reddit.com/r/games",
|
||||
switchhaxing: "https://reddit.com/r/switchhaxing",
|
||||
switchhacks: "https://reddit.com/r/switchhacks",
|
||||
switchhacking: "https://reddit.com/r/switchhaxing+switchhacks",
|
||||
},
|
||||
brudi: {
|
||||
heimdall: "http://brudi.xyz",
|
||||
|
252
vim/.vimrc
252
vim/.vimrc
@ -1,5 +1,6 @@
|
||||
syntax on
|
||||
set modelines=0
|
||||
set hidden
|
||||
set number
|
||||
set ruler
|
||||
set visualbell
|
||||
@ -25,6 +26,10 @@ nnoremap <SPACE> <Nop>
|
||||
let mapleader=" "
|
||||
"mappings
|
||||
map <leader>h :set cursorline!<CR>
|
||||
"map <leader>c :!yarn copy-start<CR>
|
||||
"map <leader>b :!yarn build<CR>
|
||||
"map <leader>bs :!yarn build-start<CR>
|
||||
|
||||
xnoremap p "_dP
|
||||
nnoremap <esc><esc> :noh<return><esc>
|
||||
|
||||
@ -32,8 +37,10 @@ if has('nvim')
|
||||
call plug#begin(stdpath('data') . '/plugged')
|
||||
Plug 'junegunn/vim-easy-align'
|
||||
Plug 'morhetz/gruvbox'
|
||||
Plug 'Shougo/deoplete.nvim', {'do':':UpdateRemotePlugins'}
|
||||
Plug 'junegunn/fzf', {'do': {->fzf#install()}}
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'gfanto/fzf-lsp.nvim'
|
||||
Plug 'nvim-lua/lsp-status.nvim'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
Plug 'machakann/vim-sandwich'
|
||||
Plug 'machakann/vim-highlightedyank'
|
||||
@ -41,9 +48,248 @@ if has('nvim')
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'rhysd/vim-clang-format'
|
||||
Plug 'easymotion/vim-easymotion'
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'kosayoda/nvim-lightbulb'
|
||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||
Plug 'hrsh7th/cmp-buffer'
|
||||
Plug 'hrsh7th/cmp-path'
|
||||
Plug 'hrsh7th/cmp-cmdline'
|
||||
Plug 'hrsh7th/nvim-cmp'
|
||||
" Plug 'hrsh7th/cmp-vsnip'
|
||||
" Plug 'hrsh7th/vim-vsnip'
|
||||
Plug 'saadparwaiz1/cmp_luasnip'
|
||||
Plug 'L3MON4D3/LuaSnip'
|
||||
Plug 'kyazdani42/nvim-web-devicons'
|
||||
Plug 'kyazdani42/nvim-tree.lua'
|
||||
"Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
|
||||
call plug#end()
|
||||
|
||||
autocmd vimenter * colorscheme gruvbox
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
let g:clang_format#auto_format=1
|
||||
autocmd BufEnter *.60 :setlocal filetype=sixtyfps
|
||||
let g:clang_format#auto_format=0
|
||||
|
||||
set completeopt=menuone,noselect
|
||||
|
||||
"nvim-tree
|
||||
let g:nvim_tree_gitignore = 1 "0 by default
|
||||
let g:nvim_tree_quit_on_open = 0 "0 by default, closes the tree when you open a file
|
||||
let g:nvim_tree_indent_markers = 1 "0 by default, this option shows indent markers when folders are open
|
||||
let g:nvim_tree_git_hl = 1 "0 by default, will enable file highlight for git attributes (can be used without the icons).
|
||||
let g:nvim_tree_highlight_opened_files = 1 "0 by default, will enable folder and file icon highlight for opened files/directories.
|
||||
let g:nvim_tree_root_folder_modifier = ':~' "This is the default. See :help filename-modifiers for more options
|
||||
let g:nvim_tree_add_trailing = 1 "0 by default, append a trailing slash to folder names
|
||||
let g:nvim_tree_group_empty = 0 " 0 by default, compact folders that only contain a single folder into one node in the file tree
|
||||
let g:nvim_tree_disable_window_picker = 0 "0 by default, will disable the window picker.
|
||||
let g:nvim_tree_icon_padding = ' ' "one space by default, used for rendering the space between the icon and the filename. Use with caution, it could break rendering if you set an empty string depending on your font.
|
||||
let g:nvim_tree_symlink_arrow = ' >> ' " defaults to ' ➛ '. used as a separator between symlinks' source and target.
|
||||
let g:nvim_tree_respect_buf_cwd = 1 "0 by default, will change cwd of nvim-tree to that of new buffer's when opening nvim-tree.
|
||||
let g:nvim_tree_create_in_closed_folder = 0 "1 by default, When creating files, sets the path of a file when cursor is on a closed folder to the parent folder when 0, and inside the folder when 1.
|
||||
let g:nvim_tree_refresh_wait = 500 "1000 by default, control how often the tree can be refreshed, 1000 means the tree can be refresh once per 1000ms.
|
||||
let g:nvim_tree_window_picker_exclude = {
|
||||
\ 'filetype': [
|
||||
\ 'notify',
|
||||
\ 'packer',
|
||||
\ 'qf'
|
||||
\ ],
|
||||
\ 'buftype': [
|
||||
\ 'terminal'
|
||||
\ ]
|
||||
\ }
|
||||
" Dictionary of buffer option names mapped to a list of option values that
|
||||
" indicates to the window picker that the buffer's window should not be
|
||||
" selectable.
|
||||
let g:nvim_tree_special_files = { 'README.md': 1, 'Makefile': 1, 'MAKEFILE': 1 } " List of filenames that gets highlighted with NvimTreeSpecialFile
|
||||
let g:nvim_tree_show_icons = {
|
||||
\ 'git': 1,
|
||||
\ 'folders': 0,
|
||||
\ 'files': 0,
|
||||
\ 'folder_arrows': 0,
|
||||
\ }
|
||||
"If 0, do not show the icons for one of 'git' 'folder' and 'files'
|
||||
"1 by default, notice that if 'files' is 1, it will only display
|
||||
"if nvim-web-devicons is installed and on your runtimepath.
|
||||
"if folder is 1, you can also tell folder_arrows 1 to show small arrows next to the folder icons.
|
||||
"but this will not work when you set indent_markers (because of UI conflict)
|
||||
|
||||
" default will show icon by default if no icon is provided
|
||||
" default shows no icon by default
|
||||
let g:nvim_tree_icons = {
|
||||
\ 'default': '',
|
||||
\ 'symlink': '',
|
||||
\ 'git': {
|
||||
\ 'unstaged': "✗",
|
||||
\ 'staged': "✓",
|
||||
\ 'unmerged': "",
|
||||
\ 'renamed': "➜",
|
||||
\ 'untracked': "★",
|
||||
\ 'deleted': "",
|
||||
\ 'ignored': "◌"
|
||||
\ },
|
||||
\ 'folder': {
|
||||
\ 'arrow_open': "",
|
||||
\ 'arrow_closed': "",
|
||||
\ 'default': "",
|
||||
\ 'open': "",
|
||||
\ 'empty': "",
|
||||
\ 'empty_open': "",
|
||||
\ 'symlink': "",
|
||||
\ 'symlink_open': "",
|
||||
\ }
|
||||
\ }
|
||||
|
||||
nnoremap <C-n> :NvimTreeToggle<CR>
|
||||
nnoremap <leader>r :NvimTreeRefresh<CR>
|
||||
nnoremap <leader>n :NvimTreeFindFile<CR>
|
||||
" NvimTreeOpen, NvimTreeClose, NvimTreeFocus, NvimTreeFindFileToggle, and NvimTreeResize are also available if you need them
|
||||
|
||||
set termguicolors " this variable must be enabled for colors to be applied properly
|
||||
|
||||
" a list of groups can be found at `:help nvim_tree_highlight`
|
||||
highlight NvimTreeFolderIcon guibg=blue
|
||||
|
||||
lua << EOF
|
||||
local cmp = require'cmp'
|
||||
|
||||
local capabilites = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
require'lspconfig'.tsserver.setup{
|
||||
capabilites = capabilites
|
||||
}
|
||||
require'lspconfig'.dockerls.setup{
|
||||
capabilites = capabilites
|
||||
}
|
||||
require'lspconfig'.eslint.setup{
|
||||
capabilites = capabilites
|
||||
}
|
||||
require'lspconfig'.gdscript.setup{
|
||||
capabilites = capabilites
|
||||
}
|
||||
require'lspconfig'.gopls.setup{
|
||||
capabilites = capabilites
|
||||
}
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||
-- require'snippy'.expand_snippet(args.body) -- For `snippy` users.
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-p>'] = cmp.mapping.select_next_item(),
|
||||
['<C-d>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
||||
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
|
||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
|
||||
['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
|
||||
['<C-e>'] = cmp.mapping({
|
||||
i = cmp.mapping.abort(),
|
||||
c = cmp.mapping.close(),
|
||||
}),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<Tab>'] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
['<S-Tab>'] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
-- { name = 'vsnip' }, -- For vsnip users.
|
||||
{ name = 'luasnip' }, -- For luasnip users.
|
||||
-- { name = 'ultisnips' }, -- For ultisnips users.
|
||||
-- { name = 'snippy' }, -- For snippy users.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
cmp.setup.cmdline('/',{
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
cmp.setup.cmdline(':',{
|
||||
sources = cmp.config.sources({
|
||||
{name = 'path'}
|
||||
},{{name='cmdline'}})
|
||||
})
|
||||
|
||||
require'nvim-tree'.setup {
|
||||
disable_netrw = true,
|
||||
hijack_netrw = true,
|
||||
open_on_setup = false,
|
||||
ignore_ft_on_setup = {},
|
||||
auto_close = false,
|
||||
open_on_tab = false,
|
||||
hijack_cursor = false,
|
||||
update_cwd = false,
|
||||
update_to_buf_dir = {
|
||||
enable = true,
|
||||
auto_open = true,
|
||||
},
|
||||
diagnostics = {
|
||||
enable = false,
|
||||
icons = {
|
||||
hint = "",
|
||||
info = "",
|
||||
warning = "",
|
||||
error = "",
|
||||
}
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = false,
|
||||
update_cwd = false,
|
||||
ignore_list = {}
|
||||
},
|
||||
system_open = {
|
||||
cmd = nil,
|
||||
args = {}
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
custom = {}
|
||||
},
|
||||
view = {
|
||||
width = 30,
|
||||
height = 30,
|
||||
hide_root_folder = false,
|
||||
side = 'left',
|
||||
auto_resize = false,
|
||||
mappings = {
|
||||
custom_only = false,
|
||||
list = {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EOF
|
||||
map <leader>f :FZF<CR>
|
||||
nnoremap <leader>ca <cmd>lua vim.lsp.buf.code_action()<cr>
|
||||
nnoremap <leader>gd <cmd>lua vim.lsp.buf.definition()<cr>
|
||||
nnoremap <leader>gD <cmd>lua vim.lsp.buf.declaration()<cr>
|
||||
nnoremap <leader>K <cmd>lua vim.lsp.buf.hover()<cr>
|
||||
nnoremap <leader>rn <cmd>lua vim.lsp.buf.rename()<cr>
|
||||
nnoremap <leader>F <cmd>lua vim.lsp.buf.formatting()<cr>
|
||||
inoremap <c-s> <cmd>lua vim.lsp.buf.signature_help()<cr>
|
||||
|
||||
autocmd BufWritePre *.ts lua vim.lsp.buf.formatting_sync(nil, 1000)
|
||||
|
||||
|
||||
endif
|
||||
|
236
vim/init.vim
Normal file
236
vim/init.vim
Normal file
@ -0,0 +1,236 @@
|
||||
" Specify a directory for plugins
|
||||
call plug#begin('~/.vim/plugged')
|
||||
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'scrooloose/nerdtree'
|
||||
"Plug 'tsony-tsonev/nerdtree-git-plugin'
|
||||
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'ctrlpvim/ctrlp.vim' " fuzzy find files
|
||||
Plug 'scrooloose/nerdcommenter'
|
||||
"Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
|
||||
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
|
||||
Plug 'morhetz/gruvbox'
|
||||
|
||||
Plug 'HerringtonDarkholme/yats.vim' " TS Syntax
|
||||
|
||||
" Initialize plugin system
|
||||
call plug#end()
|
||||
let mapleader = ","
|
||||
|
||||
inoremap jk <ESC>
|
||||
nmap <C-n> :NERDTreeToggle<CR>
|
||||
vmap ++ <plug>NERDCommenterToggle
|
||||
nmap ++ <plug>NERDCommenterToggle
|
||||
nnoremap <esc> :noh<return><esc>
|
||||
|
||||
|
||||
" open NERDTree automatically
|
||||
"autocmd StdinReadPre * let s:std_in=1
|
||||
"autocmd VimEnter * NERDTree
|
||||
|
||||
let g:NERDTreeGitStatusWithFlags = 1
|
||||
"let g:WebDevIconsUnicodeDecorateFolderNodes = 1
|
||||
"let g:NERDTreeGitStatusNodeColorization = 1
|
||||
"let g:NERDTreeColorMapCustom = {
|
||||
"\ "Staged" : "#0ee375",
|
||||
"\ "Modified" : "#d9bf91",
|
||||
"\ "Renamed" : "#51C9FC",
|
||||
"\ "Untracked" : "#FCE77C",
|
||||
"\ "Unmerged" : "#FC51E6",
|
||||
"\ "Dirty" : "#FFBD61",
|
||||
"\ "Clean" : "#87939A",
|
||||
"\ "Ignored" : "#808080"
|
||||
"\ }
|
||||
|
||||
|
||||
let g:NERDTreeIgnore = ['^node_modules$']
|
||||
|
||||
" vim-prettier
|
||||
"let g:prettier#quickfix_enabled = 0
|
||||
"let g:prettier#quickfix_auto_focus = 0
|
||||
" prettier command for coc
|
||||
command! -nargs=0 Prettier :CocCommand prettier.formatFile
|
||||
" run prettier on save
|
||||
"let g:prettier#autoformat = 0
|
||||
"autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync
|
||||
|
||||
|
||||
" ctrlp
|
||||
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
|
||||
|
||||
" j/k will move virtual lines (lines that wrap)
|
||||
noremap <silent> <expr> j (v:count == 0 ? 'gj' : 'j')
|
||||
noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k')
|
||||
|
||||
set number
|
||||
set relativenumber
|
||||
|
||||
set hlsearch
|
||||
set incsearch
|
||||
set wrapscan
|
||||
set scrolloff=999
|
||||
set smartcase
|
||||
|
||||
set smarttab
|
||||
set cindent
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
" always uses spaces instead of tab characters
|
||||
set expandtab
|
||||
|
||||
colorscheme gruvbox
|
||||
set background=dark
|
||||
let g:gruvbox_contrast_dark = 'medium'
|
||||
|
||||
" sync open file with NERDTree
|
||||
" " Check if NERDTree is open or active
|
||||
function! IsNERDTreeOpen()
|
||||
return exists("t:NERDTreeBufName") && (bufwinnr(t:NERDTreeBufName) != -1)
|
||||
endfunction
|
||||
|
||||
" Call NERDTreeFind iff NERDTree is active, current window contains a modifiable
|
||||
" file, and we're not in vimdiff
|
||||
function! SyncTree()
|
||||
if &modifiable && IsNERDTreeOpen() && strlen(expand('%')) > 0 && !&diff
|
||||
NERDTreeFind
|
||||
wincmd p
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Highlight currently open buffer in NERDTree
|
||||
autocmd BufEnter * call SyncTree()
|
||||
|
||||
" coc config
|
||||
let g:coc_global_extensions = [
|
||||
\ 'coc-snippets',
|
||||
\ 'coc-pairs',
|
||||
\ 'coc-tsserver',
|
||||
\ 'coc-eslint',
|
||||
\ 'coc-prettier',
|
||||
\ 'coc-json',
|
||||
\ ]
|
||||
" from readme
|
||||
" if hidden is not set, TextEdit might fail.
|
||||
set hidden " Some servers have issues with backup files, see #649 set nobackup set nowritebackup " Better display for messages set cmdheight=2 " You will have bad experience for diagnostic messages when it's default 4000.
|
||||
set updatetime=300
|
||||
|
||||
" don't give |ins-completion-menu| messages.
|
||||
set shortmess+=c
|
||||
|
||||
" always show signcolumns
|
||||
set signcolumn=yes
|
||||
|
||||
" Use tab for trigger completion with characters ahead and navigate.
|
||||
" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
" Use <c-space> to trigger completion.
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
|
||||
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
|
||||
" Coc only does snippet and additional edit on confirm.
|
||||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
" Or use `complete_info` if your vim support it, like:
|
||||
" inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
|
||||
" Use `[g` and `]g` to navigate diagnostics
|
||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
||||
|
||||
" Remap keys for gotos
|
||||
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)
|
||||
|
||||
" Use K to show documentation in preview window
|
||||
nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||||
|
||||
function! s:show_documentation()
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
else
|
||||
call CocAction('doHover')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Highlight symbol under cursor on CursorHold
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
|
||||
" Remap for rename current word
|
||||
nmap <F2> <Plug>(coc-rename)
|
||||
|
||||
" Remap for format selected region
|
||||
xmap <leader>f <Plug>(coc-format-selected)
|
||||
nmap <leader>f <Plug>(coc-format-selected)
|
||||
|
||||
augroup mygroup
|
||||
autocmd!
|
||||
" Setup formatexpr specified filetype(s).
|
||||
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
|
||||
" Update signature help on jump placeholder
|
||||
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
augroup end
|
||||
|
||||
" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph
|
||||
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
|
||||
" Remap for do codeAction of current line
|
||||
nmap <leader>ac <Plug>(coc-codeaction)
|
||||
" Fix autofix problem of current line
|
||||
nmap <leader>qf <Plug>(coc-fix-current)
|
||||
|
||||
" Create mappings for function text object, requires document symbols feature of languageserver.
|
||||
xmap if <Plug>(coc-funcobj-i)
|
||||
xmap af <Plug>(coc-funcobj-a)
|
||||
omap if <Plug>(coc-funcobj-i)
|
||||
omap af <Plug>(coc-funcobj-a)
|
||||
|
||||
" Use <C-d> for select selections ranges, needs server support, like: coc-tsserver, coc-python
|
||||
nmap <silent> <C-d> <Plug>(coc-range-select)
|
||||
xmap <silent> <C-d> <Plug>(coc-range-select)
|
||||
|
||||
" Use `:Format` to format current buffer
|
||||
command! -nargs=0 Format :call CocAction('format')
|
||||
|
||||
" Use `:Fold` to fold current buffer
|
||||
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
||||
|
||||
" use `:OR` for organize import of current buffer
|
||||
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
|
||||
|
||||
" Add status line support, for integration with other plugin, checkout `:h coc-status`
|
||||
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
|
||||
|
||||
" Using CocList
|
||||
" Show all diagnostics
|
||||
nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr>
|
||||
" Manage extensions
|
||||
nnoremap <silent> <space>e :<C-u>CocList extensions<cr>
|
||||
" Show commands
|
||||
nnoremap <silent> <space>c :<C-u>CocList commands<cr>
|
||||
" Find symbol of current document
|
||||
nnoremap <silent> <space>o :<C-u>CocList outline<cr>
|
||||
" Search workspace symbols
|
||||
nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
|
||||
" Do default action for next item.
|
||||
nnoremap <silent> <space>j :<C-u>CocNext<CR>
|
||||
" Do default action for previous item.
|
||||
nnoremap <silent> <space>k :<C-u>CocPrev<CR>
|
||||
" Resume latest coc list
|
||||
nnoremap <silent> <space>p :<C-u>CocListResume<CR>
|
3
vim/init.vim.new
Normal file
3
vim/init.vim.new
Normal file
@ -0,0 +1,3 @@
|
||||
set runtimepath^=/.vim runtimepath+=~/.vim/after
|
||||
let &packpath = &runtimepath
|
||||
source ~/.vimrc
|
Loading…
Reference in New Issue
Block a user