nvim-parinfer.js icon indicating copy to clipboard operation
nvim-parinfer.js copied to clipboard

Running vim-fugitive Gdiff causes Parinfer to run

Open BerkeleyTrue opened this issue 9 years ago • 3 comments

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.

BerkeleyTrue avatar Dec 18 '16 23:12 BerkeleyTrue

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.

snoe avatar Feb 15 '17 04:02 snoe

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 avatar Jun 12 '17 10:06 SevereOverfl0w

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

SevereOverfl0w avatar Jun 12 '17 10:06 SevereOverfl0w