aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
-rw-r--r--vim/.vimrc241
-rw-r--r--vim/.vimrc.plug68
-rw-r--r--vim/.vimrc.plugins.settings160
-rw-r--r--vim/.ycm_extra_conf.py220
4 files changed, 689 insertions, 0 deletions
diff --git a/vim/.vimrc b/vim/.vimrc
new file mode 100644
index 0000000..670b1e8
--- /dev/null
+++ b/vim/.vimrc
@@ -0,0 +1,241 @@
+" Vi improved, gotta be first
+set nocompatible
+" enable filetype extension
+filetype on
+filetype plugin on
+filetype indent on " auto file type based indentation
+syntax enable
+" Settings
+set noerrorbells " No beeps
+set number " Show line numbers
+" indent allow backspacing over autoident
+" eol allow backspacing over line breaks (join lines)
+" start allow backspacing over the start of insert; CTRL-W and CTRL-U stop once
+" at the start of insert
+set backspace=indent,eol,start " Makes backspace key more powerful.
+set showcmd " Show me what I'm typing
+set showmode " Show current mode.
+set noswapfile " Don't use swapfile
+set nobackup " Don't create annoying backup files
+set nowritebackup " Don't waste disk io writing backup files
+set splitright " Split vertical windows right to the current windows
+set splitbelow " Split horizontal windows below to the current windows
+set encoding=utf-8 " Set default encoding to UTF-8
+if has('unix')
+ set t_Co=256 " use 256 colors in vim
+endif
+set autowrite " Automatically save before :next, :make etc.
+set autoread " Automatically reread changed files without asking me anything
+set laststatus=2
+set hidden
+set ruler " Show the cursor position all the time
+au FocusLost * :wa " Set vim to save the file on focus out.
+set fileformats=unix,dos,mac " Prefer Unix over Windows over OS 9 formats
+set showmatch " Show matching brackets by flickering
+set noshowmode " We show the mode with airline or lightline
+set incsearch " Shows the match while typing
+set hlsearch " Highlight found searches
+set ignorecase " Search case insensitive...
+set smartcase " ... but not when search pattern contains upper case characters
+set clipboard=unnamedplus " use 'global register for copy'
+
+ "speed up vim
+" set ttyfast " indicates a fast terminal connection. More chars sent to screen
+ " for redrawing
+" set ttyscroll=3 " Maximum no. of lines to scroll the screen. If more screen is
+ " is redrawn. In a terminal where scrolling is slow but
+ " redraw is fast a small number like 3 speeds up displaying
+set lazyredraw " does not redraw the screen on nontyped commands
+set updatetime=250 " git gutter faster updates
+
+set cursorline
+
+
+" speed up syntax highlighting on slow computer
+" set nocursorcolumn " Don't highlight the screen column of the cursor
+" set nocursorline " Don't highlight the screen line of the cursor
+
+" syntax sync minlines=256
+" set synmaxcol=300
+" set re=1
+
+" open help vertically
+" command! -nargs=* -complete=help Help vertical belowright help <args>
+" autocmd FileType help wincmd L
+
+" automatic automcomplete for html files
+" autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
+
+" Make Vim to handle long lines nicely.
+set wrap " wrap wrong lines that extend beyond visible screen
+set textwidth=79 " was 79
+set formatoptions=qn1 " :h fo-table for details add r for auto insert comment leader
+set colorcolumn=80 " was 80
+"set relativenumber
+"set norelativenumber
+
+" mail line wrapping
+au BufRead /tmp/mutt-* set tw=72
+
+set autoindent " copy indent from current when starting a new line. Typing <CR>
+ " in insert mode or 'o' 'O' in normal triggers it
+
+" set complete-=i
+set smarttab " insert blanks according to shiftwidth, tabstop, softtab, BS will
+ " delete shiftwidth
+
+" default tab settings based on google style guide
+"set tabstop=8 " 8 spaces for a tab
+set shiftwidth=8 " 8 spaces for identation
+set expandtab " insert space characters whenever tab is pressed
+set softtabstop=8 " number of spaces that a <Tab> counts for while performing
+ " editing operations like inserting a <Tab> or using <BS>
+
+" Shortcut to rapidly toggle `set list`
+" nmap <leader>m :set list!<CR>
+" set listchars=tab:▸\ ,eol:¬,trail:· " show tabs, eols and trailing spaces
+
+
+" Unrecogised extensions fix
+au BufRead,BufNewFile *.rockspec set filetype=lua
+au BufRead,BufNewFile *.md set filetype=markdown
+au Bufread,BufNewFile *.org.txt set filetype=org
+
+" Ask to clean all trailing white-spaces upon saving
+" autocmd BufWritePre * :%s/\s\+$//ec
+
+" Use specific spacing for different formats
+" expandtab, et: <Tab> -> spaces
+" tabstop, ts: length of a <Tab>
+" shiftwidth, sw: spaces for autoindent
+" softtabstop, sts: how many spaces a <Tab> inserts or <BS> removes
+au FileType verilog,matlab setl et ts=4 sw=4 sts=4
+au FileType lua setl et ts=3 sw=3 sts=2
+au FileType c,cuda,tex,bib setl et ts=4 sw=2 sts=2
+au FileType make set noexpandtab shiftwidth=8 softtabstop=0
+
+" >>> ended here refactoring
+set nrformats-=octal
+set shiftround
+
+" Time out on key codes but not mappings.
+" Basically this makes terminal Vim work sanely.
+set notimeout
+set ttimeout
+set ttimeoutlen=10
+
+" Better Completion
+set complete=.,w,b,u,t,i
+set completeopt=longest,menuone
+
+let mapleader=" " " set map leader key to comma
+
+" configure wildmenu tab completion
+set wildmode=list:longest,full
+set wildignorecase
+
+" turn off search highlight
+nnoremap <leader><space> :nohlsearch<CR>
+
+" folding support
+set foldenable " enable folding
+set foldlevelstart=10 " open most folds by default
+set foldnestmax=10 " 10 nested fold max
+" space open/closes folds
+nnoremap <space> za
+set foldmethod=indent " fold based on indent level
+
+" move vertically by visual line not ignoring wrapped lines
+nnoremap j gj
+nnoremap k gk
+
+" save session
+nnoremap <leader>s :mksession<CR>
+
+" open ag.vim
+nnoremap <leader>a :Ack
+
+
+
+" number of commands that are remembered
+if &history < 1000
+ set history=50
+endif
+
+" set maximum number of tabs
+if &tabpagemax < 50
+ set tabpagemax=50
+endif
+
+" create viminfo on exit to resume where you left off
+if !empty(&viminfo)
+ set viminfo^=!
+endif
+
+" number of lines visible above the cursor
+if !&scrolloff
+ set scrolloff=1
+endif
+
+" minimum number of screen columns to keep to the right and left of the cursor
+if !&sidescrolloff
+ set sidescrolloff=5
+endif
+
+" last line that doesn't fit on window will be displayed as much as possible
+set display+=lastline
+
+" gvim specific settings
+set guioptions-=m "menu bar
+set guioptions-=T "toolbar
+set guioptions-=r "scrollbar
+
+" Center the screen
+nnoremap <space> zz
+
+" C-d to delete in insert mode
+inoremap <C-d> <Del>
+
+" persistent undo survives vim exits
+if has("persistent_undo")
+ set undodir=~/.vim/undodir/
+ silent call system('mkdir -p ' . &undodir)
+ set undofile
+endif
+
+" use mouse if available
+if has('mouse')
+ set mouse=a
+endif
+
+" When editing a file, always jump to the last known cursor position.
+" Don't do it when the position is invalid or when inside an event handler
+" (happens when dropping a file on gvim).
+" autocmd BufReadPost *
+" \ if line("'\"") >= 1 && line("'\"") <= line("$") |
+" \ exe "normal! g`\"" |
+" \ endif
+augroup resCur
+ autocmd!
+ autocmd BufReadPost * call setpos(".", getpos("'\""))
+augroup END
+
+autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=0
+
+" Allow saving of files as sudo when i forgot to start vim using sudo
+cmap w!! w !sudo tee > /dev/null %
+
+" keeps the visual selection active after indenting
+vmap > >gv
+vmap < <gv
+
+if has('gui_running')
+ set guifont=Inconsolata-g\ for\ Powerline\ 11
+endif
+
+
+" source vim plug and plugins
+source ~/.vimrc.plug
+
+" source plugins settings
+source ~/.vimrc.plugins.settings
diff --git a/vim/.vimrc.plug b/vim/.vimrc.plug
new file mode 100644
index 0000000..0e1d015
--- /dev/null
+++ b/vim/.vimrc.plug
@@ -0,0 +1,68 @@
+" Download vim-plug if not already installed
+if empty(glob('~/.vim/autoload/plug.vim'))
+ silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
+ \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
+ autocmd VimEnter * PlugInstall | source $MYVIMRC
+endif
+
+" YCM plugin installation helper
+function! BuildYCM(info)
+ " info is a dictionary with 3 fields
+ " - name: name of the plugin
+ " - status: 'installed', 'updated', or 'unchanged'
+ " - force: set on PlugInstall! or PlugUpdate!
+ if a:info.status == 'installed' || a:info.force
+ " need to use python2 explicitly
+ "!./install.py --clang-completer --go-completer --js-completer
+ !./install.py --all
+ endif
+endfunction
+
+
+""" Plugins
+call plug#begin('~/.vim/plugged')
+""" core
+Plug 'Valloric/YouCompleteMe', { 'do': function('BuildYCM') } " completion engine for vim
+Plug 'flazz/vim-colorschemes' " color scheme pack
+Plug 'sheerun/vim-polyglot' " language pack for vim
+Plug 'w0rp/ale' " Asynchronous linter
+Plug 'SirVer/ultisnips' " snippet engine
+Plug 'honza/vim-snippets' " snippets
+Plug 'easymotion/vim-easymotion' " Movements
+Plug 'scrooloose/nerdcommenter' " commenter
+Plug 'scrooloose/nerdtree' " Tree explorer for vim
+Plug 'airblade/vim-gitgutter' " git diff in the gutter
+
+Plug 'christoomey/vim-tmux-navigator' " tmux integration for easy pane movement
+Plug 'derekwyatt/vim-fswitch' " switch between header/source
+Plug 'editorconfig/editorconfig-vim' " helps manage coding styles
+Plug 'EinfachToll/DidYouMean' " File guessing
+Plug 'jceb/vim-orgmode' " org mode for vim
+Plug 'jeffkreeftmeijer/vim-numbertoggle' " toggles between relative and absolute line numbers
+Plug 'jiangmiao/auto-pairs' " auto close brackets
+Plug 'junegunn/fzf', { 'do': { -> fzf#install() }}
+Plug 'junegunn/fzf.vim' " FZF
+Plug 'junegunn/goyo.vim' "distraction free writing in vim
+Plug 'junegunn/limelight.vim' " highlight focused paragraph
+Plug 'junegunn/vim-easy-align' " alignment like tabular
+Plug 'kien/ctrlp.vim' " fuzzy file finder
+Plug 'majutsushi/tagbar' " Tagbar
+
+Plug 'mbbill/undotree' , { 'on': 'UndotreeToggle' } " Edits graph
+Plug 'mhinz/vim-startify' "fancy startup for vim
+Plug 'mileszs/ack.vim' " built in grep for vim
+Plug 'ntpeters/vim-better-whitespace' " Whitespace
+Plug 'terryma/vim-multiple-cursors' " multiple selections for vim
+Plug 'timakro/vim-searchant' " improved search highlighting
+Plug 'tpope/vim-fugitive' " Git interface
+Plug 'tpope/vim-speeddating' " vim-orgmode depend
+Plug 'tpope/vim-surround' " manipulate comments
+Plug 'vim-airline/vim-airline' " Status line
+Plug 'vim-airline/vim-airline-themes' " Status line themes
+Plug 'kien/rainbow_parentheses.vim' " color parenthes
+Plug 'pelodelfuego/vim-swoop' " search results in one buffer
+"Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
+Plug 'lervag/vimtex'
+Plug 'preservim/vim-indent-guides'
+" Plug 'Chiel92/vim-autoformat'
+call plug#end()
diff --git a/vim/.vimrc.plugins.settings b/vim/.vimrc.plugins.settings
new file mode 100644
index 0000000..e70fb54
--- /dev/null
+++ b/vim/.vimrc.plugins.settings
@@ -0,0 +1,160 @@
+" Goyo
+autocmd! User GoyoEnter Limelight
+autocmd! User GoyoLeave Limelight!
+"
+" Limelight 1 go
+map <F10> :Goyo <bar> :Limelight!! <CR>
+
+" fix airline
+"let g:airline_powerline_fonts = 1
+set laststatus=2
+
+""" Plugin configurations
+" appearance
+silent! colorscheme molokai
+
+" if running gui use different background like emacs
+" set to dark for complete dark
+" set to light for more light
+if has('gui_running')
+ set background=dark
+else
+ set background=dark
+endif
+
+" gitgutter
+let g:gitgutter_override_sign_column_highlight = 0
+set signcolumn=yes
+
+" airline
+" use powerline patched font
+let g:airline_powerline_fonts = 1
+
+" just use :StripWhitespace
+let g:better_whitespace_enabled = 0
+
+" recognize all Markdown files
+autocmd BufNewFile,BufReadPost *.md set filetype=markdown
+let g:markdown_fenced_languages = ['c', 'cpp', 'csharp=cs', 'bash=sh', 'json']
+
+" use solarized dark airline theme
+let g:airline_theme='molokai'
+
+
+""" easy motion
+" <Leader>f{char} to move to {char}
+map <Leader>fc <Plug>(easymotion-bd-f)
+nmap <Leader>fc <Plug>(easymotion-overwin-f)
+" s{char}{char} to move to {char}{char}
+nmap s <Plug>(easymotion-overwin-f2)
+" Move to line
+map <Leader>L <Plug>(easymotion-bd-jk)
+nmap <Leader>L <Plug>(easymotion-overwin-line)
+" Move to word
+map <Leader>w <Plug>(easymotion-bd-w)
+nmap <Leader>w <Plug>(easymotion-overwin-w)
+
+" tagbar
+nmap <F8> :TagbarToggle<CR>
+
+" undotree
+nmap <F5> :UndotreeToggle<CR>
+
+" Nerd tree
+map <F6> :NERDTreeToggle<CR>
+
+" UltiSnips config
+" Trigger configuration. Do not use <tab> if you use
+" https://github.com/Valloric/YouCompleteMe.
+" was c-k, c-b, c-z
+let g:UltiSnipsExpandTrigger="<c-j>"
+let g:UltiSnipsJumpForwardTrigger="<c-j>"
+let g:UltiSnipsJumpBackwardTrigger="<c-k>"
+" If you want :UltiSnipsEdit to split your window.
+let g:UltiSnipsEditSplit="vertical"
+
+" youcompleteme
+let g:ycm_global_ycm_extra_conf = '~/.ycm_global_ycm_extra_conf'
+let g:ycm_confirm_extra_conf = 0
+" let g:ycm_server_python_interpreter = '/usr/bin/python2'
+
+
+" vim-javascript
+let g:javascript_plugin_jsdoc = 1
+let g:javascript_plugin_ngdoc = 1
+let g:javascript_plugin_flow = 1
+
+" NumberToggle
+let g:NumberToggleTrigger="<F2>"
+
+" vim-markdown
+let g:vim_markdown_folding_disabled = 1
+
+" vim-fswitch settings
+nnoremap <leader>fsh :FSSplitLeft<CR>
+nnoremap <leader>fsj :FSSplitBelow<CR>
+nnoremap <leader>fsk :FSSplitAbove<CR>
+nnoremap <leader>fsl :FSSplitRight<CR>
+nnoremap <leader>h : FSSplitRight<CR>
+
+" tmuxline settings
+"let g:tmuxline_preset = 'full' " nightly_fox, tmux
+
+" limelight settings
+let g:limelight_conceal_ctermfg = 256
+
+" ack
+if executable('ag')
+ let g:ackprg = 'ag --nogroup --nocolor --column --smart-case'
+elseif executable('ack-grep')
+ let g:ackprg="ack-grep -H --nocolor --nogroup --column"
+elseif executable('ack')
+ let g:ackprg='ack '
+endif
+
+" vim-easy-align
+" Start interactive EasyAlign in visual mode (e.g. vipga)
+xmap ga <Plug>(EasyAlign)
+" Start interactive EasyAlign for a motion/text object (e.g. gaip)
+nmap ga <Plug>(EasyAlign)
+
+" CTrl-P
+let g:ctrlp_match_window = 'bottom,order:ttb'
+let g:ctrlp_switch_buffer = 0
+let g:ctrlp_working_path_mode = 0
+let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""'
+
+" transparent vim
+hi Normal ctermbg=none
+hi NonText ctermbg=none
+
+" vim latex preview
+let g:livepreview_previewer = 'zathura'
+autocmd Filetype tex setl updatetime=1
+
+" FZF shortcuts
+" File searches
+nnoremap <Leader>f :Files<CR>
+" Buffers list
+nnoremap <Leader>b :Files<CR>
+" Silver searcher
+nnoremap <Leader>ag :Ag<CR>
+" Rip grep
+nnoremap <Leader>rg :Rg<CR>
+" Current File content only
+nnoremap <Leader>g :Gfiles?<CR>
+" list files in the current git repository
+nnoremap <Leader>gf :Gfiles<CR>
+" search through previous git commits
+nnoremap <Leader>gc :Commits<CR>
+" switch branches real quick
+nnoremap <Leader>gb :Branches<CR>
+" search through tags
+nnoremap <Leader>t :Tags<CR>
+" history recent files
+nnoremap <Leader>h :History<CR>
+" list and jump to marks in your vim session
+nnoremap <Leader>m :Marks<CR>
+
+" lervag/vimtex
+let g:vimtex_view_method = 'zathura'
diff --git a/vim/.ycm_extra_conf.py b/vim/.ycm_extra_conf.py
new file mode 100644
index 0000000..d970148
--- /dev/null
+++ b/vim/.ycm_extra_conf.py
@@ -0,0 +1,220 @@
+# This file is NOT licensed under the GPLv3, which is the license for the rest
+# of YouCompleteMe.
+#
+# Here's the license text for this file:
+#
+# This is free and unencumbered software released into the public domain.
+#
+# Anyone is free to copy, modify, publish, use, compile, sell, or
+# distribute this software, either in source code form or as a compiled
+# binary, for any purpose, commercial or non-commercial, and by any
+# means.
+#
+# In jurisdictions that recognize copyright laws, the author or authors
+# of this software dedicate any and all copyright interest in the
+# software to the public domain. We make this dedication for the benefit
+# of the public at large and to the detriment of our heirs and
+# successors. We intend this dedication to be an overt act of
+# relinquishment in perpetuity of all present and future rights to this
+# software under copyright law.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+#
+# For more information, please refer to <http://unlicense.org/>
+
+from sysconfig import get_path
+import platform
+import os.path as p
+import subprocess
+
+DIR_OF_THIS_SCRIPT = p.abspath( p.dirname( __file__ ) )
+DIR_OF_THIRD_PARTY = p.join( DIR_OF_THIS_SCRIPT, 'third_party' )
+DIR_OF_WATCHDOG_DEPS = p.join( DIR_OF_THIRD_PARTY, 'watchdog_deps' )
+SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
+
+database = None
+
+# These are the compilation flags that will be used in case there's no
+# compilation database set (by default, one is not set).
+# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
+flags = [
+'-Wall',
+'-Wextra',
+'-Werror',
+'-Wno-long-long',
+'-Wno-variadic-macros',
+'-fexceptions',
+'-DNDEBUG',
+# You 100% do NOT need -DUSE_CLANG_COMPLETER and/or -DYCM_EXPORT in your flags;
+# only the YCM source code needs it.
+'-DUSE_CLANG_COMPLETER',
+'-DYCM_EXPORT=',
+'-DYCM_ABSEIL_SUPPORTED',
+# THIS IS IMPORTANT! Without the '-x' flag, Clang won't know which language to
+# use when compiling headers. So it will guess. Badly. So C++ headers will be
+# compiled as C headers. You don't want that so ALWAYS specify the '-x' flag.
+# For a C project, you would set this to 'c' instead of 'c++'.
+'-x',
+'c++',
+'-isystem',
+'cpp/absl',
+'-isystem',
+'cpp/pybind11',
+'-isystem',
+'cpp/whereami',
+'-isystem',
+'cpp/BoostParts',
+'-isystem',
+get_path( 'include' ),
+'-isystem',
+'cpp/llvm/include',
+'-isystem',
+'cpp/llvm/tools/clang/include',
+'-I',
+'cpp/ycm',
+'-I',
+'cpp/ycm/ClangCompleter',
+'-isystem',
+'cpp/ycm/tests/gmock/googlemock/include',
+'-isystem',
+'cpp/ycm/tests/gmock/googletest/include',
+'-isystem',
+'cpp/ycm/benchmarks/benchmark/include',
+'-std=c++17',
+]
+
+# Set this to the absolute path to the folder (NOT the file!) containing the
+# compile_commands.json file to use that instead of 'flags'. See here for
+# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
+#
+# You can get CMake to generate this file for you by adding:
+# set( CMAKE_EXPORT_COMPILE_COMMANDS 1 )
+# to your CMakeLists.txt file.
+#
+# Most projects will NOT need to set this to anything; you can just change the
+# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
+compilation_database_folder = ''
+
+
+def IsHeaderFile( filename ):
+ extension = p.splitext( filename )[ 1 ]
+ return extension in [ '.h', '.hxx', '.hpp', '.hh' ]
+
+
+def FindCorrespondingSourceFile( filename ):
+ if IsHeaderFile( filename ):
+ basename = p.splitext( filename )[ 0 ]
+ for extension in SOURCE_EXTENSIONS:
+ replacement_file = basename + extension
+ if p.exists( replacement_file ):
+ return replacement_file
+ return filename
+
+
+def PathToPythonUsedDuringBuild():
+ try:
+ filepath = p.join( DIR_OF_THIS_SCRIPT, 'PYTHON_USED_DURING_BUILDING' )
+ with open( filepath ) as f:
+ return f.read().strip()
+ except OSError:
+ return None
+
+
+def Settings( **kwargs ):
+ # Do NOT import ycm_core at module scope.
+ import ycm_core
+
+ global database
+ if database is None and p.exists( compilation_database_folder ):
+ database = ycm_core.CompilationDatabase( compilation_database_folder )
+
+ language = kwargs[ 'language' ]
+
+ if language == 'cfamily':
+ # If the file is a header, try to find the corresponding source file and
+ # retrieve its flags from the compilation database if using one. This is
+ # necessary since compilation databases don't have entries for header files.
+ # In addition, use this source file as the translation unit. This makes it
+ # possible to jump from a declaration in the header file to its definition
+ # in the corresponding source file.
+ filename = FindCorrespondingSourceFile( kwargs[ 'filename' ] )
+
+ if not database:
+ return {
+ 'flags': flags,
+ 'include_paths_relative_to_dir': DIR_OF_THIS_SCRIPT,
+ 'override_filename': filename
+ }
+
+ compilation_info = database.GetCompilationInfoForFile( filename )
+ if not compilation_info.compiler_flags_:
+ return {}
+
+ # Bear in mind that compilation_info.compiler_flags_ does NOT return a
+ # python list, but a "list-like" StringVec object.
+ final_flags = list( compilation_info.compiler_flags_ )
+
+ # NOTE: This is just for YouCompleteMe; it's highly likely that your project
+ # does NOT need to remove the stdlib flag. DO NOT USE THIS IN YOUR
+ # ycm_extra_conf IF YOU'RE NOT 100% SURE YOU NEED IT.
+ try:
+ final_flags.remove( '-stdlib=libc++' )
+ except ValueError:
+ pass
+
+ return {
+ 'flags': final_flags,
+ 'include_paths_relative_to_dir': compilation_info.compiler_working_dir_,
+ 'override_filename': filename
+ }
+
+ if language == 'python':
+ return {
+ 'interpreter_path': PathToPythonUsedDuringBuild(),
+ 'ls': {
+ 'python': {
+ 'analysis': {
+ 'extraPaths': [
+ p.join( DIR_OF_THIS_SCRIPT ),
+ p.join( DIR_OF_THIRD_PARTY, 'bottle' ),
+ p.join( DIR_OF_THIRD_PARTY, 'regex-build' ),
+ p.join( DIR_OF_THIRD_PARTY, 'frozendict' ),
+ p.join( DIR_OF_THIRD_PARTY, 'jedi_deps', 'jedi' ),
+ p.join( DIR_OF_THIRD_PARTY, 'jedi_deps', 'parso' ),
+ p.join( DIR_OF_WATCHDOG_DEPS, 'watchdog', 'build', 'lib3' ),
+ p.join( DIR_OF_WATCHDOG_DEPS, 'pathtools' ),
+ p.join( DIR_OF_THIRD_PARTY, 'waitress' )
+ ],
+ 'useLibraryCodeForTypes': True
+ }
+ }
+ }
+ }
+
+ return {}
+
+
+def PythonSysPath( **kwargs ):
+ sys_path = kwargs[ 'sys_path' ]
+
+ sys_path[ 0:0 ] = [ p.join( DIR_OF_THIS_SCRIPT ),
+ p.join( DIR_OF_THIRD_PARTY, 'bottle' ),
+ p.join( DIR_OF_THIRD_PARTY, 'regex-build' ),
+ p.join( DIR_OF_THIRD_PARTY, 'frozendict' ),
+ p.join( DIR_OF_THIRD_PARTY, 'jedi_deps', 'jedi' ),
+ p.join( DIR_OF_THIRD_PARTY, 'jedi_deps', 'parso' ),
+ p.join( DIR_OF_WATCHDOG_DEPS,
+ 'watchdog',
+ 'build',
+ 'lib3' ),
+ p.join( DIR_OF_WATCHDOG_DEPS, 'pathtools' ),
+ p.join( DIR_OF_THIRD_PARTY, 'waitress' ) ]
+
+ sys_path.append( p.join( DIR_OF_THIRD_PARTY, 'jedi_deps', 'numpydoc' ) )
+ return sys_path