Start setting up codelldb stuff

This commit is contained in:
elkowar 2021-10-08 15:01:46 +02:00
parent 67c77d5155
commit 14fb0f7536
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
3 changed files with 30 additions and 43 deletions

View file

@ -5,11 +5,8 @@
(defn [use stuff rest] (defn- safe-req-conf [name]
(use (a.assoc rest 1 stuff))) "safely require a plugins configuration module, prepending 'dots.plugins.' to the given module name"
(defn- safe-require-plugin-config [name]
(let [(ok? val-or-err) (pcall require (.. "dots.plugins." name))] (let [(ok? val-or-err) (pcall require (.. "dots.plugins." name))]
(when (not ok?) (when (not ok?)
(print (.. "Plugin config error: " val-or-err))))) (print (.. "Plugin config error: " val-or-err)))))
@ -21,7 +18,7 @@
(for [i 1 (a.count pkgs) 2] (for [i 1 (a.count pkgs) 2]
(let [name (. pkgs i) (let [name (. pkgs i)
opts (. pkgs (+ i 1))] opts (. pkgs (+ i 1))]
(-?> (. opts :mod) (safe-require-plugin-config)) (-?> (. opts :mod) (safe-req-conf))
(use (a.assoc opts 1 name)))))))) (use (a.assoc opts 1 name))))))))
@ -38,37 +35,34 @@
:folke/persistence.nvim {:opt false :config #(require "dots.plugins.persistence")} :folke/persistence.nvim {:opt false :config #(require "dots.plugins.persistence")}
:folke/zen-mode.nvim {:cmd ["ZenMode"] :folke/zen-mode.nvim {:cmd ["ZenMode"]
:opt false :config #(require "dots.plugins.zen-mode")} :config #(require "dots.plugins.zen-mode")}
:folke/twilight.nvim {:opt false :config #(require "dots.plugins.twilight")} :folke/twilight.nvim {:config #(require "dots.plugins.twilight")}
:TimUntersberger/neogit {:opt false :config #(require "dots.plugins.neogit") :TimUntersberger/neogit {:config #(require "dots.plugins.neogit")
:cmd ["Neogit"]} :cmd ["Neogit"]}
:lifepillar/vim-gruvbox8 {:opt false :lifepillar/vim-gruvbox8 {:opt false
:config :config
#(do (set vim.g.gruvbox_italics 0) (fn []
(set vim.g.gruvbox_italicise_strings 0) (set vim.g.gruvbox_italics 0)
(set vim.g.gruvbox_filetype_hi_groups 1) (set vim.g.gruvbox_italicise_strings 0)
(set vim.g.gruvbox_plugin_hi_groups 1) (set vim.g.gruvbox_filetype_hi_groups 1)
(vim.cmd "colorscheme gruvbox8") (set vim.g.gruvbox_plugin_hi_groups 1)
((. (require :dots.utils) :highlight) :SignColumn {:bg (. (require :dots.colors) :dark0)}))} (vim.cmd "colorscheme gruvbox8")
((. (require :dots.utils) :highlight) :SignColumn {:bg (. (require :dots.colors) :dark0)}))}
;(req dots.utils.highlight :SignColumn {:bg (. (require :dots.colors) :dark0)}))} ;(req dots.utils.highlight :SignColumn {:bg (. (require :dots.colors) :dark0)}))}
;(req dots.utils.highlight :LspDiagnosticsUnderlineError {:gui "underline"}))} ;(req dots.utils.highlight :LspDiagnosticsUnderlineError {:gui "underline"}))}
:nvim-telescope/telescope.nvim {:opt false :config #(require "dots.plugins.telescope") :nvim-telescope/telescope.nvim {:config #(require "dots.plugins.telescope")
:cmd ["Telescope"] :cmd ["Telescope"]
:requires [:nvim-lua/popup.nvim :requires [:nvim-lua/popup.nvim
:nvim-lua/plenary.nvim]} :nvim-lua/plenary.nvim]}
:nvim-telescope/telescope-packer.nvim {} :nvim-telescope/telescope-packer.nvim {}
:nvim-telescope/telescope-frecency.nvim {:requires [:tami5/sql.nvim]
:opt false}
;:opt false :config #((. (require :telescope) :load_extension) "frecency")}
@ -76,7 +70,7 @@
:kyazdani42/nvim-web-devicons {} :kyazdani42/nvim-web-devicons {}
:nvim-treesitter/nvim-treesitter {:opt false :config #(require "dots.plugins.treesitter") :nvim-treesitter/nvim-treesitter {:config #(require "dots.plugins.treesitter")
:event ["BufEnter"] :event ["BufEnter"]
:run ":TSUpdate"} :run ":TSUpdate"}
@ -98,7 +92,7 @@
:akinsho/nvim-bufferline.lua {:opt false :config #(require "dots.plugins.bufferline")} :akinsho/nvim-bufferline.lua {:opt false :config #(require "dots.plugins.bufferline")}
:sindrets/diffview.nvim {:cmd ["DiffviewOpen" "DiffviewToggleFiles"] :sindrets/diffview.nvim {:cmd ["DiffviewOpen" "DiffviewToggleFiles"]
:opt false :config #(require "dots.plugins.diffview")} :config #(require "dots.plugins.diffview")}
:tweekmonster/startuptime.vim {:cmd ["StartupTime"]} :tweekmonster/startuptime.vim {:cmd ["StartupTime"]}
@ -106,7 +100,8 @@
:lewis6991/gitsigns.nvim {:after ["vim-gruvbox8"] :lewis6991/gitsigns.nvim {:after ["vim-gruvbox8"]
:opt false :config #(require "dots.plugins.gitsigns")} :opt false
:config #(require "dots.plugins.gitsigns")}
@ -133,16 +128,13 @@
:rcarriga/nvim-dap-ui {:opt false :rcarriga/nvim-dap-ui {:opt false
:opt false :config #((. (require :dapui) :setup)) :config #((. (require :dapui) :setup))
;:opt false :config #(req dapui.setup)
:requires [:mfussenegger/nvim-dap]} :requires [:mfussenegger/nvim-dap]}
:mfussenegger/nvim-dap {:opt false} :mfussenegger/nvim-dap {:opt false :config #(require "dots.plugins.nvim-dap")}
;:opt false :config #(require "dots.plugins.nvim-dap")}
:nvim-telescope/telescope-dap.nvim {:opt false :nvim-telescope/telescope-dap.nvim {:requires [:mfussenegger/nvim-dap
:requires [:mfussenegger/nvim-dap
:nvim-telescope/telescope.nvim]} :nvim-telescope/telescope.nvim]}
; code-related ----------------------------------------- <<< ; code-related ----------------------------------------- <<<

View file

@ -97,13 +97,21 @@
(on_attach client bufnr))}) (on_attach client bufnr))})
(let [rust-tools (require "rust-tools")] (let [rust-tools (require "rust-tools")
rust-tools-dap (require "rust-tools.dap")
extension-path "/home/leon/.vscode/extensions/vadimcn.vscode-lldb-1.6.8/"
codelldb-path (.. extension-path "adapter/codelldb")
liblldb-path (.. extension-path "lldb/lib/libllb.so")]
(rust-tools.setup {:tools {:inlay_hints {:show_parameter_hints false} (rust-tools.setup {:tools {:inlay_hints {:show_parameter_hints false}
:autoSetHints false} :autoSetHints false}
:dap {:adapter (rust-tools-dap.get_codelldb_adapter codelldb-path liblldb-path)}
:server {:on_attach on_attach :server {:on_attach on_attach
:capabilities default-capabilities}})) :capabilities default-capabilities}}))
;:cmd ["/home/leon/coding/prs/rust-analyzer/target/release/rust-analyzer"]}})) ;:cmd ["/home/leon/coding/prs/rust-analyzer/target/release/rust-analyzer"]}}))
(let [sumneko_root_path (.. vim.env.HOME "/.local/share/lua-language-server") (let [sumneko_root_path (.. vim.env.HOME "/.local/share/lua-language-server")
sumneko_binary (.. sumneko_root_path "/bin/Linux/lua-language-server")] sumneko_binary (.. sumneko_root_path "/bin/Linux/lua-language-server")]
(init-lsp (init-lsp

View file

@ -11,19 +11,6 @@
:env {:LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY "yes"} :env {:LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY "yes"}
:name "lldb"}) :name "lldb"})
;; TODO This does not really work,.. REEEEEEEEEEEEEEE
;(set dap.adapters.rust
;{:type "executable"
;:attach {:pidProperty "pid" :pidSelect "ask"}
;:command "lldb-vscode"
;:env {:LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY "yes"}
;:name "lldb"
;:initCommands ["command script import \"/home/leon/.rustup/toolchains/nightly-2021-03-18-x86_64-unknown-linux-gnu/lib/rustlib/etc/lldb_lookup.py\""
;"type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust"
;"type category enable Rust"]})
(set dap.adapters.node2 (set dap.adapters.node2
{:type "executable" {:type "executable"
:command "node" :command "node"