From 6ea4142783cbf39bbcf25b64b48e91a8f7f56484 Mon Sep 17 00:00:00 2001 From: Andrejus Date: Sun, 25 Oct 2020 21:21:44 +0000 Subject: [PATCH] nvim lsp updates, ricing --- .gitignore | 22 +- files/.bashrc | 2 + files/.config/fish/config.fish | 1 + files/.config/fish/fishfile | 2 +- files/.config/fish/functions/nvm.fish | 3 + files/.config/nvim/base.vim | 39 ++- files/.config/nvim/init.vim | 10 +- files/.config/nvim/mappings.vim | 142 +++++++--- files/.config/nvim/plugins-config.vim | 29 ++ files/.config/nvim/plugins.vim | 372 +++++++++----------------- files/.config/nvim/snippets/.gitkeep | 0 files/.profile | 2 + install/13-nvm.sh | 3 +- install/utils.sh | 1 - 14 files changed, 304 insertions(+), 324 deletions(-) create mode 100644 files/.config/fish/functions/nvm.fish create mode 100644 files/.config/nvim/plugins-config.vim delete mode 100644 files/.config/nvim/snippets/.gitkeep diff --git a/.gitignore b/.gitignore index 27748bb..396f466 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,29 @@ -# install -tmp -*.deb -logs/* +# custom functions +!files/.config/fish/functions/nvm.fish +# install artefacts +tmp +logs/* +**/*.deb + +# setup files **/plugged **/autoload **/functions **/completions **/conf.d **/fish_variables +**/gcloud +**/coc +**/configstore +**/wslu +**/TabNine +**/firebase # pytest **/__pycache__ **/.pytest_cache + +# ssh env +**/id_rsa* +**/known_hosts* diff --git a/files/.bashrc b/files/.bashrc index 61a8f6d..58dfd7c 100644 --- a/files/.bashrc +++ b/files/.bashrc @@ -1,2 +1,4 @@ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +[ -f ~/.fzf.bash ] && source ~/.fzf.bash diff --git a/files/.config/fish/config.fish b/files/.config/fish/config.fish index 19f0446..14d8d8d 100644 --- a/files/.config/fish/config.fish +++ b/files/.config/fish/config.fish @@ -9,3 +9,4 @@ end # Fish specific # ---------------------------------------------------------------------------- # set fish_greeting +base16-seti diff --git a/files/.config/fish/fishfile b/files/.config/fish/fishfile index 11a38ea..bec3d00 100644 --- a/files/.config/fish/fishfile +++ b/files/.config/fish/fishfile @@ -1,5 +1,5 @@ fishpkg/fish-prompt-mono acomagu/fish-async-prompt -b4b4r07/enhancd matchai/fish-mock edc/bass +tomyun/base16-fish diff --git a/files/.config/fish/functions/nvm.fish b/files/.config/fish/functions/nvm.fish new file mode 100644 index 0000000..90a6977 --- /dev/null +++ b/files/.config/fish/functions/nvm.fish @@ -0,0 +1,3 @@ +function nvm + bass source $NVM_DIR/nvm.sh ';' nvm $argv +end diff --git a/files/.config/nvim/base.vim b/files/.config/nvim/base.vim index b6ed172..379fcfe 100644 --- a/files/.config/nvim/base.vim +++ b/files/.config/nvim/base.vim @@ -1,16 +1,16 @@ -set fileencoding=utf-8 +" ============================================================================ " +" === EDITING OPTIONS === " +" ============================================================================ " +" default encoding +set encoding=utf-8 +set fileencoding=utf-8 set fileformat=unix filetype on filetype plugin on syntax on - -" ============================================================================ " -" === EDITING OPTIONS === " -" ============================================================================ " - -" Remap leader key to +" Leader key let g:mapleader=' ' " Yank and paste with the system clipboard @@ -19,8 +19,6 @@ set clipboard= " Hides buffers instead of closing them set hidden -set smartindent - " et = expandtab (spaces instead of tabs) " ts = tabstop (the number of spaces that a tab equates to) " sw = shiftwidth (the number of spaces to use when indenting @@ -32,10 +30,9 @@ set foldenable set foldmethod=indent set foldlevel=99 -set cursorline -set cursorcolumn +set conceallevel=1 -set nonumber +set number set relativenumber " do not wrap long lines by default @@ -44,6 +41,8 @@ set nowrap " two lines for command line set cmdheight=2 +set updatetime=300 + " ============================================================================ " " === UI === " " ============================================================================ " @@ -51,11 +50,9 @@ set cmdheight=2 " Enable true color support set termguicolors -" Change vertical split character to be a space (essentially hide it) -set fillchars+=vert:. - -" Set preview window to appear at bottom +" Set preview window to appear at bottom and right set splitbelow +set splitright " Don't dispay mode in command line (airilne already shows it) set noshowmode @@ -77,12 +74,6 @@ set ignorecase " if the search string has an upper case letter in it, the search will be case sensitive set smartcase -" Automatically re-read file if a change was detected outside of vim -set autoread - -" Enable line numbers -set number - " Enable spellcheck for markdown files autocmd BufRead,BufNewFile *.md setlocal spell @@ -95,3 +86,7 @@ endif set backupdir=$XDG_DATA_HOME/nvim/backup " Don't put backups in current dir set backup set noswapfile + +" Some servers have issues with backup files, see #649. +" set nobackup +" set nowritebackup diff --git a/files/.config/nvim/init.vim b/files/.config/nvim/init.vim index c6931fb..9bca18b 100644 --- a/files/.config/nvim/init.vim +++ b/files/.config/nvim/init.vim @@ -1,10 +1,6 @@ -if &compatible - set nocompatible -endif - -" ============================================================================ " -" === Load files === " -" ============================================================================ " source $XDG_CONFIG_HOME/nvim/base.vim + source $XDG_CONFIG_HOME/nvim/plugins.vim +source $XDG_CONFIG_HOME/nvim/plugins-config.vim + source $XDG_CONFIG_HOME/nvim/mappings.vim diff --git a/files/.config/nvim/mappings.vim b/files/.config/nvim/mappings.vim index f71ec0a..156a5b9 100644 --- a/files/.config/nvim/mappings.vim +++ b/files/.config/nvim/mappings.vim @@ -1,20 +1,36 @@ " No arrow keys -noremap -noremap -noremap -noremap +noremap +noremap +noremap +noremap inoremap inoremap inoremap inoremap -" Quick window switching -nmap h -nmap j -nmap k -nmap l -"fzf +" Quick window switching +" Ctrl-[hjkl] +nnoremap h +nnoremap j +nnoremap k +nnoremap l + + +" Distraction free typing +" l - Toggle Goyo and Limelight +nnoremap l :Goyo +autocmd! User GoyoEnter Limelight +autocmd! User GoyoLeave Limelight! + + +" fzf +" p - Search files in current workdir +" P - Search files in $HOME +" g - Search commits for current buffer +" G - Search commits in current workdir +" f - Search source in current workdir +" ; - Search buffers nnoremap p :Files nnoremap P :Files ~ nnoremap g :BCommits @@ -23,35 +39,87 @@ nnoremap f :Rg nnoremap ; :Buffers -" === Nerdtree shorcuts === " -" e - Toggle NERDTree on/off -" E - Opens current file location in NERDTree -nmap e :NERDTreeToggle -nmap E :NERDTreeFind +" NERDTree +" e - Toggle NERDTree on/off +" E - Open current file location in NERDTree +nnoremap e :NERDTreeToggle +nnoremap E :NERDTreeFind -" === coc.nvim === " -" dd - Jump to definition of current symbol -" dr - Jump to references of current symbol -" dj - Jump to implementation of current symbol -" ds - Fuzzy search current project symbols -nmap dd (coc-definition) -nmap dr (coc-references) -nmap dj (coc-implementation) -nnoremap ds :CocList -I -N --top symbols -" === vim-better-whitespace === " -" y - Automatically remove trailing whitespace -nmap y :StripWhitespace +" coc.nvim +" Ctrl-n - Go to previous diagnostic +" Ctrl-p - Go to next diagnostic +" d - Jump to definition of current symbol +" r - Jump to references of current symbol +" j - Jump to implementation of current symbol +" s - Fuzzy search current project symbols +" n - Symbol renaming +" y - Format selected code +nnoremap (coc-diagnostic-prev) +nnoremap (coc-diagnostic-next) +nnoremap d (coc-definition) +nnoremap r (coc-references) +nnoremap j (coc-implementation) +nnoremap s :CocList -I -N --top symbols +nnoremap n (coc-rename) +nnoremap y (coc-format-selected) -" === Search shorcuts === " -" h - Find and replace -" / - Claer highlighted search terms while preserving history -map h :%s/// -nmap / :nohlsearch -" === Easy-motion shortcuts ===" -" w - Easy-motion highlights first word letters bi-directionally -map w (easymotion-bd-w) +" Search shorcuts +" h - Find and replace +" / - Clear highlighted search terms while preserving history +nnoremap h :%s/// +nnoremap / :nohlsearch + + +" Easy-motion shortcut +" w - move to word bi-directionally +" W{char} - move to {char} +nnoremap w (easymotion-bd-w) +nnoremap W (easymotion-bd-f) + + + +" use for trigger completion and navigate to next complete item +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ coc#refresh() + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~ '\s' +endfunction + +" Use to trigger completion. +if has('nvim') + inoremap coc#refresh() +else + inoremap coc#refresh() +endif + +" Use K to show documentation in preview window. +nnoremap K :call show_documentation() + +function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + elseif (coc#rpc#ready()) + call CocActionAsync('doHover') + else + execute '!' . &keywordprg . " " . expand('') + endif +endfunction + +" Highlight the symbol and its references when holding the cursor. +autocmd CursorHold * silent call CocActionAsync('highlight') + +augroup mygroup + autocmd! + " Setup formatexpr specified filetype(s). + autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') + " Update signature help on jump placeholder. + autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') +augroup end + -" Allows you to save files you opened without write permissions via sudo -cmap w!! w !sudo tee % diff --git a/files/.config/nvim/plugins-config.vim b/files/.config/nvim/plugins-config.vim new file mode 100644 index 0000000..1c8e848 --- /dev/null +++ b/files/.config/nvim/plugins-config.vim @@ -0,0 +1,29 @@ +" Colourscheme +set background=dark +colorscheme base16-seti + +" Coc.nvim + +" Close preview window when completion is done. +autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif + +" Disable deprecated python2 provider +let g:loaded_python_provider = 0 + +" Call method on window enter +augroup WindowManagement + autocmd! + autocmd WinEnter * call Handle_Win_Enter() +augroup END + +" Change highlight group of preview window when open +function! Handle_Win_Enter() + if &previewwindow + setlocal winhighlight=Normal:MarkdownError + endif +endfunction + +" Reload icons after init source +if exists('g:loaded_webdevicons') + call webdevicons#refresh() +endif diff --git a/files/.config/nvim/plugins.vim b/files/.config/nvim/plugins.vim index 80e1ea1..824a5e5 100644 --- a/files/.config/nvim/plugins.vim +++ b/files/.config/nvim/plugins.vim @@ -1,29 +1,90 @@ -" ============================================================================ " -" === PLUGINS === " -" ============================================================================ " call plug#begin('~/.config/nvim/plugged') -" === Editor === " - -" Sensible (?) defaults +" sensible defaults Plug 'tpope/vim-sensible' -" colorschemes -Plug 'flazz/vim-colorschemes' +" colorscheme +Plug 'chriskempson/base16-vim' " dev icons Plug 'ryanoasis/vim-devicons' +" {{{ + let g:webdevicons_enable_nerdtree = 1 + let g:webdevicons_conceal_nerdtree_brackets = 1 -" file explorer sidebar + let g:webdevicons_enable_airline_tabline = 1 + let g:webdevicons_enable_airline_statusline = 1 + + let g:webdevicons_enable_startify = 1 +" }}} + +" explorer sidebar Plug 'scrooloose/nerdtree' Plug 'tiagofumo/vim-nerdtree-syntax-highlight' +" {{{ + " Show hidden files/directories + let g:NERDTreeShowHidden = 1 + + " Remove bookmarks and help text from NERDTree + let g:NERDTreeMinimalUI = 1 + let g:NERDTreeMinimalMenu = 1 + + " Remove icons for expandable/expanded directories + let g:NERDTreeDirArrowExpandable = '' + let g:NERDTreeDirArrowCollapsible = '' + + " Hide certain files and directories from NERDTree + let g:NERDTreeIgnore = ['\.git$[[dir]]'] +" }}} " status line Plug 'vim-airline/vim-airline' -Plug 'vim-airline/vim-airline-themes' +" {{{ + " Enable extensions + let g:airline_extensions = ['branch', 'coc', 'hunks'] -" indent guides -Plug 'nathanaelkane/vim-indent-guides' + " Do not draw separators for empty sections (only for the active window) > + let g:airline_skip_empty_sections = 1 + + " Smartly uniquify buffers names with similar filename, suppressing common parts of paths. + let g:airline#extensions#tabline#formatter = 'unique_tail_improved' + + " Custom setup that removes filetype/whitespace from default vim airline bar + " let g:airline#extensions#default#layout = [['a', 'b', 'c'], ['x', 'z', 'warning', 'error']] + + " Customize vim airline per filetype + " 'nerdtree' - Hide nerdtree status line + " 'list' - Only show file type plus current line number out of total + let g:airline_filetype_overrides = { + \ 'coc-explorer': [ 'CoC Explorer', '' ], + \ 'fugitive': ['fugitive', '%{airline#util#wrap(airline#extensions#branch#get_head(),80)}'], + \ 'help': [ 'Help', '%f' ], + \ 'startify': [ 'startify', '' ], + \ 'vim-plug': [ 'Plugins', '' ], + \ 'nerdtree': [ get(g:, 'NERDTreeStatusline', ''), '' ], + \ 'list': [ '%y', '%l/%L'], + \ } + + " Enable powerline fonts + let g:airline_powerline_fonts = 1 + + " Enable caching of syntax highlighting groups + let g:airline_highlighting_cache = 1 +" }}} + +" Print function signatures in echo area +Plug 'Shougo/echodoc.vim' +" {{{ + " Enable echodoc on startup + let g:echodoc#enable_at_startup = 1 +" }}} + +" start screen +Plug 'mhinz/vim-startify' + +" distraction-free typing +Plug 'junegunn/goyo.vim' +Plug 'junegunn/limelight.vim' " DOcumentation GEneraton Plug 'kkoomen/vim-doge' @@ -32,253 +93,62 @@ Plug 'kkoomen/vim-doge' Plug 'rstacruz/vim-closer' Plug 'tpope/vim-endwise' -" Improved motion in Vim +" better motion Plug 'easymotion/vim-easymotion' Plug 'tpope/vim-surround' - -" Snippet support -Plug 'Shougo/neosnippet' -Plug 'Shougo/neosnippet-snippets' - -" Print function signatures in echo area -Plug 'Shougo/echodoc.vim' - -" Enable git changes to be shown in sign column -Plug 'mhinz/vim-signify' -Plug 'tpope/vim-fugitive' - -" Comment out lines +Plug 'svermeulen/vim-subversive' +Plug 'godlygeek/tabular' Plug 'tpope/vim-commentary' +" git tools +Plug 'mhinz/vim-signify' +" {{{ + let g:signify_sign_delete = '-' +" }}} +Plug 'tpope/vim-fugitive' + " fzf -Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' +" {{{ + let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.9 } } + let g:fzf_preview_window = ['right:66%', 'ctrl-/'] + let g:fzf_buffers_jump = 1 + let g:fzf_commits_log_options = '--graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"' -" === Languages === " -" Intellisense Engine + let $FZF_DEFAULT_OPTS="--ansi --layout reverse --margin=1,4 --preview 'batcat --color=always --style=header,grid --line-range :300 {}'" + let $FZF_DEFAULT_COMMAND = 'rg --files --ignore-case --hidden -g "!{.git,node_modules,vendor}/*"' + command! -bang -nargs=? -complete=dir Files + \ call fzf#vim#files(, { 'options': $FZF_DEFAULT_OPTS}, 0) +" }}} + +" coc Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'} +" {{{ + " Keep in sync with below + let g:coc_global_extensions = [ + \ 'coc-css', + \ 'coc-eslint', + \ 'coc-git', + \ 'coc-html', + \ 'coc-json', + \ 'coc-prettier', + \ 'coc-python', + \ 'coc-tabnine', + \ 'coc-tsserver', + \ 'coc-yaml', + \] +" }}} +Plug 'neoclide/coc-css', {'do': 'yarn install --frozen-lockfile'} +Plug 'neoclide/coc-eslint', {'do': 'yarn install --frozen-lockfile'} +Plug 'neoclide/coc-git', {'do': 'yarn install --frozen-lockfile'} +Plug 'neoclide/coc-html', {'do': 'yarn install --frozen-lockfile'} +Plug 'neoclide/coc-json', {'do': 'yarn install --frozen-lockfile'} +Plug 'neoclide/coc-prettier', {'do': 'yarn install --frozen-lockfile'} +Plug 'neoclide/coc-python', {'do': 'yarn install --frozen-lockfile'} +Plug 'neoclide/coc-tabnine', {'do': 'yarn install --frozen-lockfile'} +Plug 'neoclide/coc-tsserver', {'do': 'yarn install --frozen-lockfile'} +Plug 'neoclide/coc-yaml', {'do': 'yarn install --frozen-lockfile'} -" lint -Plug 'dense-analysis/ale' - -" Trailing whitespace highlighting & automatic fixing -Plug 'ntpeters/vim-better-whitespace' - -" Languages -Plug 'sheerun/vim-polyglot' - -" elm -Plug 'elmcast/elm-vim' - -" json -Plug 'elzr/vim-json' - -" html -Plug 'mattn/emmet-vim' - -" js -Plug 'othree/yajs.vim' -Plug 'pangloss/vim-javascript' -Plug 'mxw/vim-jsx' - -" Python -Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'} -Plug 'Vimjas/vim-python-pep8-indent' - -" Initialize plugin system call plug#end() - - -" ============================================================================ " -" === PLUGIN SETUP === " -" ============================================================================ " - -colorscheme badwolf - -" Show hidden files/directories -let g:NERDTreeShowHidden = 1 - -" Remove bookmarks and help text from NERDTree -let g:NERDTreeMinimalUI = 1 - -" Custom icons for expandable/expanded directories -let g:NERDTreeDirArrowExpandable = '' -let g:NERDTreeDirArrowCollapsible = '' - -" Hide certain files and directories from NERDTree -let g:NERDTreeIgnore = ['\.git$[[dir]]'] - -let g:elm_setup_keybindings = 0 - -let g:ale_lint_on_text_changed = 'always' -let g:ale_lint_delay = 1000 -let g:ale_sign_error = '>>' -let g:ale_sign_warning = '--' - -" Do not display non-specified linter warnings -let g:ale_linters_explicit = 1 -let g:ale_linters = { -\ 'python': ['flake8', 'pylint'], -\ 'typescript': ['prettier', 'tslint'], -\ 'javascript': ['prettier', 'eslint'], -\ 'scss': ['prettier'], -\ 'html': ['prettier'], -\} - -let g:ale_fixers = { -\ '*': ['remove_trailing_lines', 'trim_whitespace'], -\ 'cpp': ['clang'], -\ 'css': ['prettier'], -\ 'python': ['yapf'], -\ 'typescript': ['prettier', 'tslint'], -\ 'javascript': ['prettier', 'eslint'], -\ 'scss': ['prettier'], -\ 'html': ['prettier'], -\} -let g:ale_fix_on_save = 1 - - -let g:airline_theme='badwolf' - - -" Wrap in try/catch to avoid errors on initial install before plugin is available -try -" === Coc.nvim === " -" use for trigger completion and navigate to next complete item -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~ '\s' -endfunction - -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() - -"Close preview window when completion is done. -autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif - -" Allow use of :Prettier -command! -nargs=0 Prettier :CocCommand prettier.formatFile - -call coc#config('python', { -\ 'jediEnabled': v:false, -\ 'venvPath': '~/.cache/pypoetry/virtualenvs' -\ }) - -" Disable deprecated python2 provider -let g:loaded_python_provider = 0 - -" === NeoSnippet === " -" Map as shortcut to activate snippet if available -imap (neosnippet_expand_or_jump) -smap (neosnippet_expand_or_jump) -xmap (neosnippet_expand_target) - -" Load custom snippets from snippets folder -let g:neosnippet#snippets_directory='~/.config/nvim/snippets' - -let g:neosnippet#enable_conceal_markers = 0 - -" === Vim airline ==== " -" Enable extensions -let g:airline_extensions = ['branch', 'hunks', 'coc'] - -" Update section z to just have line number -let g:airline_section_z = airline#section#create(['linenr']) - -" Do not draw separators for empty sections (only for the active window) > -let g:airline_skip_empty_sections = 1 - -" Smartly uniquify buffers names with similar filename, suppressing common parts of paths. -let g:airline#extensions#tabline#formatter = 'unique_tail' - -" Custom setup that removes filetype/whitespace from default vim airline bar -let g:airline#extensions#default#layout = [['a', 'b', 'c'], ['x', 'z', 'warning', 'error']] - -" Customize vim airline per filetype -" 'nerdtree' - Hide nerdtree status line -" 'list' - Only show file type plus current line number out of total -let g:airline_filetype_overrides = { - \ 'nerdtree': [ get(g:, 'NERDTreeStatusline', ''), '' ], - \ 'list': [ '%y', '%l/%L'], - \ } - -" Enable powerline fonts -let g:airline_powerline_fonts = 1 - -" Enable caching of syntax highlighting groups -let g:airline_highlighting_cache = 1 - -" Define custom airline symbols -if !exists('g:airline_symbols') - let g:airline_symbols = {} -endif - -" Don't show git changes to current file in airline -let g:airline#extensions#hunks#enabled=0 - -catch - echo 'Airline not installed. It should work after running :PlugInstall' -endtry - -" === echodoc === " -" Enable echodoc on startup -let g:echodoc#enable_at_startup = 1 - -" === vim-javascript === " -" Enable syntax highlighting for JSDoc -let g:javascript_plugin_jsdoc = 1 - -" === vim-jsx === " -" Highlight jsx syntax even in non .jsx files -let g:jsx_ext_required = 0 - -" === javascript-libraries-syntax === " -let g:used_javascript_libs = 'underscore,requirejs,chai,jquery' - -" === Signify === " -let g:signify_sign_delete = '-' - -" Fzf -let g:fzf_preview_window = 'right:60%' -let g:fzf_buffers_jump = 1 -let g:fzf_commits_log_options = '--graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"' -let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.9 } } - -let $FZF_DEFAULT_OPTS="--ansi --preview-window 'right:60%' --layout reverse --margin=1,4 --preview 'batcat --color=always --style=header,grid --line-range :300 {}'" -let $FZF_DEFAULT_COMMAND = 'rg --files --ignore-case --hidden -g "!{.git,node_modules,vendor}/*"' -command! -bang -nargs=? -complete=dir Files - \ call fzf#vim#files(, fzf#vim#with_preview(), 0) - - -" Call method on window enter -augroup WindowManagement - autocmd! - autocmd WinEnter * call Handle_Win_Enter() -augroup END - -" Change highlight group of preview window when open -function! Handle_Win_Enter() - if &previewwindow - setlocal winhighlight=Normal:MarkdownError - endif -endfunction - - -" Reload icons after init source -if exists('g:loaded_webdevicons') - call webdevicons#refresh() -endif - -let g:indent_guides_enable_on_vim_startup = 1 -let g:indent_guides_start_level = 2 -let g:indent_guides_guide_size = 1 - -let g:user_emmet_leader_key='' -let g:user_emmet_settings = { - \ 'javascript.jsx' : { - \ 'extends' : 'jsx', - \ }, - \} diff --git a/files/.config/nvim/snippets/.gitkeep b/files/.config/nvim/snippets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/files/.profile b/files/.profile index 227452a..6bee43a 100644 --- a/files/.profile +++ b/files/.profile @@ -46,3 +46,5 @@ if [ -z "$PROFILE_LOCK" ]; then export PATH="$YARN_DIR/bin:$PATH" fi + +alias vim='nvim' diff --git a/install/13-nvm.sh b/install/13-nvm.sh index 1d05117..bcdbf8a 100755 --- a/install/13-nvm.sh +++ b/install/13-nvm.sh @@ -7,7 +7,8 @@ if not_installed "nvm"; then printf "Installing nvm...\n" # Install nvm - run "https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh" \ + mkdir -p $NVM_DIR + run "https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh" \ "bash" source "$NVM_DIR/nvm.sh" nvm alias default node diff --git a/install/utils.sh b/install/utils.sh index cc7b5a8..8a15314 100755 --- a/install/utils.sh +++ b/install/utils.sh @@ -85,7 +85,6 @@ export -f clean update upgrade install install_file add_ppa add_key run \ # ---------------------------------------------------------------------------- # # Shell colours # ---------------------------------------------------------------------------- # - C_BLACK='\033[0;30m' C_DGRAY='\033[1;30m' C_RED='\033[0;31m'