clojure-vim / nvim-parinfer.js

neovim plugin for parinfer
https://shaunlebron.github.io/parinfer
108 stars 11 forks source link

Running vim-fugitive Gdiff causes Parinfer to run #31

Open BerkeleyTrue opened 7 years ago

BerkeleyTrue commented 7 years ago

When first opening a cljs file it looks like indentparen is run. Subsequently running :Gdiff to view the changes in the file also runs the same process on the new buffer created by fugitive rending the Gdiff function useless.

snoe commented 7 years ago

Unfortunately indentparen really has to be run or far worse things happen in files with wrong indentation. Is there a better way to tell the difference between a "real" clojure buffer and Gdiffs? There's a very good chance I'm doing something wrong in plugin.vim as I'm in no way a viml pro.

SevereOverfl0w commented 7 years ago

Is there a way to turn off indentparen for a buffer? My mind goes to an aucmd that Parinfer triggers before running indentparen, which would give the oppurtunity to do let b:parinfer_mode='off' (assuming that parinfer mode off disables indentparen also!)

It's perhaps useful to use b:parinfer_mode too, as it would allow per-buffer settings for parinfer mode.

SevereOverfl0w commented 7 years ago

https://github.com/clojure-vim/nvim-parinfer.js/blob/2853f47c997b14f7e761141ebfc1cfa58f7e7886/plugin/parinfer.vim#L30 it doesn't run if parinfer mode is off globally this would allow a workaround to be written. b:parinfer_mode would be a nice feature to enable this though