2022-03-05 11:35:05 +00:00
|
|
|
let $CONFIG = stdpath('config')
|
|
|
|
let $SCR_PLUGINS = $CONFIG . '/lua/plugins.lua'
|
|
|
|
let $SCR_INIT = $CONFIG . '/init.vim'
|
|
|
|
|
|
|
|
if has('win32')
|
|
|
|
source $VIMRUNTIME/mswin.vim
|
|
|
|
endif
|
|
|
|
|
|
|
|
set termguicolors
|
|
|
|
|
|
|
|
lua require('plugins')
|
|
|
|
|
|
|
|
filetype plugin indent on
|
|
|
|
set tabstop=2 softtabstop=0 shiftwidth=2 expandtab smarttab autoindent
|
|
|
|
set incsearch ignorecase smartcase hlsearch
|
|
|
|
set wildmode=longest,list,full wildmenu
|
|
|
|
set ruler laststatus=2 showcmd showmode
|
|
|
|
" set list listchars=trail:
|
|
|
|
set fillchars+=vert:\
|
|
|
|
set wrap breakindent
|
|
|
|
set encoding=utf-8
|
|
|
|
set textwidth=0
|
|
|
|
set hidden
|
|
|
|
set number
|
|
|
|
set title
|
|
|
|
|
|
|
|
set mouse=a
|
|
|
|
set cursorline
|
|
|
|
set updatetime=300
|
|
|
|
set emoji
|
|
|
|
set noshowcmd
|
|
|
|
set noshowmode
|
|
|
|
|
|
|
|
syntax on
|
|
|
|
|
|
|
|
nnoremap <silent>]b :BufferLineCycleNext<CR>
|
|
|
|
nnoremap <silent>[b :BufferLineCyclePrev<CR>
|
|
|
|
nnoremap <silent><leader>bp :BufferLinePick<CR>
|
|
|
|
nnoremap <silent><leader>bcc :BufferLinePickClose<CR>
|
|
|
|
nnoremap <silent><leader>bcl :BufferLineCloseLeft<CR>
|
|
|
|
nnoremap <silent><leader>bcr :BufferLineCloseRight<CR>
|
|
|
|
|
|
|
|
augroup packer_user_config
|
|
|
|
autocmd!
|
|
|
|
autocmd BufWritePost $SCR_PLUGINS source <afile> | PackerCompile
|
|
|
|
augroup end
|
|
|
|
|
|
|
|
augroup init_refresh
|
|
|
|
autocmd!
|
|
|
|
autocmd BufWritePost $SCR_INIT source <afile>
|
|
|
|
augroup end
|
|
|
|
|
|
|
|
augroup telescope
|
|
|
|
autocmd!
|
|
|
|
autocmd QuickFixCmdPost qf :Telescope quickfix<CR>
|
|
|
|
augroup end
|
|
|
|
|
|
|
|
if exists('g:fvim_loaded')
|
|
|
|
nnoremap <silent> <C-ScrollWheelUp> :set guifont=+<CR>
|
|
|
|
nnoremap <silent> <C-ScrollWheelDown> :set guifont=-<CR>
|
|
|
|
|
|
|
|
FVimCursorSmoothMove v:true
|
|
|
|
FVimCursorSmoothBlink v:true
|
|
|
|
|
|
|
|
FVimBackgroundComposition 'transparent'
|
|
|
|
FVimBackgroundOpacity 0.90
|
|
|
|
FVimBackgroundAltOpacity 0.85
|
|
|
|
FVimCustomTitleBar v:false
|
|
|
|
|
|
|
|
FVimFontLigature v:true
|
|
|
|
|
|
|
|
set guifont=JetBrains\ Mono:h12.5
|
|
|
|
endif
|
|
|
|
|
|
|
|
nnoremap <leader><leader> :NvimTreeToggle<CR>
|
|
|
|
|
|
|
|
let g:scrollview_current_only = 1
|
|
|
|
|
|
|
|
nnoremap <leader>vv <cmd>e $SCR_INIT<CR>
|
|
|
|
nnoremap <leader>vp <cmd>e $SCR_PLUGINS<CR>
|
|
|
|
|
|
|
|
" Telescope binds
|
|
|
|
nnoremap <leader>F <cmd>Telescope resume<cr>
|
|
|
|
nnoremap <leader>fr <cmd>Telescope resume<cr>
|
|
|
|
nnoremap <leader>ff <cmd>Telescope find_files<cr>
|
|
|
|
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
|
|
|
|
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
|
|
|
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
|
|
|
|
nnoremap <leader>fq <cmd>Telescope quickfix<cr>
|
|
|
|
nnoremap <leader>fc <cmd>Telescope command_history<cr>
|
|
|
|
nnoremap <leader>fs <cmd>Telescope search_history<cr>
|
|
|
|
|
|
|
|
command CDC cd %:p:h
|
|
|
|
|
|
|
|
let g:lt_location_list_toggle_map = '<leader>l'
|
|
|
|
let g:lt_quickfix_list_toggle_map = '<leader>q'
|
|
|
|
|
|
|
|
" machine-specific settings
|
|
|
|
source $CONFIG/local.vim
|