2021-10-29 20:31:28 +00:00
|
|
|
syntax enable
|
2020-05-06 14:23:54 +00:00
|
|
|
let mapleader = " "
|
|
|
|
|
|
|
|
call plug#begin('~/.vim/plugged')
|
2022-02-08 21:58:38 +00:00
|
|
|
Plug 'Yggdroot/indentLine'
|
2022-02-02 17:44:27 +00:00
|
|
|
Plug 'rmagatti/auto-session'
|
|
|
|
Plug 'rmagatti/session-lens'
|
2022-01-27 20:24:12 +00:00
|
|
|
Plug 'ludovicchabant/vim-gutentags'
|
2021-11-04 00:38:25 +00:00
|
|
|
Plug 'ervandew/supertab'
|
2021-10-29 20:31:28 +00:00
|
|
|
Plug 'preservim/nerdtree'
|
2021-10-30 00:43:31 +00:00
|
|
|
Plug 'liuchengxu/space-vim-dark'
|
2021-10-29 20:31:28 +00:00
|
|
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
|
|
|
Plug 'junegunn/fzf.vim'
|
|
|
|
Plug 'mhinz/vim-startify'
|
|
|
|
Plug 'jeetsukumaran/vim-buffergator'
|
2021-11-04 00:38:25 +00:00
|
|
|
Plug 'ap/vim-buftabline'
|
2021-10-29 20:31:28 +00:00
|
|
|
Plug 'airblade/vim-gitgutter'
|
2021-11-04 00:38:25 +00:00
|
|
|
Plug 'majutsushi/tagbar'
|
|
|
|
Plug 'vim-airline/vim-airline'
|
|
|
|
Plug 'enricobacis/vim-airline-clock'
|
2021-10-29 21:25:22 +00:00
|
|
|
Plug 'nvim-lua/plenary.nvim'
|
|
|
|
Plug 'nvim-telescope/telescope.nvim'
|
2021-11-10 19:26:55 +00:00
|
|
|
Plug 'thoughtbot/vim-rspec'
|
|
|
|
Plug 'voldikss/vim-floaterm'
|
2021-11-30 19:10:01 +00:00
|
|
|
Plug 'fatih/vim-go'
|
2022-01-27 20:24:12 +00:00
|
|
|
Plug 'folke/which-key.nvim'
|
|
|
|
Plug 'whatyouhide/vim-gotham'
|
|
|
|
Plug 'nanotech/jellybeans.vim'
|
|
|
|
Plug 'sickill/vim-monokai'
|
|
|
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
2022-02-02 20:46:51 +00:00
|
|
|
Plug 'flebel/vim-mypy', { 'for': 'python', 'branch': 'bugfix/fast_parser_is_default_and_only_parser' }
|
2022-02-08 21:58:38 +00:00
|
|
|
Plug 'soywod/himalaya', {'rtp': 'vim'}
|
|
|
|
Plug 'tpope/vim-fugitive'
|
|
|
|
Plug 'tpope/vim-rhubarb'
|
2020-05-06 14:23:54 +00:00
|
|
|
call plug#end()
|
|
|
|
|
2022-01-27 20:24:12 +00:00
|
|
|
lua << EOF
|
|
|
|
require("which-key").setup {
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|
2021-10-29 20:31:28 +00:00
|
|
|
map <C-o> :NERDTreeToggle<CR>
|
2022-01-27 20:24:12 +00:00
|
|
|
map <Leader>v :WhichKey<CR>
|
|
|
|
|
2021-10-29 20:31:28 +00:00
|
|
|
|
2020-05-06 14:23:54 +00:00
|
|
|
set tabstop=2
|
2022-01-27 20:24:12 +00:00
|
|
|
set shell=/bin/zsh
|
2021-10-29 20:31:28 +00:00
|
|
|
set shiftwidth=2
|
|
|
|
set expandtab
|
|
|
|
set hidden
|
|
|
|
set background=dark
|
2021-10-30 00:43:31 +00:00
|
|
|
set autoindent
|
|
|
|
set preserveindent
|
|
|
|
set copyindent
|
|
|
|
|
|
|
|
" Set Colors
|
|
|
|
if (has("termguicolors"))
|
|
|
|
set termguicolors
|
|
|
|
endif
|
|
|
|
colorscheme space-vim-dark
|
|
|
|
hi Comment cterm=italic
|
|
|
|
|
2022-01-27 20:24:12 +00:00
|
|
|
" Relative numbers and when not in buffer set absolute numbers
|
2020-05-06 14:23:54 +00:00
|
|
|
set number relativenumber
|
|
|
|
augroup numbertoggle
|
|
|
|
autocmd!
|
|
|
|
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
|
|
|
|
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
|
|
|
|
augroup END
|
|
|
|
|
2021-10-30 00:43:31 +00:00
|
|
|
" Disable EX Mode
|
|
|
|
map q: <Nop>
|
|
|
|
" Disable EX Mode
|
|
|
|
nnoremap Q <nop>
|
|
|
|
|
2022-01-27 20:24:12 +00:00
|
|
|
nnoremap <C-K> :bnext<CR>
|
|
|
|
nnoremap <C-J> :bprev<CR>
|
2020-05-06 14:23:54 +00:00
|
|
|
nmap <leader>bq :bp <BAR> bd #<CR>
|
|
|
|
|
|
|
|
"Clock
|
|
|
|
let g:airline#extensions#clock#format = '%I:%M:%S %X'
|
2021-10-29 21:25:22 +00:00
|
|
|
|
|
|
|
" Find files using Telescope command-line sugar.
|
|
|
|
nnoremap <leader>ff <cmd>Telescope find_files<cr>
|
|
|
|
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
|
|
|
|
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
2022-01-27 20:24:12 +00:00
|
|
|
nnoremap <leader>fa <cmd>Ag<cr>
|
2021-11-10 19:26:55 +00:00
|
|
|
" nnoremap <leader>ft <cmd>Telescope help_tags<cr>
|
2022-01-27 20:24:12 +00:00
|
|
|
"lua << EOF
|
|
|
|
"require('telescope').setup{
|
|
|
|
" file_ignore_patterns = {"node_modules","./venv/"},
|
|
|
|
"}
|
|
|
|
"EOF
|
2021-10-30 00:43:31 +00:00
|
|
|
|
2021-11-10 19:26:55 +00:00
|
|
|
" RSpec.vim mappings
|
|
|
|
map <Leader>rt :call RunCurrentSpecFile()<CR>
|
|
|
|
map <Leader>rs :call RunNearestSpec()<CR>
|
|
|
|
map <Leader>rl :call RunLastSpec()<CR>
|
|
|
|
map <Leader>ra :call RunAllSpecs()<CR>
|
2021-10-30 00:43:31 +00:00
|
|
|
|
2022-01-27 20:24:12 +00:00
|
|
|
" let g:python_host_prog = '~/.nvim.pythonenv2/bin/python'
|
|
|
|
if exists("$VIRTUAL_ENV")
|
|
|
|
let g:python3_host_prog=substitute(system("which -a python3 | head -n2 | tail -n1"), "\n", '', 'g')
|
|
|
|
else
|
|
|
|
let g:python3_host_prog=substitute(system("which python3"), "\n", '', 'g')
|
|
|
|
endif
|
2021-11-10 19:26:55 +00:00
|
|
|
|
|
|
|
" Floaterm
|
|
|
|
let g:floaterm_keymap_toggle = '<F9>'
|
2022-01-27 20:24:12 +00:00
|
|
|
let g:floaterm_width = 0.9
|
|
|
|
let g:floaterm_height = 0.9
|
|
|
|
|
|
|
|
|
|
|
|
" Line Numbers
|
|
|
|
set number relativenumber " Turn line numbering on at startup
|
|
|
|
noremap <F1> :set invnumber invrelativenumber<CR>
|
|
|
|
|
|
|
|
"Tagbar
|
|
|
|
"
|
|
|
|
noremap <F8> :Tagbar<CR>
|
2022-02-08 21:58:38 +00:00
|
|
|
let g:tagbar_autofocus=1
|
2022-01-27 20:24:12 +00:00
|
|
|
|
2022-02-02 17:44:27 +00:00
|
|
|
" Session Lens
|
|
|
|
lua <<EOF
|
|
|
|
require('session-lens').setup {
|
|
|
|
path_display={'shorten'},
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
noremap <F2> :SearchSession<CR>
|
|
|
|
|
2022-01-27 20:24:12 +00:00
|
|
|
|
|
|
|
" Syntax Colors
|
|
|
|
function! SynStack ()
|
|
|
|
for i1 in synstack(line("."), col("."))
|
|
|
|
let i2 = synIDtrans(i1)
|
|
|
|
let n1 = synIDattr(i1, "name")
|
|
|
|
let n2 = synIDattr(i2, "name")
|
|
|
|
echo n1 "->" n2
|
|
|
|
endfor
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
|
|
" TreeSitter
|
|
|
|
lua <<EOF
|
|
|
|
require'nvim-treesitter.configs'.setup {
|
|
|
|
-- One of "all", "maintained" (parsers with maintainers), or a list of languages
|
|
|
|
ensure_installed = "maintained",
|
|
|
|
|
|
|
|
-- Install languages synchronously (only applied to `ensure_installed`)
|
|
|
|
sync_install = false,
|
|
|
|
|
|
|
|
-- List of parsers to ignore installing
|
|
|
|
ignore_install = {},
|
|
|
|
|
|
|
|
highlight = {
|
|
|
|
-- `false` will disable the whole extension
|
|
|
|
enable = true,
|
|
|
|
|
|
|
|
-- list of language that will be disabled
|
|
|
|
disable = { "c", "rust" },
|
|
|
|
|
|
|
|
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
|
|
|
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
|
|
|
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
|
|
|
-- Instead of true it can also be a list of languages
|
|
|
|
additional_vim_regex_highlighting = false,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
EOF
|
2021-12-10 20:36:49 +00:00
|
|
|
|
2022-01-27 20:24:12 +00:00
|
|
|
"Guten Tags
|
|
|
|
set statusline+=%{gutentags#statusline()}
|
2022-02-08 21:58:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
" Himalaya Email
|
|
|
|
let g:himalaya_mailbox_picker = 'telescope'
|
|
|
|
|
|
|
|
|
|
|
|
" Indent Line
|
|
|
|
let g:indentLine_char = '│'
|
|
|
|
|
|
|
|
|
|
|
|
" GBrowse open current line
|
|
|
|
nnoremap <leader>gb :.GBrowse<CR>
|