scrooloose / vim-slumlord

Inline previews for Plantuml sequence diagrams. OMG!
Do What The F*ck You Want To Public License
456 stars 35 forks source link

Error when exiting insert mode in neovim #5

Closed Jacoby6000 closed 7 years ago

Jacoby6000 commented 7 years ago

When updating a diagram in neovim, I see

Error detected while processing function slumlord#updatePreview[6]..<SNR>152_mungeDiagramInTmpFile[2]..<SNR>152_convertNonAsciiSupportedSyntax:
line    3:
E37: No write since last change (add ! to override)

This happens every time I make a change in insert mode and then it escape to return to normal mode.

My full neovim config can be found at https://github.com/jacoby6000/my-vimrc

The diagram causing this issue is

@startuml
title General CRUD Application Architecture
-> WebService : JSON
WebService -> WebService : JSON => FooRequest
WebService -> Validation : FooRequest => ValidationFailures Ior ValidatedFoo
Validation -> WebService : ValidationFailures Ior ValidatedFoo
alt case Ior.Right(validated) || (Ior.Both(_, validated) && ignoreWarnings == "true")
        WebService -> Application : ValidatedFoo
        group Business logic
                Application -> Application : ValidatedFoo => ProcessedFoo[1]
                loop until request has been processed in to a response
                        Application -> Database : ProcessedFoo[N].bar => DBRequest[N]
                        Database -> Database : DBRequest[N] => DBResponse[N]
                        Database -> Application : DBResponse[N]
                        Application -> Application : DBResponse[N] => ProcessedFoo[++N]
                end
        end
        Application -> WebService : ProcessedFoo[N] => Task[Response]
        <- WebService : Task[Response]
else case Ior.Left[ValidationFailures]
        Validation -> WebService : Task[ValidationFailures]
        <- WebService : Task[ValidationFailures]
else case Ior.Both[ValidationFailures, _] && ignoreWarnings == "false"
        Validation -> WebService : Task[ValidationFailures]
        <- WebService : Task[ValidationFailures]
end
@enduml

Neovim Version Info

NVIM 0.1.7
Build type: RelWithDebInfo
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim-20170405-51138-v8gyiq/neovim-0.1.7/build/config -I/tmp/neovim-20170405-51138-v8gyiq/neovim-0.1.7/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/usr/include -I/tmp/neovim-20170405-51138-v8gyiq/neovim-0.1.7/build/src/nvim/auto -I/tmp/neovim-20170405-51138-v8gyiq/neovim-0.1.7/build/include
Compiled by jacob.barber@Jacobs-MacBook-Pro.local

Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.1.7/share/nvim"

Plant UML Version Info

Version: 1.2017.13
Loaded from jar:file:/usr/local/Cellar/plantuml/1.2017.13/libexec/plantuml.jar!/  
The environment variable GRAPHVIZ_DOT has been set to /usr/local/opt/graphviz/bin/dot 
Dot executable is /usr/local/opt/graphviz/bin/dot 
Dot version: dot - graphviz version 2.40.1 (20161225.0304)
thomasnaudin commented 7 years ago

Same problem here. Neovim 0.2.0 on Fedora 25.

My vim config :

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

Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'

" Tmux & Prompt Airline integration
Plug 'edkolev/tmuxline.vim'
Plug 'edkolev/promptline.vim'

" Colorscheme
Plug 'baskerville/bubblegum'

" Fuzzy file loader
Plug 'ctrlpvim/ctrlp.vim'

" Comment / uncomment lines
Plug 'tpope/vim-commentary'

Plug 'Raimondi/delimitMate'

Plug 'rust-lang/rust.vim'

Plug 'lervag/vimtex'

Plug 'mattn/emmet-vim'

Plug 'racer-rust/vim-racer'

Plug 'elmcast/elm-vim'

Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'

" PlantUML plugins
Plug 'aklt/plantuml-syntax'
Plug 'scrooloose/vim-slumlord'

call plug#end()

colorscheme bubblegum-256-dark 

" Map the leader key to ','
let mapleader="<,>"

set expandtab
set tabstop=4
set shiftwidth=4
set number
set cursorline

set noerrorbells

let g:airline_powerline_fonts = 1
let g:airline_theme= 'bubblegum'

let g:elm_format_autosave = 1

set clipboard+=unnamedplus

map <F8> :NERDTreeToggle<CR>

let $RUST_SRC_PATH="/home/thomas/opt/rustc/src/"
scrooloose commented 7 years ago

I think this problem should have disappeared now.

Slumlord was updating the diagram when the user leaves insert mode. I have removed this as I've found it buggy and more annoying than helpful. It looks like this feature is what was causing the errors above, but let me know if otherwise.