Chris 5 år sedan
förälder
incheckning
9b9dfb9cc5
11 ändrade filer med 79 tillägg och 256 borttagningar
  1. 18 1
      README.md
  2. 22 19
      install/install.sh
  3. 1 1
      modules/airline.vim
  4. 5 3
      modules/deoplete.vim
  5. 1 1
      modules/pythonpath.vim
  6. 32 13
      modules/theme.vim
  7. 0 2
      old/README.md
  8. 0 105
      old/init.vim
  9. 0 86
      old/installer.sh
  10. 0 23
      old/setupDEB.sh
  11. 0 2
      old/setupRHEL.sh

+ 18 - 1
README.md

@@ -1,5 +1,23 @@
 # Nvim
 # Nvim
 
 
+## Install 
+
+To install run the install script in the install folder
+
+```
+./install
+```
+
+## Post install
+
+After install open Neovim and run the following:
+
+```
+:UpdateRemotePlugins
+
+:checkhealth
+```
+
 Follow my development here
 Follow my development here
 
 
 <https://chiarulli.me>
 <https://chiarulli.me>
@@ -18,7 +36,6 @@ pip install vim-vint
 npm i -g bash-language-server
 npm i -g bash-language-server
 
 
 npm install -g javascript-typescript-langserver
 npm install -g javascript-typescript-langserver
-
 ```
 ```
 
 
 install ripgrep" for gutentags to ignore .gitignore
 install ripgrep" for gutentags to ignore .gitignore

+ 22 - 19
install/install.sh

@@ -3,13 +3,13 @@
 if [ "$(uname)" == "Darwin" ]; then
 if [ "$(uname)" == "Darwin" ]; then
     echo 'MacOS Detected'
     echo 'MacOS Detected'
     echo "installing miniconda"
     echo "installing miniconda"
-	wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/.config/nvim/install/miniconda.sh
+    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/.config/nvim/install/miniconda.sh
     echo " Grabbing a font to use foe devicons "
     echo " Grabbing a font to use foe devicons "
-    brew tap caskroom/fonts
+    brew tap homebrew/cask-fonts
     brew cask install font-hack-nerd-font
     brew cask install font-hack-nerd-font
 elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
 elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
     echo 'Linux Detected'
     echo 'Linux Detected'
-	wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/.config/nvim/install/miniconda.sh
+    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/.config/nvim/install/miniconda.sh
     mkdir -p ~/.local/share/fonts
     mkdir -p ~/.local/share/fonts
     cd ~/.local/share/fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete.otf
     cd ~/.local/share/fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete.otf
 fi
 fi
@@ -18,11 +18,12 @@ fi
 
 
 sh ~/.config/nvim/install/miniconda.sh -b -f -p  $HOME/.miniconda
 sh ~/.config/nvim/install/miniconda.sh -b -f -p  $HOME/.miniconda
 
 
-echo 'export PATH="$HOME/.miniconda/bin:$PATH"' >> ~/.bash_profile
+echo '# Miniconda' >> ~/.zshrc
+echo 'export PATH="$HOME/.miniconda/bin:$PATH"' >> ~/.zshrc
 
 
-. ~/.bash_profile
+. ~/.zshrc
 
 
-conda create --name neovim python=3.7 --yes
+conda create --name neovim python=3.8 --yes
 
 
 . activate neovim 
 . activate neovim 
 
 
@@ -30,30 +31,32 @@ pip install neovim
 
 
 . deactivate
 . deactivate
 
 
-conda create --name pyls python=3.7 --yes
+#conda create --name pyls python=3.7 --yes
 
 
-. activate pyls
+#. activate pyls
 
 
-pip install 'python-language-server[all]'
-pip install vim-vint
+#pip install 'python-language-server[all]'
+#pip install vim-vint
 
 
-. deactivate
+#. deactivate
 
 
-pip install 'python-language-server[all]'
+#pip install 'python-language-server[all]'
 
 
-if [ ! -f ~/.bash_aliases ]; then
-    echo ".bash_aliases not found!"
-    touch ~/.bash_aliases
-    echo 'source ~/.bash_aliases' >> ~/.bashrc
-fi
+#if [ ! -f ~/.bash_aliases ]; then
+#    echo ".bash_aliases not found!"
+#    touch ~/.bash_aliases
+#    echo 'source ~/.bash_aliases' >> ~/.bashrc
+#fi
 
 
-echo 'alias mkenv="conda create --clone pyls --name"' >> ~/.bash_aliases
+#echo 'alias mkenv="conda create --clone pyls --name"' >> ~/.bash_aliases
 
 
-echo 'let g:python3_host_prog = expand("~/.miniconda/envs/neovim/bin/python3.7")' > ~/.config/nvim/modules/pythonpath.vim     
+echo 'let g:python3_host_prog = expand("~/.miniconda/envs/neovim/bin/python3.8")' > ~/.config/nvim/modules/pythonpath.vim     
 
 
 if [ ! -d ~/.config/nvim/dein ]; then
 if [ ! -d ~/.config/nvim/dein ]; then
     echo "dein  package manager not found"
     echo "dein  package manager not found"
     sh ~/.config/nvim/install/utils/installer.sh ~/.config/nvim/dein
     sh ~/.config/nvim/install/utils/installer.sh ~/.config/nvim/dein
 fi
 fi
 
 
