2022-10-05 19:22:26 +00:00
|
|
|
call plug#begin()
|
|
|
|
|
2022-10-06 12:01:05 +00:00
|
|
|
" NERDTree stuff
|
2022-10-21 08:53:31 +00:00
|
|
|
Plug 'nvim-tree/nvim-web-devicons' " optional, for file icons
|
|
|
|
Plug 'nvim-tree/nvim-tree.lua'
|
2022-10-05 19:22:26 +00:00
|
|
|
|
2022-10-21 08:53:31 +00:00
|
|
|
" neovim lsp plugins and depencencies
|
2022-10-15 11:50:50 +00:00
|
|
|
Plug 'neovim/nvim-lspconfig'
|
2022-10-27 17:14:44 +00:00
|
|
|
Plug 'hrsh7th/cmp-nvim-lsp'
|
|
|
|
Plug 'hrsh7th/cmp-buffer'
|
|
|
|
Plug 'hrsh7th/nvim-cmp'
|
2022-10-16 17:04:48 +00:00
|
|
|
Plug 'williamboman/mason.nvim'
|
|
|
|
Plug 'williamboman/mason-lspconfig.nvim'
|
2022-10-28 10:02:25 +00:00
|
|
|
Plug 'mfussenegger/nvim-lint'
|
2022-11-02 13:33:54 +00:00
|
|
|
Plug 'onsails/lspkind.nvim'
|
2022-10-27 17:14:44 +00:00
|
|
|
|
2022-10-19 13:11:04 +00:00
|
|
|
" various plugins
|
2022-11-02 13:33:54 +00:00
|
|
|
Plug 'windwp/nvim-ts-autotag'
|
|
|
|
Plug 'hrsh7th/cmp-path'
|
2022-11-02 11:39:26 +00:00
|
|
|
Plug 'L3MON4D3/LuaSnip', {'tag': 'v1.*'}
|
2022-11-02 13:33:54 +00:00
|
|
|
Plug 'saadparwaiz1/cmp_luasnip'
|
2022-11-01 18:44:32 +00:00
|
|
|
Plug 'lambdalisue/suda.vim'
|
2022-10-28 18:55:05 +00:00
|
|
|
Plug 'airblade/vim-gitgutter'
|
2022-10-23 18:58:08 +00:00
|
|
|
Plug 'akinsho/bufferline.nvim', { 'tag': 'v3.*' }
|
2022-10-18 18:59:31 +00:00
|
|
|
Plug 'gorbit99/codewindow.nvim'
|
2022-10-05 19:22:26 +00:00
|
|
|
Plug 'preservim/nerdcommenter'
|
|
|
|
Plug 'rmagatti/auto-session'
|
2022-10-06 12:01:05 +00:00
|
|
|
Plug 'tpope/vim-fugitive'
|
2022-10-06 14:01:22 +00:00
|
|
|
Plug 'Glench/Vim-Jinja2-Syntax'
|
|
|
|
Plug 'vmware-archive/salt-vim'
|
2022-11-04 18:24:22 +00:00
|
|
|
|
|
|
|
Plug 'nvim-lualine/lualine.nvim'
|
2022-10-08 07:15:57 +00:00
|
|
|
Plug 'itchyny/vim-cursorword'
|
2022-10-09 10:14:32 +00:00
|
|
|
Plug 'sheerun/vim-polyglot'
|
2022-10-28 18:55:05 +00:00
|
|
|
Plug 'f-person/git-blame.nvim'
|
2022-10-10 17:35:17 +00:00
|
|
|
|
|
|
|
" themes
|
2022-10-09 12:32:11 +00:00
|
|
|
Plug 'navarasu/onedark.nvim'
|
2022-10-09 10:14:32 +00:00
|
|
|
Plug 'ellisonleao/gruvbox.nvim'
|
|
|
|
Plug 'dracula/vim'
|
2022-10-09 12:32:11 +00:00
|
|
|
Plug 'vigoux/oak'
|
|
|
|
Plug 'NLKNguyen/papercolor-theme'
|
|
|
|
Plug 'bluz71/vim-moonfly-colors'
|
2022-10-05 19:22:26 +00:00
|
|
|
|
|
|
|
"Fuzzy search by Telescope and its dependencies:
|
|
|
|
Plug 'nvim-lua/plenary.nvim'
|
2022-10-07 17:11:55 +00:00
|
|
|
Plug 'nvim-telescope/telescope.nvim', { 'branch': '0.1.x' }
|
2022-10-05 19:22:26 +00:00
|
|
|
Plug 'BurntSushi/ripgrep'
|
2022-10-18 18:59:31 +00:00
|
|
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
2022-10-05 19:22:26 +00:00
|
|
|
|
|
|
|
call plug#end()
|
|
|
|
|
2022-10-21 08:53:31 +00:00
|
|
|
" set termguicolors before lua config,
|
|
|
|
" as it can contain some theme stuff that
|
|
|
|
" checks for termguicolors
|
|
|
|
set termguicolors
|
|
|
|
|
2022-10-09 15:35:20 +00:00
|
|
|
" load main lua file with additional configs
|
2022-10-28 18:55:05 +00:00
|
|
|
lua require("general")
|
2022-10-28 10:02:25 +00:00
|
|
|
lua require("my-lspconfig")
|
|
|
|
lua require("my-lint")
|
2022-10-05 19:22:26 +00:00
|
|
|
|
2022-10-19 13:11:04 +00:00
|
|
|
" highlight all .conf files as apache config (:])
|
2022-10-14 07:03:27 +00:00
|
|
|
autocmd BufEnter *.conf :setlocal filetype=apache
|
2022-10-09 10:14:32 +00:00
|
|
|
|
2022-10-06 12:01:05 +00:00
|
|
|
"nerdtree bindings
|
|
|
|
nnoremap <leader>n :NvimTreeFocus<CR>
|
|
|
|
nnoremap <C-t> :NvimTreeToggle<CR>
|
|
|
|
|
2022-10-05 19:22:26 +00:00
|
|
|
" nerdcommenter custom bindings
|
2022-11-02 11:39:26 +00:00
|
|
|
nmap <c-/> <plug>NERDCommenterToggle
|
|
|
|
vmap <c-/> <plug>NERDCommenterToggle
|
2022-10-05 19:22:26 +00:00
|
|
|
|
2022-10-09 10:14:32 +00:00
|
|
|
"theme configuration
|
2022-10-05 19:22:26 +00:00
|
|
|
syntax enable
|
2022-10-09 12:32:11 +00:00
|
|
|
let g:onedark_config = {
|
|
|
|
\ 'style': 'darker',
|
|
|
|
\}
|
|
|
|
let g:PaperColor_Theme_Options = {
|
|
|
|
\ 'language': {
|
|
|
|
\ 'python': {
|
|
|
|
\ 'highlight_builtins' : 1
|
|
|
|
\ },
|
|
|
|
\ 'cpp': {
|
|
|
|
\ 'highlight_standard_library': 1
|
|
|
|
\ },
|
|
|
|
\ 'c': {
|
|
|
|
\ 'highlight_builtins' : 1
|
|
|
|
\ }
|
|
|
|
\ }
|
|
|
|
\ }
|
|
|
|
colorscheme moonfly
|
2022-10-05 19:22:26 +00:00
|
|
|
|
|
|
|
set splitright
|
|
|
|
set splitbelow
|
|
|
|
|
|
|
|
|
|
|
|
" indent/unindent with tab/shift-tab
|
|
|
|
nmap <Tab> >>
|
|
|
|
nmap <S-tab> <<
|
|
|
|
imap <S-Tab> <Esc><<i
|
|
|
|
vmap <Tab> >gv
|
|
|
|
vmap <S-Tab> <gv
|
|
|
|
|
|
|
|
" 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>
|
|
|
|
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
|
|
|
|
|
2022-10-28 18:55:05 +00:00
|
|
|
" gitgutter setup
|
|
|
|
let g:gitgutter_sign_added = '|'
|
|
|
|
let g:gitgutter_sign_modified = '|'
|
|
|
|
let g:gitgutter_sign_removed = '|'
|
|
|
|
let g:gitgutter_sign_removed_first_line = '|'
|
|
|
|
let g:gitgutter_sign_removed_above_and_below = '|'
|
|
|
|
let g:gitgutter_sign_modified_removed = '|'
|
|
|
|
let g:gitgutter_preview_win_floating = 1
|
|
|
|
nnoremap <C-g> <cmd>GitGutterPreviewHunk<cr>
|
|
|
|
|
2022-10-05 19:22:26 +00:00
|
|
|
" general configs
|
2022-10-09 10:14:32 +00:00
|
|
|
set modeline
|
|
|
|
let g:sls_use_jinja_syntax = 1
|
2022-10-06 12:01:05 +00:00
|
|
|
set encoding=UTF-8
|
2022-10-21 08:53:31 +00:00
|
|
|
set showmatch " show matching
|
|
|
|
set ignorecase " case insensitive
|
|
|
|
set mouse=v " middle-click paste with
|
|
|
|
set hlsearch " highlight search
|
2022-10-05 19:22:26 +00:00
|
|
|
set incsearch " incremental search
|
2022-10-21 08:53:31 +00:00
|
|
|
set tabstop=4 " number of columns occupied by a tab
|
2022-10-05 19:22:26 +00:00
|
|
|
set softtabstop=4 " see multiple spaces as tabstops so <BS> does the right thing
|
|
|
|
set expandtab " converts tabs to white space
|
|
|
|
set shiftwidth=4 " width for autoindents
|
|
|
|
set autoindent " indent a new line the same amount as the line just typed
|
|
|
|
set number " add line numbers
|
2022-10-06 14:01:22 +00:00
|
|
|
set relativenumber " add relative line numbers
|
2022-10-05 19:22:26 +00:00
|
|
|
set wildmode=longest,list " get bash-like tab completions
|
2022-10-10 05:23:47 +00:00
|
|
|
set cc=80 " set an 80 column border for good coding style
|
2022-10-05 19:22:26 +00:00
|
|
|
filetype plugin indent on "allow auto-indenting depending on file type
|
|
|
|
syntax on " syntax highlighting
|
2022-10-10 05:23:47 +00:00
|
|
|
"set mouse=a " enable mouse click
|
|
|
|
set clipboard+=unnamedplus " using system clipboard
|
2022-10-05 19:22:26 +00:00
|
|
|
filetype plugin on
|
|
|
|
set cursorline " highlight current cursorline
|
|
|
|
set ttyfast " Speed up scrolling in Vim
|
|
|
|
" set spell " enable spell check (may need to download language package)
|
2022-10-10 05:23:47 +00:00
|
|
|
set noswapfile " disable creating swap file
|
2022-10-05 19:22:26 +00:00
|
|
|
" set backupdir=~/.cache/vim " Directory to store backup files.
|