mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-16 21:03:43 +01:00
51 lines
1.8 KiB
Fennel
51 lines
1.8 KiB
Fennel
(local (mztenv dap dapui) (values (require :mzte_nv) (require :dap)
|
|
(require :dapui)))
|
|
|
|
(dapui.setup {})
|
|
|
|
(tset dap :adapters :lldb {:type :executable
|
|
;; included in lldb package
|
|
:command (mztenv.utils.findInPath :lldb-vscode)
|
|
:name :lldb})
|
|
|
|
(local configs (. dap :configurations))
|
|
|
|
;; TODO: this UI sucks
|
|
(tset configs :c [{:name :Launch
|
|
:type :lldb
|
|
:request :launch
|
|
:program #(vim.fn.input "Binary: ")
|
|
:cwd "${workspaceFolder}"
|
|
:stopOnEntry false
|
|
:args #(vim.split (vim.fn.input "Args: ") " ")
|
|
:runInTerminal true}])
|
|
|
|
(tset configs :cpp (. configs :c))
|
|
(tset configs :rust (. configs :c))
|
|
(tset configs :zig (. configs :c))
|
|
|
|
(tset configs :java [{:type :java
|
|
:request :attach
|
|
:name "Java attach"
|
|
:hostName :127.0.0.1
|
|
:port 5005}])
|
|
|
|
(let [mopt (. (require :mzte_nv) :utils :map_opt)]
|
|
(vim.keymap.set :n :fu dapui.toggle mopt)
|
|
(vim.keymap.set :n :fb dap.toggle_breakpoint mopt)
|
|
(vim.keymap.set :n :fc dap.continue mopt)
|
|
(vim.keymap.set :n :fn dap.step_over mopt)
|
|
(vim.keymap.set :n :fi dap.step_into mopt)
|
|
(vim.keymap.set :n :fo dap.step_out mopt))
|
|
|
|
;; Catppuccin compat
|
|
(let [sign vim.fn.sign_define]
|
|
(sign :DapBreakpoint {:text "●"
|
|
:texthl :DapBreakpoint
|
|
:linehl ""
|
|
:numhl ""})
|
|
(sign :DapBreakpointCondition {:text "●"
|
|
:texthl :DapBreakpointCondition
|
|
:linehl ""
|
|
:numhl ""})
|
|
(sign :DapLogPoint {:text "◆" :texthl :DapLogPoint :linehl "" :numhl ""}))
|