+# Cleanup
+
 rm ~/.config/nvim/install/miniconda.sh
 rm ~/.config/nvim/install/miniconda.sh

+ 1 - 1
modules/airline.vim

@@ -3,7 +3,7 @@ let g:airline#extensions#tabline#enabled = 1
 " enable powerline fonts
 " enable powerline fonts
 let g:airline_powerline_fonts = 1
 let g:airline_powerline_fonts = 1
 " Switch to your current theme
 " Switch to your current theme
-let g:airline_theme = 'codedark'
+let g:airline_theme = 'onedark'
 " Always show tabs 
 " Always show tabs 
 set showtabline=2
 set showtabline=2
 " We don't need to see things like -- INSERT -- anymore
 " We don't need to see things like -- INSERT -- anymore

+ 5 - 3
modules/deoplete.vim

@@ -26,9 +26,11 @@ inoremap <silent><expr><S-TAB>  pumvisible() ? "\<C-p>" : "\<TAB>"
 inoremap <expr><BS>  deoplete#smart_close_popup()."\<C-h>"
 inoremap <expr><BS>  deoplete#smart_close_popup()."\<C-h>"
 
 
 
 
-call deoplete#custom#option('sources', {
-  \ 'python': ['file', 'LanguageClient', 'neosnippet'],
-  \ })
+" Only get completion candidates from these
+"call deoplete#custom#option('sources', {
+  "\ 'python': ['file', 'LanguageClient', 'neosnippet'],
+  "\ })
+
 " Sort matches alphabetically
 " Sort matches alphabetically
 call deoplete#custom#source('_', 'sorters', ['sorter_word'])
 call deoplete#custom#source('_', 'sorters', ['sorter_word'])
 " Disable shorter or equal length matches
 " Disable shorter or equal length matches

+ 1 - 1
modules/pythonpath.vim

@@ -1 +1 @@
-let g:python3_host_prog = expand("~/.miniconda/envs/neovim/bin/python3.7")
+let g:python3_host_prog = expand("~/.miniconda/envs/neovim/bin/python3.8")

+ 32 - 13
modules/theme.vim

@@ -1,21 +1,40 @@
-
 " Switch to whatever colorscheme you like
 " Switch to whatever colorscheme you like
-"colorscheme onedark
-""colorscheme gruvbox
-colorscheme codedark
-
-" This chunk is just for spacevim theme
-"colorscheme space-vim-dark
-"let g:space_vim_dark_background = 235
-"color space-vim-dark
-
-" gray comments
-""hi Comment guifg=#5C6370 ctermfg=59
-" this will show italics if your terminal supports that
+
+" onedark.vim override: Don't set a background color when running in a terminal;
+" just use the terminal's background color
+" `gui` is the hex color code used in GUI mode/nvim true-color mode
+" `cterm` is the color code used in 256-color mode
+" `cterm16` is the color code used in 16-color mode
+if (has("autocmd") && !has("gui_running"))
+  augroup colorset
+    autocmd!
+    let s:white = { "gui": "#ABB2BF", "cterm": "145", "cterm16" : "7" }
+    autocmd ColorScheme * call onedark#set_highlight("Normal", { "fg": s:white }) " `bg` will not be styled since there is no `bg` setting
+  augroup END
+endif
+
 hi Comment cterm=italic
 hi Comment cterm=italic
+let g:onedark_hide_endofbuffer=1
+let g:onedark_terminal_italics=1
+let g:onedark_termcolors=256
+
+syntax on
+colorscheme onedark
+
 
 
 " checks if your terminal has 24-bit color support
 " checks if your terminal has 24-bit color support
 if (has("termguicolors"))
 if (has("termguicolors"))
     set termguicolors
     set termguicolors
     hi LineNr ctermbg=NONE guibg=NONE
     hi LineNr ctermbg=NONE guibg=NONE
 endif
 endif
