Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redraw issues #299

Open
ootoovak opened this issue Sep 22, 2016 · 3 comments
Open

Redraw issues #299

ootoovak opened this issue Sep 22, 2016 · 3 comments

Comments

@ootoovak
Copy link

OSX 10.11.6
neovim-dot-app-HEAD-68cf699

Sometimes when Neovim is open (editing Ruby, ERB templates, and terminals running servers) the tab with the Ruby code becomes unresponsive. Even once it becomes (semi-)responsive again the redraw is often laggy or broken completely.

init.vim file if any of these plugins or settings might be causing the issue:

call plug#begin('~/.config/nvim/plugged')

" Some comunity Vim defaults
Plug 'tpope/vim-sensible'

" Add nicer terminal buffer keybindings
Plug 'mklabs/split-term.vim'

" A file and folder explorer
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }

" Show Git statuses in the nerdtree file explorer
Plug 'Xuyuanp/nerdtree-git-plugin'

" For code autocompletion
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }

" A command line fuzzy string matcher
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'

" A status-line plugin
Plug 'itchyny/lightline.vim'

" A colour theme
Plug 'MaxSt/FlatColor'

" Highlight trailing whitespace
Plug 'ntpeters/vim-better-whitespace'

" Show changes that Git tracks in the vim lefthand gutter
Plug 'airblade/vim-gitgutter'

" Elm language plugin
Plug 'ElmCast/elm-vim'

" Elixir language plugins
Plug 'elixir-lang/vim-elixir' | Plug 'slashmili/alchemist.vim'

" Add Git commands
Plug 'tpope/vim-fugitive'

" Add the end keyword automatically in Ruby
Plug 'tpope/vim-endwise'

call plug#end()


" >----- split-term.vim -----

" Allow hitting <Esc> to switch to normal mode
tnoremap <Esc> <C-\><C-n>

tnoremap <A-h> <C-\><C-n><C-w>h
tnoremap <A-j> <C-\><C-n><C-w>j
tnoremap <A-k> <C-\><C-n><C-w>k
tnoremap <A-l> <C-\><C-n><C-w>l
nnoremap <A-h> <C-w>h
nnoremap <A-j> <C-w>j
nnoremap <A-k> <C-w>k
nnoremap <A-l> <C-w>l

noremap <leader>th :Term<cr>
noremap <leader>tv :VTerm<cr>

set splitright
set splitbelow

" <----- split-term.vim -----


" >----- fzf -----

" Make it show up the same way as Ctl-P
nnoremap <c-p> :FZF<cr>

" <----- fzf -----


" >----- elm-vim -----

" Format Elm code automatically on save
let g:elm_format_autosave = 1

" <----- elm-vim -----


" >----- FlatColor -----

" Enable true colours
let $NVIM_TUI_ENABLE_TRUE_COLOR=1

" Use the same colour scheme with the lightline.vim plugin
let g:lightline = { 'colorscheme': 'flatcolor' }

" Use the flat color theme
colorscheme flatcolor

" <----- FlatColor -----


" >----- nerdtree -----

" Open up the folder drawer
map <C-n> :NERDTreeToggle<CR>

" Also allow using a leader n to open the drawer
noremap <leader>n :NERDTreeToggle<cr>

" Quit vim if only the drawer is left open
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

" <----- nerdtree -----


" >----- deoplete.nvim -----

" Turn on deoplete at startup
let g:deoplete#enable_at_startup = 1

" Auto select the first result, then Enter to autocomplete
set completeopt+=noinsert

" <----- deoplete.nvim -----


" >----- GENERAL -----

" Change the key that starts Vim commands
let mapleader = "\<Space>"

" Save a file easly
nnoremap <Leader>w :w<CR>

" Split Vim vertically or horizontally with the greatest of ease
noremap <leader>v :vsp<cr>
noremap <leader>h :sp<cr>

set number              " Show the line numbers on the left side.
set showmatch           " Show matching brackets.
set expandtab           " Insert spaces when TAB is pressed.
set tabstop=2           " Render TABs using this many spaces.
set shiftwidth=2        " Indentation amount for < and > commands.

" Show a line indicator at 120 characters width
set colorcolumn=120
highlight ColorColumn ctermbg=0 guibg=grey

" Use a custom cursor color in terminal mode
highlight TermCursor ctermfg=green guifg=green

" Add true colours in the terminal
set termguicolors

" Make those debugger statements painfully obvious
au BufEnter *.rb syn match error contained "\<puts\>"
au BufEnter *.rb syn match error contained "\<save_and_open_page\>"
au BufEnter *.rb syn match error contained "\<binding.pry\>"
au BufEnter *.rb syn match error contained "\<debugger\>"
au BufEnter *.js syn match error contained "\<console\>"
au BufEnter *.js syn match error contained "\<debugger\>"

" <----- GENERAL ——
@ootoovak
Copy link
Author

Using FZF can sometimes cause redraw issues as well.

@ootoovak
Copy link
Author

Caught this in my Console logs during some redraw (and UI responsiveness issues):

26/09/16 12:04:37.757 PM Neovim[392]: *** -[__NSCFString stringByAppendingString:]: nil argument
26/09/16 12:04:37.760 PM Neovim[392]: (
    0   CoreFoundation                      0x00007fff8d0704f2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff8c26af7e objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff8d0d74bd +[NSException raise:format:] + 205
    3   Foundation                          0x00007fff97d2bfc7 -[NSString stringByAppendingString:] + 96
    4   Neovim                              0x000000010e522c16 -[VimView(Redraw) doAction:withItem:] + 2134
    5   Neovim                              0x000000010e52231a -[VimView(Redraw) redraw:] + 634
    6   Neovim                              0x000000010e531923 -[VimWindow notified:withData:] + 227
    7   Neovim                              0x000000010e534b01 -[VimWindow handleEvent:] + 593
    8   Foundation                          0x00007fff97d6efde __NSThreadPerformPerform + 279
    9   CoreFoundation                      0x00007fff8d005881 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    10  CoreFoundation                      0x00007fff8cfe4fbc __CFRunLoopDoSources0 + 556
    11  CoreFoundation                      0x00007fff8cfe44df __CFRunLoopRun + 927
    12  CoreFoundation                      0x00007fff8cfe3ed8 CFRunLoopRunSpecific + 296
    13  HIToolbox                           0x00007fff9211a935 RunCurrentEventLoopInMode + 235
    14  HIToolbox                           0x00007fff9211a76f ReceiveNextEventCommon + 432
    15  HIToolbox                           0x00007fff9211a5af _BlockUntilNextEventMatchingListInModeWithFilter + 71
    16  AppKit                              0x00007fff9af9cdf6 _DPSNextEvent + 1067
    17  AppKit                              0x00007fff9af9c226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
    18  AppKit                              0x00007fff9af90d80 -[NSApplication run] + 682
    19  Neovim                              0x000000010e51619a main + 186
    20  libdyld.dylib                       0x00007fff9fea75ad start + 1
)

@fsegouin
Copy link

Same issue here.. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants