summaryrefslogtreecommitdiff
path: root/.vimrc
blob: 16b9df9843c7f306aa7bd3a62de02b72a824344f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
set nocompatible    " be iMproved, required
filetype on         " required

set timeoutlen=1000
set ttimeoutlen=5

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'VundleVim/Vundle.vim'

" Keep Plugin commands between vundle#begin/end.
" Coding
Plugin 'dense-analysis/ale'
Plugin 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plugin 'nvim-lua/plenary.nvim'
Plugin 'nvim-telescope/telescope.nvim'
Plugin 'Shougo/deoplete.nvim'
" File types
Plugin 'peterhoeg/vim-qml'
Plugin 'lervag/vimtex'
" Utilities
Plugin 'kyazdani42/nvim-web-devicons'
Plugin 'kyazdani42/nvim-tree.lua'
Plugin 'reedes/vim-pencil'
Plugin 'thaerkh/vim-workspace'
" Appearance
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" Music
Plugin 'azadkuh/vim-cmus'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

syntax on
set encoding=utf-8
set fileformat=unix
set number

set splitright
set splitbelow

set foldmethod=indent
set foldlevel=99

set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent

set background=dark
let g:airline_theme='onedark'

highlight Pmenu     guibg=#282C34
highlight PmenuSel  guibg=#61AFEF

inoremap <C-s> <esc>:w<CR>i<right>

nnoremap <leader>n :noh<CR>
nnoremap <leader>b :!black %<CR>:e<CR>

nnoremap <leader>s :ToggleWorkspace<CR>
let g:workspace_session_directory = $HOME . '/.vim/sessions/'
let g:workspace_session_disable_on_args = 1
let g:workspace_autosave = 0

nnoremap <leader>f :Telescope find_files<CR>
nnoremap <leader>g :Telescope live_grep<CR>
nnoremap <leader>fb :Telescope buffers<CR>
nnoremap <leader>fh :Telescope help_tags<CR>

nnoremap <leader>c :Cmus<CR>

nnoremap <leader>p :PencilToggle<CR>
let g:pencil#map#suspend_af = 'K'
let g:pencil#textwidth = 74
augroup pencil
    autocmd!
    autocmd FileType markdown,mkd call pencil#init()
    autocmd FileType text         call pencil#init()
augroup END

nnoremap <leader>a :ALEToggle<CR>

nnoremap <C-e> :NvimTreeToggle<CR>
nnoremap <leader>t :NvimTreeFocus<CR>
nnoremap <leader>r :NvimTreeRefresh<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

autocmd BufRead,BufNewFile *.qml setfiletype qml

let g:vimtex_view_general_viewer = 'okular'
let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
let g:vimtex_compiler_method = 'latexmk'

let g:deoplete#enable_at_startup = 1
nnoremap <leader>d :call deoplete#toggle()<CR>