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]
(use (a.assoc rest 1 stuff)))
(defn- safe-require-plugin-config [name]
(defn- safe-req-conf [name]
"safely require a plugins configuration module, prepending 'dots.plugins.' to the given module name"
(let [(ok? val-or-err) (pcall require (.. "dots.plugins." name))]
(when (not ok?)
(print (.. "Plugin config error: " val-or-err)))))
@ -21,7 +18,7 @@
(for [i 1 (a.count pkgs) 2]
(let [name (. pkgs i)
opts (. pkgs (+ i 1))]
(-?> (. opts :mod) (safe-require-plugin-config))
(-?> (. opts :mod) (safe-req-conf))
(use (a.assoc opts 1 name))))))))
@ -38,17 +35,18 @@
:folke/persistence.nvim {:opt false :config #(require "dots.plugins.persistence")}
: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"]}
:lifepillar/vim-gruvbox8 {:opt false
:config
#(do (set vim.g.gruvbox_italics 0)
(fn []
(set vim.g.gruvbox_italics 0)
(set vim.g.gruvbox_italicise_strings 0)
(set vim.g.gruvbox_filetype_hi_groups 1)
(set vim.g.gruvbox_plugin_hi_groups 1)
@ -58,7 +56,7 @@
;(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"]
:requires [:nvim-lua/popup.nvim
:nvim-lua/plenary.nvim]}
@ -66,17 +64,13 @@
:nvim-telescope/telescope-packer.nvim {}
:nvim-telescope/telescope-frecency.nvim {:requires [:tami5/sql.nvim]
:opt false}
;:opt false :config #((. (require :telescope) :load_extension) "frecency")}
: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"]
:run ":TSUpdate"}
@ -98,7 +92,7 @@
:akinsho/nvim-bufferline.lua {:opt false :config #(require "dots.plugins.bufferline")}
:sindrets/diffview.nvim {:cmd ["DiffviewOpen" "DiffviewToggleFiles"]
:opt false :config #(require "dots.plugins.diffview")}
:config #(require "dots.plugins.diffview")}
:tweekmonster/startuptime.vim {:cmd ["StartupTime"]}
@ -106,7 +100,8 @@
: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
:opt false :config #((. (require :dapui) :setup))
;:opt false :config #(req dapui.setup)
:config #((. (require :dapui) :setup))
:requires [:mfussenegger/nvim-dap]}
:mfussenegger/nvim-dap {:opt false}
;:opt false :config #(require "dots.plugins.nvim-dap")}
:mfussenegger/nvim-dap {:opt false :config #(require "dots.plugins.nvim-dap")}
:nvim-telescope/telescope-dap.nvim {:opt false
:requires [:mfussenegger/nvim-dap
:nvim-telescope/telescope-dap.nvim {:requires [:mfussenegger/nvim-dap
:nvim-telescope/telescope.nvim]}
; code-related ----------------------------------------- <<<

View file

@ -97,13 +97,21 @@
(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}
:autoSetHints false}
:dap {:adapter (rust-tools-dap.get_codelldb_adapter codelldb-path liblldb-path)}
:server {:on_attach on_attach
:capabilities default-capabilities}}))
;:cmd ["/home/leon/coding/prs/rust-analyzer/target/release/rust-analyzer"]}}))
(let [sumneko_root_path (.. vim.env.HOME "/.local/share/lua-language-server")
sumneko_binary (.. sumneko_root_path "/bin/Linux/lua-language-server")]
(init-lsp

View file

@ -11,19 +11,6 @@
:env {:LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY "yes"}
: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
{:type "executable"
:command "node"