about summary refs log tree commit diff
path: root/fnl/nvrc/packs
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/nvrc/packs')
-rw-r--r--fnl/nvrc/packs/dap.fnl22
-rw-r--r--fnl/nvrc/packs/rust.fnl7
2 files changed, 29 insertions, 0 deletions
diff --git a/fnl/nvrc/packs/dap.fnl b/fnl/nvrc/packs/dap.fnl
new file mode 100644
index 0000000..b17f7a3
--- /dev/null
+++ b/fnl/nvrc/packs/dap.fnl
@@ -0,0 +1,22 @@
+(local dap (require :dap))
+
+(set dap.adapters.lldb {:type :executable
+                    :command "/home/zach/.nix-profile/bin/lldb-vscode"
+                    :name :lldb})
+
+(set dap.configurations.cpp [{:name :Launch
+                         :type :lldb
+                         :request :launch
+                         :program (fn []
+                  (vim.fn.input "Path to executable: " (.. (vim.fn.getcwd) "/")
+                                :file))
+                         :cwd "${workspaceFolder}"
+                         :stopOnEntry false
+                         :args {}
+                         :runInTerminal false
+                         :postRunCommands ["process handle -p true -s false -n false SIGWINCH"]}])
+
+(set dap.configurations.c dap.configurations.cpp)
+(set dap.configurations.rust dap.configurations.cpp)
+
+(vim.fn.sign_define :DapStopped {:text :>})
diff --git a/fnl/nvrc/packs/rust.fnl b/fnl/nvrc/packs/rust.fnl
new file mode 100644
index 0000000..90024b8
--- /dev/null
+++ b/fnl/nvrc/packs/rust.fnl
@@ -0,0 +1,7 @@
+(local {: setup} (require :rust-tools))
+
+(let [rust-tools-dap (require :rust-tools.dap)
+      extension-path (.. (os.getenv :HOME) "/.codelldb/share/vscode/extensions/vadimcn.vscode-lldb/")
+      codelldb-path (.. extension-path "adapter/codelldb")
+      liblldb-path (.. extension-path "lldb/lib/liblldb.so")]
+  (setup {:dap {:adapter (rust-tools-dap.get_codelldb_adapter codelldb-path liblldb-path)}}))