From 83a7f3505a441f1c152229d50a3d6011951a82fc Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Thu, 16 Apr 2026 14:55:11 +0200 Subject: Update --- fnl/config.fnl | 6 +++++- fnl/plugins/compile-mode.fnl | 20 ++++++++++++++++++++ fnl/plugins/leap.fnl | 1 + fnl/settings/autocmds.fnl | 6 +++++- fnl/settings/keymaps.fnl | 2 ++ fnl/settings/options.fnl | 2 +- 6 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 fnl/plugins/compile-mode.fnl (limited to 'fnl') diff --git a/fnl/config.fnl b/fnl/config.fnl index cf50b2f..478bae2 100644 --- a/fnl/config.fnl +++ b/fnl/config.fnl @@ -7,12 +7,16 @@ (local {: apply-to-files} (require :util.load)) +(local api (require :hotpot.api)) +(local context (assert (api.context (vim.fn.stdpath :config)))) + (local opts {:install {:colorscheme [:no-clown-fiesta]} :debug false :defaults {:lazy false} :dev {:path (.. (vim.fn.expand :$HOME) :/projects)} :performance {:cache {:enabled true} - :rtp {:disabled_plugins [:gzip + :rtp {:paths [(context.locate :destination)] + :disabled_plugins [:gzip :matchit :netrwPlugin :tarPlugin diff --git a/fnl/plugins/compile-mode.fnl b/fnl/plugins/compile-mode.fnl new file mode 100644 index 0000000..b8d9c53 --- /dev/null +++ b/fnl/plugins/compile-mode.fnl @@ -0,0 +1,20 @@ +(local keys + [{1 : 2 :Compile :desc :Compile} + {1 : 2 :Recompile :desc :Recompile} + {1 "]e" 2 :NextError :desc "Next compile error"} + {1 "[e" 2 :PrevError :desc "Prev compile error"}]) + +(λ config [] + (set vim.g.compile_mode {:default_command {:ocaml "dune build"} + :bang_expansion true + :recompile_no_fail true + :auto_jump_to_first_error false + :ask_about_save true + :ask_to_interrupt true + :auto_scroll true})) + +{1 :ej-shafran/compile-mode.nvim + :version :^5.0.0 + :dependencies [:nvim-lua/plenary.nvim] + : config + : keys} diff --git a/fnl/plugins/leap.fnl b/fnl/plugins/leap.fnl index 3c846c5..397b873 100644 --- a/fnl/plugins/leap.fnl +++ b/fnl/plugins/leap.fnl @@ -40,6 +40,7 @@ (vim.keymap.set [:n] :gs "(leap-from-window)"))) {:url "https://codeberg.org/andyg/leap.nvim" +:name :leap.nvim : dependencies :event :VeryLazy : config} diff --git a/fnl/settings/autocmds.fnl b/fnl/settings/autocmds.fnl index b2a065c..9b5eac5 100644 --- a/fnl/settings/autocmds.fnl +++ b/fnl/settings/autocmds.fnl @@ -12,7 +12,11 @@ [:FileType {:pattern [:gitcommit :markdown] :command "setlocal wrap"}] [:VimResized {:command "tabdo wincmd ="}] - [[:FocusGained :BufEnter] {:command :checktime}] + [[:FocusGained :BufEnter :CursorHold :CursorHoldI] + {:pattern "*" + :callback (fn [] + (when (= (vim.fn.mode) :n) + (vim.cmd :checktime)))}] [[:InsertLeave :WinEnter] {:callback (λ [] (let [cursorline (require :settings.cursorline)] diff --git a/fnl/settings/keymaps.fnl b/fnl/settings/keymaps.fnl index aa32316..14cd160 100644 --- a/fnl/settings/keymaps.fnl +++ b/fnl/settings/keymaps.fnl @@ -33,6 +33,8 @@ [:n : :zz {}] ;; Remove highlighted search [:n : :nohlsearch {}] + ;; jump to eol in insert mode + [:i : :$ {}] ;; Force refresh [:n :mj ":e" {:desc :Refresh}]]) diff --git a/fnl/settings/options.fnl b/fnl/settings/options.fnl index c72d415..e7ece5f 100644 --- a/fnl/settings/options.fnl +++ b/fnl/settings/options.fnl @@ -43,7 +43,7 @@ ;; enable persistent undo :undofile true ;; faster completion (4000ms default) - :updatetime 100 + :updatetime 1000 ;; if a file is being edited by another program (or was written ;; to file while editing with another program), it is not allowed ;; to be edited -- cgit v1.2.3-70-g09d2