+
+" Syntax highlighting
+let g:python_highlight_all=1
+
+" Change this when you know where i3 will be
+aug i3config_ft_detection
+  au!
+  au BufNewFile,BufRead ~/.config/i3/config set filetype=i3config
+aug end
+
+" TODO checkout vim-jsx

+ 0 - 2
old/README.md

@@ -1,2 +0,0 @@
-# nvim
-Neovim config

+ 0 - 105
old/init.vim

@@ -1,105 +0,0 @@
-
-
-
-
-
-  " Search Index shows how many instances of searched term
-  call dein#add('google/vim-searchindex')
-  "call dein#add('steffanc/cscopemaps.vim')
-  "call dein#add('brookhong/cscope.vim')
-  "call dein#add('vim-scripts/autoload_cscope.vim')
-  " Add or remove your plugins here: TODO
-  call dein#add('Shougo/neosnippet.vim')
-  call dein#add('Shougo/neosnippet-snippets')
-  " Searchtasks searches for TODO, FIXME, XXX and such run :SearchTasks .  
-  call dein#add('gilsondev/searchtasks.vim') 
-  call dein#add('arakashic/chromatica.nvim') 
-  " Multiple Cursors
-  call dein#add('terryma/vim-multiple-cursors')
-  call dein#add('scrooloose/nerdcommenter')
-  " FZF
-  call dein#add('junegunn/fzf.vim',  { 'dir': '~/.fzf', 'do': './install --all' })
-  "call dein#add('junegunn/fzf')
-  " For autocomplete
-  call dein#add('zchee/deoplete-jedi')
-  call dein#add('Shougo/deoplete.nvim')
-  " For Web Development
-  call dein#add('pangloss/vim-javascript')
-  call dein#add('elzr/vim-json')
-  call dein#add('mxw/vim-jsx')
-  call dein#add('mattn/emmet-vim')
-  call dein#add('prettier/vim-prettier', {'do': 'yarn install'})
-  " Auto flow
-  call dein#add('wokalski/autocomplete-flow') 
-  " You can specify revision/branch/tag.
-  call dein#add('Shougo/deol.nvim', { 'rev': '01203d4c9' })
-
-" NeoSnippet
-let g:neosnippet#enable_completed_snippet = 1
-imap <C-k>     <Plug>(neosnippet_expand_or_jump)
-smap <C-k>     <Plug>(neosnippet_expand_or_jump)
-xmap <C-k>     <Plug>(neosnippet_expand_target)
-let NERDTreeShowHidden = 1
-
-" MULTI CURSOR
-let g:multi_cursor_use_default_mapping=0
-" Default mapping
-let g:multi_cursor_start_word_key      = '<C-n>'
-let g:multi_cursor_select_all_word_key = '<A-n>'
-let g:multi_cursor_start_key           = 'g<C-n>'
-let g:multi_cursor_select_all_key      = 'g<A-n>'
-let g:multi_cursor_next_key            = '<C-n>'
-let g:multi_cursor_prev_key            = '<C-p>'
-let g:multi_cursor_skip_key            = '<C-x>'
-let g:multi_cursor_quit_key            = '<Esc>'
-
-" ALE
-" Note pylint sucks
-" Note for javascript you need to:
-" npm install eslint --save-dev
-" ./node_modules/.bin/eslint --init
-" or for global
-" npm install -g eslint
-" eslint --init
-let g:ale_linters = {
-    \ 'cpp' : ['gcc'],
-    \ 'c' : ['gcc'],
-    \ 'vim' : ['vint'],
-    \ 'python': ['flake8', 'pyre', 'vulture', 'prospector', 'pyflakes', 'mypy', 'pyls'],
-    \ 'javascript': ['eslint']
-    \}
-
-"let g:LanguageClient_serverCommands = {
-"    \ 'javascript': ['flow-language-server', '--stdio'],
-"    \ }
-
-let g:ale_cpp_gcc_options='-Wall -Wextra'
-let g:ale_c_gcc_options='-Wall -Wextra'
-let g:ale_vim_vint_executable = 'vint'
-let g:ale_vim_vint_show_style_issues = 1
-map <leader>a :ALEToggle<CR>
-
-if !empty(glob("/usr/lib/rpm/redhat"))
-    " For RHEL
-    "let g:chromatica#libclang_path='/usr/lib64/llvm'
-    let g:python3_host_prog = 'home/$USER/.conda/envs/py37/bin/python3.6'
-    "let g:chromatica#enable_at_startup=1
-    "let g:chromatica#responsive_mode=1
-else
-    " For Debian based   
-    let g:chromatica#libclang_path='/usr/lib/llvm-6.0/lib'
-    let g:python3_host_prog = '/usr/bin/python3.6'
-    let g:chromatica#enable_at_startup=1
-    let g:chromatica#responsive_mode=1
-endif
-" Chromatica
-" FZF
-if !empty((glob("~/.fzf")))
-    set rtp+=~/.fzf
-endif
-""""""""""" FUNCTION KEYS """"""""""""""
-"TODO figure out cscope
-"TODO figure out virtualenv for neovim
-"TODO Split vim into ftp stuff rtp
-
-

+ 0 - 86
old/installer.sh

@@ -1,86 +0,0 @@
-#!/bin/sh
-# Standalone installer for Unixs
-# Original version is created by shoma2da
-# https://github.com/shoma2da/neobundle_installer
-
-if [ $# -ne 1 ]; then
-  echo "You must specify the installation directory!"
-  exit 1
-fi
-
-# Convert the installation directory to absolute path
-case $1 in
-  /*) PLUGIN_DIR=$1;;
-  *) PLUGIN_DIR=$PWD/$1;;
-esac
-INSTALL_DIR="${PLUGIN_DIR}/repos/github.com/Shougo/dein.vim"
-echo "Install to \"$INSTALL_DIR\"..."
-if [ -e "$INSTALL_DIR" ]; then
-  echo "\"$INSTALL_DIR\" already exists!"
-fi
-
-echo ""
-
-# check git command
-type git || {
-  echo 'Please install git or update your path to include the git executable!'
-  exit 1
-}
-echo ""
-
-# make plugin dir and fetch dein
-if ! [ -e "$INSTALL_DIR" ]; then
-  echo "Begin fetching dein..."
-  mkdir -p "$PLUGIN_DIR"
-  git clone https://github.com/Shougo/dein.vim "$INSTALL_DIR"
-  echo "Done."
-  echo ""
-fi
-
-# write initial setting for .vimrc
-echo "Please add the following settings for dein to the top of your vimrc (Vim) or init.vim (NeoVim) file:"
-{
-    echo ""
-    echo ""
-    echo "\"dein Scripts-----------------------------"
-    echo "if &compatible"
-    echo "  set nocompatible               \" Be iMproved"
-    echo "endif"
-    echo ""
-    echo "\" Required:"
-    echo "set runtimepath+=$INSTALL_DIR"
-    echo ""
-    echo "\" Required:"
-    echo "if dein#load_state('$PLUGIN_DIR')"
-    echo "  call dein#begin('$PLUGIN_DIR')"
-    echo ""
-    echo "  \" Let dein manage dein"
-    echo "  \" Required:"
-    echo "  call dein#add('$INSTALL_DIR')"
-    echo ""
-    echo "  \" Add or remove your plugins here like this:"
-    echo "  \"call dein#add('Shougo/neosnippet.vim')"
-    echo "  \"call dein#add('Shougo/neosnippet-snippets')"
-    echo ""
-    echo "  \" Required:"
-    echo "  call dein#end()"
-    echo "  call dein#save_state()"
-    echo "endif"
-    echo ""
-    echo "\" Required:"
-    echo "filetype plugin indent on"
-    echo "syntax enable"
-    echo ""
-    echo "\" If you want to install not installed plugins on startup."
-    echo "\"if dein#check_install()"
-    echo "\"  call dein#install()"
-    echo "\"endif"
-    echo ""
-    echo "\"End dein Scripts-------------------------"
-    echo ""
-    echo ""
-}
-
-echo "Done."
-
-echo "Complete setup dein!"

+ 0 - 23
old/setupDEB.sh

@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# installing neovim
-sudo apt install -y neovim
-
-# needed to pull installer
-sudo apt install -y curl
-
-# used for clipboard
-sudo apt install -y xsel
-
-# pesky fonts
-sudo apt install -y powerline-fonts
-
-# pul sown installer
-curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh
-
-# run installer
-sh ./installer.sh ~/.cache/dein
-
-git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
-
-~/.fzf/install

+ 0 - 2
old/setupRHEL.sh

@@ -1,2 +0,0 @@
-
-sudo yum install -y neovim