From 6d4fabdb32917694c8b9e7e13d14faef12c88e1d Mon Sep 17 00:00:00 2001 From: Ke Date: Sun, 15 Sep 2024 16:08:50 -0700 Subject: [PATCH 1/2] fix cp -r in makefile for macos. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e7514247..f7b30c62 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ deps: rm -rf lua/nfnl fnl/nfnl cp -r deps/nfnl/lua/nfnl lua/nfnl mkdir -p fnl/nfnl - cp deps/nfnl/fnl/nfnl/macros* -r fnl/nfnl + cp -r deps/nfnl/fnl/nfnl/macros* fnl/nfnl sponsors: echo "[ ;; Generated by: make sponsors" > fnl/conjure/sponsors.fnl From c3fbeb3caece9376037c795fb80d47b5f0d85d36 Mon Sep 17 00:00:00 2001 From: Ke Date: Sun, 15 Sep 2024 16:07:11 -0700 Subject: [PATCH 2/2] allow def_word jump to java source. --- fnl/conjure/client/clojure/nrepl/action.fnl | 13 +++++++------ lua/conjure/client/clojure/nrepl/action.lua | 10 +++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/fnl/conjure/client/clojure/nrepl/action.fnl b/fnl/conjure/client/clojure/nrepl/action.fnl index 97b9a8b7..bed3b56c 100644 --- a/fnl/conjure/client/clojure/nrepl/action.fnl +++ b/fnl/conjure/client/clojure/nrepl/action.fnl @@ -210,6 +210,13 @@ ["; Multiple candidates found"] (a.map #(.. $1 "/" opts.code) (a.keys info.candidates)))) + (and info.file info.line) + (let [column (or info.column 1) + path (nrepl->nvim-path info.file)] + (editor.go-to path info.line column) + (log.append [(.. "; " path " [" info.line " " column "]")] + {:suppress-hud? true})) + info.javadoc (log.append ["; Can't open source, it's Java" (.. "; " info.javadoc)]) @@ -218,12 +225,6 @@ (log.append ["; Can't open source, it's a special form" (when info.url (.. "; " info.url))]) - (and info.file info.line) - (let [column (or info.column 1) - path (nrepl->nvim-path info.file)] - (editor.go-to path info.line column) - (log.append [(.. "; " path " [" info.line " " column "]")] - {:suppress-hud? true})) (log.append ["; Unsupported target" (.. "; " (a.pr-str info))]))))))) diff --git a/lua/conjure/client/clojure/nrepl/action.lua b/lua/conjure/client/clojure/nrepl/action.lua index c85439b0..9dd9abc6 100644 --- a/lua/conjure/client/clojure/nrepl/action.lua +++ b/lua/conjure/client/clojure/nrepl/action.lua @@ -273,6 +273,11 @@ local function def_str(opts) return (_241 .. "/" .. opts.code) end return log.append(a.concat({"; Multiple candidates found"}, a.map(_54_, a.keys(info.candidates)))) + elseif (info.file and info.line) then + local column = (info.column or 1) + local path = nrepl__3envim_path(info.file) + editor["go-to"](path, info.line, column) + return log.append({("; " .. path .. " [" .. info.line .. " " .. column .. "]")}, {["suppress-hud?"] = true}) elseif info.javadoc then return log.append({"; Can't open source, it's Java", ("; " .. info.javadoc)}) elseif info["special-form"] then @@ -284,11 +289,6 @@ local function def_str(opts) end end return log.append({"; Can't open source, it's a special form", _55_()}) - elseif (info.file and info.line) then - local column = (info.column or 1) - local path = nrepl__3envim_path(info.file) - editor["go-to"](path, info.line, column) - return log.append({("; " .. path .. " [" .. info.line .. " " .. column .. "]")}, {["suppress-hud?"] = true}) else return log.append({"; Unsupported target", ("; " .. a["pr-str"](info))}) end