From 04bf501caa40e7db649d8bb6ee02d8f69c127467 Mon Sep 17 00:00:00 2001 From: Proctor Date: Mon, 16 Jan 2023 13:16:29 -0600 Subject: [PATCH] nvim - Set diffopt to be patience algorithm --- nvim/.config/nvim/fnl/dotfiles/core.fnl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nvim/.config/nvim/fnl/dotfiles/core.fnl b/nvim/.config/nvim/fnl/dotfiles/core.fnl index 3e4a35f..ec72c3f 100644 --- a/nvim/.config/nvim/fnl/dotfiles/core.fnl +++ b/nvim/.config/nvim/fnl/dotfiles/core.fnl @@ -83,14 +83,22 @@ :wildmode "list:longest,list:full" :wrap false}) +(def- append-val-opts {:diffopt "algorithm:patience"}) + (defn- set-opt [[opt val]] (tset vim.opt (a.str opt) val)) +(defn- set-opt+ [[opt val]] + (let [existing-opt-val (a.get nvim.o opt)] + (tset vim.opt (a.str opt) (a.str existing-opt-val "," val)))) + (defn- set-opt-on [opt] (set-opt [opt true])) (a.map set-opt-on on-opts) (a.map-indexed set-opt val-based-opts) +(a.map-indexed set-opt+ append-val-opts) + (nvim.ex.syntax :on) ;; (nvim.ex.colorscheme :soluarized) (nvim.ex.colorscheme :solarized8)