rm vimscript conf
This commit is contained in:
parent
78cefbb297
commit
1f312e662c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,18 +0,0 @@
|
||||||
" auto-install vim-plug
|
|
||||||
if empty(glob('~/.config/nvim/autoload/plug.vim'))
|
|
||||||
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
|
|
||||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
||||||
"autocmd VimEnter * PlugInstall
|
|
||||||
"autocmd VimEnter * PlugInstall | source $MYVIMRC
|
|
||||||
endif
|
|
||||||
|
|
||||||
call plug#begin('~/.config/nvim/autoload/plugged')
|
|
||||||
|
|
||||||
" Better Syntax Support
|
|
||||||
Plug 'sheerun/vim-polyglot'
|
|
||||||
" File Explorer
|
|
||||||
Plug 'scrooloose/NERDTree'
|
|
||||||
" Auto pairs for '(' '[' '{'
|
|
||||||
Plug 'jiangmiao/auto-pairs'
|
|
||||||
|
|
||||||
call plug#end()
|
|
|
@ -1,25 +0,0 @@
|
||||||
{
|
|
||||||
"languageserver": {
|
|
||||||
"ccls": {
|
|
||||||
"command": "ccls",
|
|
||||||
"filetypes": ["c", "cpp", "objc", "objcpp"],
|
|
||||||
"rootPatterns": [
|
|
||||||
".ccls",
|
|
||||||
"compile_commands.json",
|
|
||||||
".vim/",
|
|
||||||
".git/",
|
|
||||||
".hg/"
|
|
||||||
],
|
|
||||||
"initializationOptions": {
|
|
||||||
"cache": {
|
|
||||||
"directory": "/tmp/ccls"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"coc.preferences.diagnostic.virtualText": true,
|
|
||||||
"clangd.path": "/home/sid/.config/coc/extensions/coc-clangd-data/install/11.0.0/clangd_11.0.0/bin/clangd"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,113 +0,0 @@
|
||||||
" 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>"
|
|
||||||
|
|
||||||
" Use `[c` and `]c` to navigate diagnostics
|
|
||||||
nmap <silent> [c <Plug>(coc-diagnostic-prev)
|
|
||||||
nmap <silent> ]c <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 <leader>rn <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)
|
|
||||||
|
|
||||||
" Use <tab> for select selections ranges, needs server support, like: coc-tsserver, coc-python
|
|
||||||
nmap <silent> <TAB> <Plug>(coc-range-select)
|
|
||||||
xmap <silent> <TAB> <Plug>(coc-range-select)
|
|
||||||
xmap <silent> <S-TAB> <Plug>(coc-range-select-backword)
|
|
||||||
|
|
||||||
" 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>
|
|
||||||
|
|
||||||
set clipboard+=unnamedplus
|
|
||||||
|
|
||||||
function! GetHighlightGroup()
|
|
||||||
let l:s = synID(line('.'), col('.'), 1)
|
|
||||||
echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
nnoremap gA :call GetHighlightGroup()<CR>
|
|
||||||
|
|
||||||
set fillchars=eob:\
|
|
|
@ -1,19 +0,0 @@
|
||||||
let g:AutoPairsFlyMode = 1
|
|
||||||
let g:rainbow_active = 1
|
|
||||||
let g:cpp_class_scope_highlight = 1
|
|
||||||
let g:cpp_member_variable_highlight = 1
|
|
||||||
let g:cpp_class_decl_highlight = 1
|
|
||||||
let g:cpp_posix_standard = 1
|
|
||||||
let g:cpp_experimental_template_highlight = 1
|
|
||||||
let g:cpp_no_function_highlight = 1
|
|
||||||
let g:cpp_no_function_highlight = 1
|
|
||||||
let g:cpp_simple_highlight = 1
|
|
||||||
|
|
||||||
" format settings for clang
|
|
||||||
|
|
||||||
let g:clang_format#style_options = {
|
|
||||||
\ "AccessModifierOffset" : -4,
|
|
||||||
\ "AllowShortIfStatementsOnASingleLine" : "true",
|
|
||||||
\ "AlwaysBreakTemplateDeclarations" : "true",
|
|
||||||
\ "Standard" : "C++11",
|
|
||||||
\ "BreakBeforeBraces" : "Stroustrup"}
|
|
|
@ -1,32 +0,0 @@
|
||||||
lua << EOF
|
|
||||||
|
|
||||||
require('gitsigns').setup {
|
|
||||||
signs = {
|
|
||||||
add = {hl = 'DiffAdd' , text = '▌', numhl='GitSignsAddNr'},
|
|
||||||
change = {hl = 'DiffChange', text = '▌', numhl='GitSignsChangeNr'},
|
|
||||||
delete = {hl = 'DiffDelete', text = '_', numhl='GitSignsDeleteNr'},
|
|
||||||
topdelete = {hl = 'DiffDelete', text = '‾', numhl='GitSignsDeleteNr'},
|
|
||||||
changedelete = {hl = 'DiffChange', text = '~', numhl='GitSignsChangeNr'},
|
|
||||||
},
|
|
||||||
numhl = false,
|
|
||||||
keymaps = {
|
|
||||||
-- Default keymap options
|
|
||||||
noremap = true,
|
|
||||||
buffer = true,
|
|
||||||
|
|
||||||
['n ]c'] = { expr = true, "&diff ? ']c' : '<cmd>lua require\"gitsigns\".next_hunk()<CR>'"},
|
|
||||||
['n [c'] = { expr = true, "&diff ? '[c' : '<cmd>lua require\"gitsigns\".prev_hunk()<CR>'"},
|
|
||||||
|
|
||||||
['n <leader>hs'] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
|
|
||||||
['n <leader>hu'] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
|
|
||||||
['n <leader>hr'] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
|
|
||||||
['n <leader>hp'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
|
|
||||||
['n <leader>hb'] = '<cmd>lua require"gitsigns".blame_line()<CR>',
|
|
||||||
},
|
|
||||||
watch_index = {
|
|
||||||
interval = 100
|
|
||||||
},
|
|
||||||
sign_priority = 5,
|
|
||||||
status_formatter = nil, -- Use default
|
|
||||||
}
|
|
||||||
EOF
|
|
|
@ -1,19 +0,0 @@
|
||||||
" new tab and switching between em
|
|
||||||
|
|
||||||
nnoremap <c-e> : tabnew<CR>
|
|
||||||
nnoremap <c-w> : tabp <CR>
|
|
||||||
nnoremap <c-u> : tabn <CR>
|
|
||||||
|
|
||||||
"nnoremap <silent> <C-m> :%!astyle<CR>
|
|
||||||
nnoremap <silent> <C-a> :%y+<CR>
|
|
||||||
|
|
||||||
map <C-k> <C-w>k
|
|
||||||
map <C-j> <C-w>j
|
|
||||||
map <C-l> <C-w>l
|
|
||||||
map <C-h> <C-w>h
|
|
||||||
|
|
||||||
|
|
||||||
nnoremap ,<space> :Neoformat <CR>
|
|
||||||
nnoremap .<space> :Telescope<CR>
|
|
||||||
|
|
||||||
inoremap kk <ESC>
|
|
|
@ -1,53 +0,0 @@
|
||||||
" open new split panes to right and below
|
|
||||||
set splitright
|
|
||||||
set splitbelow
|
|
||||||
" turn terminal to normal mode with escape
|
|
||||||
tnoremap <Esc> <C-\><C-n>
|
|
||||||
" start terminal in insert mode
|
|
||||||
au BufEnter * if &buftype == 'terminal' | :startinsert | endif
|
|
||||||
|
|
||||||
" open terminal on the bottom
|
|
||||||
function! OpenTerminal()
|
|
||||||
split term://bash
|
|
||||||
resize 10
|
|
||||||
endfunction
|
|
||||||
nnoremap <c-x> :call OpenTerminal()<CR>
|
|
||||||
nnoremap <c-b> :vnew term://bash<CR>
|
|
||||||
|
|
||||||
set updatetime=250 "for gitsigns"
|
|
||||||
let g:tagalong_verbose = 1
|
|
||||||
|
|
||||||
set showtabline=0 " Show tabline
|
|
||||||
set guioptions-=e " Don't use GUI tabline
|
|
||||||
set mouse=a
|
|
||||||
|
|
||||||
" 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=1
|
|
||||||
|
|
||||||
" don't give |ins-completion-menu| messages.
|
|
||||||
set shortmess+=c
|
|
||||||
|
|
||||||
" always show signcolumns
|
|
||||||
set signcolumn=yes
|
|
||||||
|
|
||||||
"hi CustomExplorerBg guibg=#22262C
|
|
||||||
|
|
||||||
"augroup NvimTree
|
|
||||||
" au!
|
|
||||||
" au FileType NvimTree setlocal winhighlight=Normal:CustomExplorerBg
|
|
||||||
"augroup END
|
|
||||||
|
|
||||||
let g:auto_save = 1
|
|
||||||
|
|
||||||
let mapleader = "b"
|
|
||||||
|
|
||||||
set ignorecase
|
|
||||||
set noswapfile
|
|
||||||
set title
|
|
|
@ -1,148 +0,0 @@
|
||||||
let g:nvim_tree_side = 'left' "left by default
|
|
||||||
let g:nvim_tree_width = 24 "30 by default
|
|
||||||
let g:nvim_tree_ignore = [ '.git', 'node_modules', '.cache' ] "empty by default
|
|
||||||
let g:nvim_tree_auto_open = 0 "0 by default, opens the tree when typing `vim $DIR` or `vim`
|
|
||||||
let g:nvim_tree_auto_close = 0 "0 by default, closes the tree when it's the last window
|
|
||||||
let g:nvim_tree_quit_on_open = 0 "0 by default, closes the tree when you open a file
|
|
||||||
let g:nvim_tree_follow = 1 "0 by default, this option allows the cursor to be updated when entering a buffer
|
|
||||||
let g:nvim_tree_indent_markers = 1 "0 by default, this option shows indent markers when folders are open
|
|
||||||
let g:nvim_tree_hide_dotfiles = 1 "0 by default, this option hides files and folders starting with a dot `.`
|
|
||||||
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_root_folder_modifier = ':~' "This is the default. See :help filename-modifiers for more options
|
|
||||||
let g:nvim_tree_tab_open = 1 "0 by default, will open the tree when entering a new tab and the tree was previously open
|
|
||||||
let g:nvim_tree_allow_resize = 1 "0 by default, will not resize the tree when opening a file
|
|
||||||
let g:nvim_tree_show_icons = {
|
|
||||||
\ 'git': 1,
|
|
||||||
\ 'folders': 1,
|
|
||||||
\ 'files': 1,
|
|
||||||
\ }
|
|
||||||
|
|
||||||
" 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': "★"
|
|
||||||
\ },
|
|
||||||
\ 'folder': {
|
|
||||||
\ 'default': "",
|
|
||||||
\ 'open': "",
|
|
||||||
\ 'symlink': "",
|
|
||||||
\ }
|
|
||||||
\ }
|
|
||||||
|
|
||||||
"hi LuaTreeIndentMarker guifg=#C8CCD4
|
|
||||||
nnoremap <C-n> :NvimTreeToggle<CR>
|
|
||||||
nnoremap <leader>r :LuaTreeRefresh<CR>
|
|
||||||
nnoremap <leader>n :LuaTreeFindFile<CR>
|
|
||||||
" LuaTreeOpen and LuaTreeClose are also available if you need them
|
|
||||||
|
|
||||||
" a list of groups can be found at `:help nvim_tree_highlight`
|
|
||||||
highlight NvimTreeFolderIcon guifg= #61afef
|
|
||||||
highlight NvimTreeFolderName guifg = #61afef
|
|
||||||
|
|
||||||
|
|
||||||
lua << EOF
|
|
||||||
local get_lua_cb = function (cb_name)
|
|
||||||
return string.format(":lua require'nvim-tree'.on_keypress('%s')<CR>", cb_name)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Mappings for nvimtree
|
|
||||||
vim.g.nvim_tree_bindings = {
|
|
||||||
["<CR>"] = get_lua_cb("edit"),
|
|
||||||
["o"] = get_lua_cb("edit"),
|
|
||||||
["<2-LeftMouse>"] = get_lua_cb("edit"),
|
|
||||||
["<2-RightMouse>"] = get_lua_cb("cd"),
|
|
||||||
["<C-]>"] = get_lua_cb("cd"),
|
|
||||||
["<C-v>"] = get_lua_cb("vsplit"),
|
|
||||||
["<C-x>"] = get_lua_cb("split"),
|
|
||||||
["<C-t>"] = get_lua_cb("tabnew"),
|
|
||||||
["<BS>"] = get_lua_cb("close_node"),
|
|
||||||
["<S-CR>"] = get_lua_cb("close_node"),
|
|
||||||
["<Tab>"] = get_lua_cb("preview"),
|
|
||||||
["I"] = get_lua_cb("toggle_ignored"),
|
|
||||||
["H"] = get_lua_cb("toggle_dotfiles"),
|
|
||||||
["R"] = get_lua_cb("refresh"),
|
|
||||||
["a"] = get_lua_cb("create"),
|
|
||||||
["d"] = get_lua_cb("remove"),
|
|
||||||
["r"] = get_lua_cb("rename"),
|
|
||||||
["<C-r>"] = get_lua_cb("full_rename"),
|
|
||||||
["x"] = get_lua_cb("cut"),
|
|
||||||
["c"] = get_lua_cb("copy"),
|
|
||||||
["p"] = get_lua_cb("paste"),
|
|
||||||
["[c"] = get_lua_cb("prev_git_item"),
|
|
||||||
["]c"] = get_lua_cb("next_git_item"),
|
|
||||||
["-"] = get_lua_cb("dir_up"),
|
|
||||||
["q"] = get_lua_cb("close"),
|
|
||||||
}
|
|
||||||
|
|
||||||
require'nvim-web-devicons'.setup {
|
|
||||||
-- your personnal icons can go here (to override)
|
|
||||||
-- DevIcon will be appended to `name`
|
|
||||||
override = {
|
|
||||||
html = {
|
|
||||||
icon = "",
|
|
||||||
color = "#DE8C92",
|
|
||||||
name = "html"
|
|
||||||
},
|
|
||||||
css = {
|
|
||||||
icon = "",
|
|
||||||
color = "#61afef",
|
|
||||||
name = "css"
|
|
||||||
},
|
|
||||||
js = {
|
|
||||||
icon = "",
|
|
||||||
color = "#EBCB8B",
|
|
||||||
name = "js"
|
|
||||||
},
|
|
||||||
png = {
|
|
||||||
icon = " ",
|
|
||||||
color = "#BD77DC",
|
|
||||||
name = "png"
|
|
||||||
},
|
|
||||||
jpg = {
|
|
||||||
icon = " ",
|
|
||||||
color = "#BD77DC",
|
|
||||||
name = "jpg"
|
|
||||||
},
|
|
||||||
jpeg = {
|
|
||||||
icon = " ",
|
|
||||||
color = "#BD77DC",
|
|
||||||
name = "jpeg"
|
|
||||||
},
|
|
||||||
mp3 = {
|
|
||||||
icon = "",
|
|
||||||
color = "#C8CCD4",
|
|
||||||
name = "mp3"
|
|
||||||
},
|
|
||||||
mp4 = {
|
|
||||||
icon = "",
|
|
||||||
color = "#C8CCD4",
|
|
||||||
name = "mp4"
|
|
||||||
},
|
|
||||||
out = {
|
|
||||||
icon = "",
|
|
||||||
color = "#C8CCD4",
|
|
||||||
name = "out"
|
|
||||||
},
|
|
||||||
toml = {
|
|
||||||
icon = "",
|
|
||||||
color = "#61afef",
|
|
||||||
name = "toml"
|
|
||||||
},
|
|
||||||
lock = {
|
|
||||||
icon = "",
|
|
||||||
color = "#DE6B74",
|
|
||||||
name = "lock"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
-- globally enable default icons (default to false)
|
|
||||||
-- will get overriden by `get_icons` option
|
|
||||||
default = true;
|
|
||||||
}
|
|
||||||
EOF
|
|
|
@ -1,24 +0,0 @@
|
||||||
call plug#begin('~/.local/share/nvim/site/plugged')
|
|
||||||
Plug 'nvim-lua/plenary.nvim'
|
|
||||||
Plug 'lewis6991/gitsigns.nvim'
|
|
||||||
Plug 'sbdchd/neoformat'
|
|
||||||
Plug 'glepnir/galaxyline.nvim'
|
|
||||||
Plug 'akinsho/nvim-bufferline.lua'
|
|
||||||
Plug '907th/vim-auto-save'
|
|
||||||
Plug 'michalliu/jsruntime.vim'
|
|
||||||
Plug 'kyazdani42/nvim-tree.lua'
|
|
||||||
Plug 'kyazdani42/nvim-web-devicons'
|
|
||||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
|
||||||
Plug 'chriskempson/base16-vim'
|
|
||||||
Plug 'norcalli/nvim-colorizer.lua'
|
|
||||||
Plug 'jiangmiao/auto-pairs'
|
|
||||||
Plug 'alvan/vim-closetag'
|
|
||||||
Plug 'bfrg/vim-cpp-modern'
|
|
||||||
Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}}
|
|
||||||
Plug 'Yggdroot/indentLine'
|
|
||||||
Plug 'ryanoasis/vim-devicons'
|
|
||||||
Plug 'tpope/vim-surround'
|
|
||||||
Plug 'nvim-lua/popup.nvim'
|
|
||||||
Plug 'nvim-telescope/telescope.nvim'
|
|
||||||
Plug 'nvim-telescope/telescope-media-files.nvim'
|
|
||||||
call plug#end()
|
|
|
@ -1,16 +0,0 @@
|
||||||
" 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)
|
|
||||||
|
|
||||||
" 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
|
|
|
@ -1,193 +0,0 @@
|
||||||
lua << EOF
|
|
||||||
local gl = require('galaxyline')
|
|
||||||
local gls = gl.section
|
|
||||||
gl.short_line_list = {'LuaTree','vista','dbui'}
|
|
||||||
|
|
||||||
local colors = {
|
|
||||||
bg = '#282c34',
|
|
||||||
line_bg = '#282c34',
|
|
||||||
fg = '#D8DEE9',
|
|
||||||
fg_green = '#65a380',
|
|
||||||
yellow = '#A3BE8C',
|
|
||||||
cyan = '#22262C',
|
|
||||||
darkblue = '#61afef',
|
|
||||||
green = '#BBE67E',
|
|
||||||
orange = '#FF8800',
|
|
||||||
purple = '#252930',
|
|
||||||
magenta = '#c678dd',
|
|
||||||
blue = '#22262C';
|
|
||||||
red = '#DF8890',
|
|
||||||
lightbg = '#3C4048',
|
|
||||||
nord = '#81A1C1',
|
|
||||||
greenYel = '#EBCB8B'
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[1] = {
|
|
||||||
leftRounded = {
|
|
||||||
provider = function() return '' end,
|
|
||||||
highlight = { colors.red, colors.bg }
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[2] = {
|
|
||||||
ViMode = {
|
|
||||||
provider = function()
|
|
||||||
return ' '
|
|
||||||
end,
|
|
||||||
highlight = {colors.bg,colors.red},
|
|
||||||
separator = ' ',
|
|
||||||
separator_highlight = {colors.lightbg,colors.lightbg},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[3] ={
|
|
||||||
FileIcon = {
|
|
||||||
provider = 'FileIcon',
|
|
||||||
condition = buffer_not_empty,
|
|
||||||
highlight = {require('galaxyline.provider_fileinfo').get_file_icon_color,colors.lightbg},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[4] = {
|
|
||||||
FileName = {
|
|
||||||
provider = {'FileName','FileSize'},
|
|
||||||
condition = buffer_not_empty,
|
|
||||||
highlight = {colors.fg,colors.lightbg}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[5] = {
|
|
||||||
teech = {
|
|
||||||
provider = function() return '' end,
|
|
||||||
separator = ' ',
|
|
||||||
highlight = { colors.lightbg, colors.bg }
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local checkwidth = function()
|
|
||||||
local squeeze_width = vim.fn.winwidth(0) / 2
|
|
||||||
if squeeze_width > 40 then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
gls.left[6] = {
|
|
||||||
DiffAdd = {
|
|
||||||
provider = 'DiffAdd',
|
|
||||||
condition = checkwidth,
|
|
||||||
icon = ' ',
|
|
||||||
highlight = {colors.greenYel,colors.line_bg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[7] = {
|
|
||||||
DiffModified = {
|
|
||||||
provider = 'DiffModified',
|
|
||||||
condition = checkwidth,
|
|
||||||
icon = ' ',
|
|
||||||
highlight = {colors.orange,colors.line_bg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[8] = {
|
|
||||||
DiffRemove = {
|
|
||||||
provider = 'DiffRemove',
|
|
||||||
condition = checkwidth,
|
|
||||||
icon = ' ',
|
|
||||||
highlight = {colors.red,colors.line_bg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[9] = {
|
|
||||||
LeftEnd = {
|
|
||||||
provider = function() return ' ' end,
|
|
||||||
separator = ' ',
|
|
||||||
separator_highlight = {colors.line_bg,colors.line_bg},
|
|
||||||
highlight = {colors.line_bg,colors.line_bg}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[10] = {
|
|
||||||
DiagnosticError = {
|
|
||||||
provider = 'DiagnosticError',
|
|
||||||
icon = ' ',
|
|
||||||
highlight = {colors.red,colors.bg}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[11] = {
|
|
||||||
Space = {
|
|
||||||
provider = function () return ' ' end,
|
|
||||||
highlight = {colors.line_bg,colors.line_bg}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[12] = {
|
|
||||||
DiagnosticWarn = {
|
|
||||||
provider = 'DiagnosticWarn',
|
|
||||||
icon = ' ',
|
|
||||||
highlight = {colors.blue,colors.bg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.right[1] = {
|
|
||||||
GitIcon = {
|
|
||||||
provider = function() return ' ' end,
|
|
||||||
condition = require('galaxyline.provider_vcs').check_git_workspace,
|
|
||||||
highlight = {colors.green,colors.line_bg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.right[2] = {
|
|
||||||
GitBranch = {
|
|
||||||
provider = 'GitBranch',
|
|
||||||
condition = require('galaxyline.provider_vcs').check_git_workspace,
|
|
||||||
highlight = {colors.green,colors.line_bg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.right[3] = {
|
|
||||||
right_LeftRounded = {
|
|
||||||
provider = function() return '' end,
|
|
||||||
separator = ' ',
|
|
||||||
separator_highlight = {colors.bg,colors.bg},
|
|
||||||
highlight = { colors.nord, colors.bg }
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.right[4] = {
|
|
||||||
SiMode = {
|
|
||||||
provider = function()
|
|
||||||
local alias = {
|
|
||||||
n = 'NORMAL',
|
|
||||||
i = 'INSERT',
|
|
||||||
c = 'COMMAND',
|
|
||||||
V = 'VISUAL',
|
|
||||||
[''] = 'VISUAL',
|
|
||||||
v = 'VISUAL',
|
|
||||||
R = 'REPLACE',
|
|
||||||
}
|
|
||||||
return alias[vim.fn.mode()]
|
|
||||||
end,
|
|
||||||
highlight = { colors.bg, colors.nord },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
gls.right[5] = {
|
|
||||||
PerCent = {
|
|
||||||
provider = 'LinePercent',
|
|
||||||
separator = ' ',
|
|
||||||
separator_highlight = {colors.nord,colors.nord},
|
|
||||||
highlight = {colors.bg,colors.fg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.right[6] = {
|
|
||||||
rightRounded = {
|
|
||||||
provider = function() return '' end,
|
|
||||||
highlight = { colors.fg, colors.bg }
|
|
||||||
},
|
|
||||||
}
|
|
||||||
EOF
|
|
|
@ -1,103 +0,0 @@
|
||||||
" Close buffer
|
|
||||||
nnoremap <silent> <A-c> :BufferClose<CR>
|
|
||||||
" Wipeout buffer
|
|
||||||
" :BufferWipeout<CR>
|
|
||||||
" Close commands
|
|
||||||
" :BufferCloseAllButCurrent<CR>
|
|
||||||
" :BufferCloseBuffersRight<CR>
|
|
||||||
nnoremap mymap :lua require"bufferline".go_to_buffer(num)<CR>
|
|
||||||
|
|
||||||
nnoremap <silent>[b :BufferLineCycleNext<CR>
|
|
||||||
nnoremap <silent>b] :BufferLineCyclePrev<CR>
|
|
||||||
|
|
||||||
nnoremap <silent>[n :BufferLineMoveNext<CR>
|
|
||||||
nnoremap <silent>n] :BufferLineMovePrev<CR>
|
|
||||||
|
|
||||||
lua << EOF
|
|
||||||
|
|
||||||
require'bufferline'.setup{
|
|
||||||
options = {
|
|
||||||
buffer_close_icon= '',
|
|
||||||
modified_icon = '●',
|
|
||||||
close_icon = '',
|
|
||||||
left_trunc_marker = '',
|
|
||||||
right_trunc_marker = '',
|
|
||||||
max_name_length = 14,
|
|
||||||
max_prefix_length = 13,
|
|
||||||
tab_size = 18,
|
|
||||||
enforce_regular_tabs = true ,
|
|
||||||
view = "multiwindow" ,
|
|
||||||
show_buffer_close_icons = true ,
|
|
||||||
separator_style = "thin"
|
|
||||||
},
|
|
||||||
|
|
||||||
highlights = {
|
|
||||||
background = {
|
|
||||||
guifg = comment_fg,
|
|
||||||
guibg = '#282c34'
|
|
||||||
},
|
|
||||||
fill = {
|
|
||||||
guifg = comment_fg,
|
|
||||||
guibg = '#282c34'
|
|
||||||
},
|
|
||||||
buffer_selected = {
|
|
||||||
guifg = normal_fg,
|
|
||||||
guibg = '#3A3E44',
|
|
||||||
gui = "bold"
|
|
||||||
},
|
|
||||||
separator_visible = {
|
|
||||||
guifg = '#282c34' ,
|
|
||||||
guibg = '#282c34'
|
|
||||||
},
|
|
||||||
separator_selected = {
|
|
||||||
guifg = '#282c34' ,
|
|
||||||
guibg = '#282c34'
|
|
||||||
},
|
|
||||||
separator = {
|
|
||||||
guifg = '#282c34' ,
|
|
||||||
guibg = '#282c34'
|
|
||||||
},
|
|
||||||
indicator_selected = {
|
|
||||||
guifg = '#282c34' ,
|
|
||||||
guibg = '#282c34'
|
|
||||||
},
|
|
||||||
modified_selected = {
|
|
||||||
guifg = string_fg,
|
|
||||||
guibg = '#3A3E44'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require('gitsigns').setup {
|
|
||||||
signs = {
|
|
||||||
add = {hl = 'DiffAdd' , text = '▌', numhl='GitSignsAddNr'},
|
|
||||||
change = {hl = 'DiffChange', text = '▌', numhl='GitSignsChangeNr'},
|
|
||||||
delete = {hl = 'DiffDelete', text = '_', numhl='GitSignsDeleteNr'},
|
|
||||||
topdelete = {hl = 'DiffDelete', text = '‾', numhl='GitSignsDeleteNr'},
|
|
||||||
changedelete = {hl = 'DiffChange', text = '~', numhl='GitSignsChangeNr'},
|
|
||||||
},
|
|
||||||
numhl = false,
|
|
||||||
keymaps = {
|
|
||||||
-- Default keymap options
|
|
||||||
noremap = true,
|
|
||||||
buffer = true,
|
|
||||||
|
|
||||||
['n ]c'] = { expr = true, "&diff ? ']c' : '<cmd>lua require\"gitsigns\".next_hunk()<CR>'"},
|
|
||||||
['n [c'] = { expr = true, "&diff ? '[c' : '<cmd>lua require\"gitsigns\".prev_hunk()<CR>'"},
|
|
||||||
|
|
||||||
['n <leader>hs'] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
|
|
||||||
['n <leader>hu'] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
|
|
||||||
['n <leader>hr'] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
|
|
||||||
['n <leader>hp'] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
|
|
||||||
['n <leader>hb'] = '<cmd>lua require"gitsigns".blame_line()<CR>',
|
|
||||||
},
|
|
||||||
watch_index = {
|
|
||||||
interval = 100
|
|
||||||
},
|
|
||||||
sign_priority = 5,
|
|
||||||
status_formatter = nil, -- Use default
|
|
||||||
}
|
|
||||||
|
|
||||||
EOF
|
|
|
@ -1,80 +0,0 @@
|
||||||
lua <<EOF
|
|
||||||
|
|
||||||
require('telescope').setup{
|
|
||||||
|
|
||||||
defaults = {
|
|
||||||
vimgrep_arguments = {
|
|
||||||
'rg',
|
|
||||||
'--color=never',
|
|
||||||
'--no-heading',
|
|
||||||
'--with-filename',
|
|
||||||
'--line-number',
|
|
||||||
'--column',
|
|
||||||
'--smart-case'
|
|
||||||
},
|
|
||||||
prompt_position = "bottom",
|
|
||||||
prompt_prefix = "> ",
|
|
||||||
selection_caret = "> ",
|
|
||||||
entry_prefix = " ",
|
|
||||||
initial_mode = "insert",
|
|
||||||
selection_strategy = "reset",
|
|
||||||
sorting_strategy = "descending",
|
|
||||||
layout_strategy = "horizontal",
|
|
||||||
layout_defaults = {
|
|
||||||
horizontal = {
|
|
||||||
mirror = false,
|
|
||||||
preview_width = 0.5,
|
|
||||||
},
|
|
||||||
vertical = {
|
|
||||||
mirror = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
file_sorter = require'telescope.sorters'.get_fuzzy_file,
|
|
||||||
file_ignore_patterns = {},
|
|
||||||
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
|
|
||||||
shorten_path = true,
|
|
||||||
winblend = 0,
|
|
||||||
width = 0.75,
|
|
||||||
preview_cutoff = 120,
|
|
||||||
results_height = 1,
|
|
||||||
results_width = 0.8,
|
|
||||||
border = {},
|
|
||||||
borderchars = { '─', '│', '─', '│', '╭', '╮', '╯', '╰' },
|
|
||||||
color_devicons = true,
|
|
||||||
use_less = true,
|
|
||||||
set_env = { ['COLORTERM'] = 'truecolor' }, -- default = nil,
|
|
||||||
file_previewer = require'telescope.previewers'.vim_buffer_cat.new,
|
|
||||||
grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new,
|
|
||||||
qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new,
|
|
||||||
|
|
||||||
-- Developer configurations: Not meant for general override
|
|
||||||
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extensions = {
|
|
||||||
media_files = {
|
|
||||||
filetypes = {"png", "webp", "jpg", "jpeg"},
|
|
||||||
find_cmd = "rg" -- find command (defaults to `fd`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
require('telescope').load_extension('media_files')
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
" telescope mappings
|
|
||||||
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
|
|
||||||
"nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
|
|
||||||
nnoremap <leader>fg <cmd>lua require('telescope').extensions.media_files.media_files()<cr>
|
|
||||||
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
|
|
||||||
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
|
|
||||||
|
|
||||||
highlight TelescopeBorder guifg=#3e4451
|
|
||||||
highlight TelescopePromptBorder guifg=#3e4451
|
|
||||||
highlight TelescopeResultsBorder guifg=#3e4451
|
|
||||||
highlight TelescopePreviewBorder guifg=#525865
|
|
|
@ -1,16 +0,0 @@
|
||||||
lua <<EOF
|
|
||||||
local ts_config = require("nvim-treesitter.configs")
|
|
||||||
|
|
||||||
ts_config.setup {
|
|
||||||
ensure_installed = {
|
|
||||||
"javascript","html","css","bash","cpp","rust"
|
|
||||||
},
|
|
||||||
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
use_languagetree = true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
let g:indentLine_enabled = 1
|
|
||||||
let g:indentLine_char_list = ['▏']
|
|
||||||
|
|
||||||
set expandtab sw=2
|
|
||||||
|
|
||||||
norm! gg=G
|
|
||||||
highlight EndOfBuffer ctermfg=black ctermbg=black
|
|
||||||
|
|
||||||
" line nums and its fg
|
|
||||||
highlight VertSplit cterm=NONE
|
|
||||||
set numberwidth =1
|
|
||||||
set number
|
|
||||||
highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
|
|
||||||
|
|
||||||
syntax on
|
|
||||||
syntax enable
|
|
||||||
set termguicolors
|
|
||||||
colorscheme base16-onedark
|
|
||||||
|
|
||||||
highlight! Normal guifg=NONE guibg=NONE
|
|
||||||
|
|
||||||
lua require'colorizer'.setup()
|
|
||||||
|
|
||||||
hi LineNr guibg=NONE
|
|
||||||
hi SignColumn guibg=NONE
|
|
||||||
hi VertSplit guibg=NONE
|
|
||||||
|
|
||||||
highlight DiffAdd guifg=#81A1C1 guibg = none
|
|
||||||
highlight DiffChange guifg =#3A3E44 guibg = none
|
|
||||||
highlight DiffModified guifg = #81A1C1 guibg = none
|
|
|
@ -1,20 +0,0 @@
|
||||||
" ------- run plugins ------
|
|
||||||
source ~/.config/nvim/confs/pluginList.vim
|
|
||||||
|
|
||||||
" ---- keybinds , look of nvim ------
|
|
||||||
source ~/.config/nvim/confs/miscSettings.vim
|
|
||||||
source ~/.config/nvim/confs/keybinds.vim
|
|
||||||
source ~/.config/nvim/confs/ui.vim
|
|
||||||
|
|
||||||
" --- intellisense , linting etc ------
|
|
||||||
source ~/.config/nvim/confs/cpp.vim
|
|
||||||
source ~/.config/nvim/confs/rust.vim
|
|
||||||
source ~/.config/nvim/confs/coc.vim
|
|
||||||
|
|
||||||
" ---- syntax highlighting , file tree , bufferline------
|
|
||||||
source ~/.config/nvim/confs/treesitter.vim
|
|
||||||
source ~/.config/nvim/confs/nvimTree.vim
|
|
||||||
source ~/.config/nvim/confs/tabline.vim
|
|
||||||
source ~/.config/nvim/confs/statusline.vim
|
|
||||||
|
|
||||||
source ~/.config/nvim/confs/telescope.vim
|
|
Loading…
Reference in New Issue