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'
|
2022-07-03 22:01:05 +00:00
|
|
|
let $PORTAGE = '/etc/portage'
|
|
|
|
let $PORTAGE_MAKE_CONFIG = $PORTAGE . '/make.conf'
|
2022-03-05 11:35:05 +00:00
|
|
|
|
|
|
|
if has('win32')
|
|
|
|
source $VIMRUNTIME/mswin.vim
|
2022-06-24 12:06:02 +00:00
|
|
|
else
|
|
|
|
nmap <c-C> "+y
|
|
|
|
vmap <c-C> "+y
|
|
|
|
nmap <c-V> "+p
|
2022-03-05 11:35:05 +00:00
|
|
|
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
|
2022-06-24 12:06:02 +00:00
|
|
|
set list
|
|
|
|
set listchars=tab:➫\ ,trail:░
|
|
|
|
hi EoLSpace ctermbg=238 guibg=#333333
|
|
|
|
match EoLSpace /\s\+$/
|
|
|
|
|
2022-07-03 22:35:02 +00:00
|
|
|
set completeopt=menu,menuone,preview,noinsert
|
2022-07-03 22:01:05 +00:00
|
|
|
|
2022-03-05 11:35:05 +00:00
|
|
|
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
|
|
|
|
|
2022-03-08 09:33:07 +00:00
|
|
|
if exists('g:neovide')
|
|
|
|
" For some reason the scaling is off?
|
|
|
|
set guifont=JetBrains\ Mono:h10.5
|
|
|
|
let g:neovide_transparency = 0.90
|
|
|
|
let g:neovide_refresh_rate = 60
|
|
|
|
let g:neovide_cursor_vfx_mode = "pixiedust"
|
2022-04-22 20:54:00 +00:00
|
|
|
let g:neovide_confirm_quit = v:true
|
2022-03-08 09:33:07 +00:00
|
|
|
endif
|
2022-03-05 11:35:05 +00:00
|
|
|
|
2022-03-08 09:33:07 +00:00
|
|
|
if exists('g:fvim_loaded')
|
|
|
|
set guifont=JetBrains\ Mono:h12.5
|
2022-03-05 11:35:05 +00:00
|
|
|
FVimCursorSmoothMove v:true
|
|
|
|
FVimCursorSmoothBlink v:true
|
|
|
|
|
|
|
|
FVimBackgroundComposition 'transparent'
|
|
|
|
FVimBackgroundOpacity 0.90
|
|
|
|
FVimBackgroundAltOpacity 0.85
|
|
|
|
FVimCustomTitleBar v:false
|
|
|
|
|
|
|
|
FVimFontLigature v:true
|
|
|
|
|
2022-03-08 09:33:07 +00:00
|
|
|
nnoremap <silent> <C-ScrollWheelUp> :set guifont=+<CR>
|
|
|
|
nnoremap <silent> <C-ScrollWheelDown> :set guifont=-<CR>
|
2022-03-05 11:35:05 +00:00
|
|
|
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>
|
2022-07-03 22:01:05 +00:00
|
|
|
nnoremap <leader>ve <cmd>e $PORTAGE<CR>
|
2022-03-05 11:35:05 +00:00
|
|
|
|
|
|
|
" Telescope binds
|
2022-07-18 20:54:10 +00:00
|
|
|
nnoremap <leader>F <cmd>Telescope resume<cr>
|
2022-03-05 11:35:05 +00:00
|
|
|
nnoremap <leader>fr <cmd>Telescope resume<cr>
|
2022-07-18 20:54:10 +00:00
|
|
|
nnoremap <leader>ff <cmd>lua require("telescope.builtin").find_files({hidden=true, no_ignore=true})<cr>
|
2022-03-05 11:35:05 +00:00
|
|
|
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>
|
|
|
|
|
2022-03-09 08:02:50 +00:00
|
|
|
function! StripSuda(p)
|
|
|
|
return substitute(a:p, 'suda://', '', '')
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
function! ChangeCurDir()
|
|
|
|
execute 'cd ' . StripSuda(expand('%:p:h'))
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
command CDC execute "cd " . StripSuda(expand('%:p:h'))
|
2022-03-05 11:35:05 +00:00
|
|
|
|
|
|
|
let g:lt_location_list_toggle_map = '<leader>l'
|
2022-03-08 09:50:04 +00:00
|
|
|
let g:lt_quickfix_list_toggle_map = '<leader>L' " unsure if I'm using this
|
2022-03-05 11:35:05 +00:00
|
|
|
|
|
|
|
" machine-specific settings
|
|
|
|
source $CONFIG/local.vim
|
2022-07-18 20:54:10 +00:00
|
|
|
|
|
|
|
" coq popups
|
|
|
|
" Disable the default popup accept operation.
|
|
|
|
ino <silent><expr> <CR> pumvisible() ? (complete_info().selected > 0 ? "\<C-y>" : "\<C-e><CR>") : "<CR>"
|
|
|
|
ino <silent><expr> <Esc> pumvisible() ? "\<C-e><Esc>" : "\<Esc>"
|
|
|
|
ino <silent><expr> <C-c> pumvisible() ? "\<C-e><C-c>" : "\<C-c>"
|
|
|
|
ino <silent><expr> <BS> pumvisible() ? "\<C-e><BS>" : "\<BS>"
|
|
|
|
" sadly could not figure out how to rebind ctrl-p here?
|
|
|
|
"ino <silent><expr> <C-p> pumvisible() ? (complete_info().selected == -1 ? "\<C-e><C-p>" : "\<C-y>") : "\<C-p>"
|
|
|
|
ino <silent><expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
|
|
|
ino <silent><expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<BS>"
|
|
|
|
|
|
|
|
autocmd QuickFixCmdPost [^l]* cwindow
|
|
|
|
autocmd QuickFixCmdPost l* lwindow
|
|
|
|
nno <silent><F4> :echo "Making..."<CR> :silent make<CR> :echo "done."<CR>
|