From ecdf0344ffdf6bc0fd7bc56e723f848a7c25e963 Mon Sep 17 00:00:00 2001 From: blob42 Date: Mon, 21 Aug 2023 14:25:50 +0200 Subject: [PATCH] update --- lua/custom/plugins/init.lua | 17 ++++++++++++++++- lua/spike/dap/init.lua | 13 +++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index ecf9508..de24f2f 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -60,9 +60,9 @@ return { setup = function() require("core.lazy_load").on_file_open "nvim-treesitter" require("core.lazy_load").on_file_open "nvim-treesitter-textobjects" - -- require("core.lazy_load").on_file_open "nvim-treesitter-textsubjects" require("core.lazy_load").on_file_open "nvim-treesitter-context" require("core.lazy_load").on_file_open "syntax-tree-surfer" + -- require("core.lazy_load").on_file_open "nvim-treesitter-textsubjects" -- require("core.lazy_load").on_file_open "nvim-ts-rainbow" end, }, @@ -179,6 +179,7 @@ return { -- https://github.com/thmsmlr/gpt.nvim ["dpayne/CodeGPT.nvim"] = { -- keys = {"gpT"}, + event = "BufRead", config = function() require("codegpt.config") require("custom.plugins.configs.code-gpt").setup() @@ -467,6 +468,9 @@ return { ["cbochs/grapple.nvim"] = { -- commit = "50b8271", + cmd = {"Grapple*"}, + module = {"grapple"}, + setup = function() require("core.utils").load_mappings "grapple" end, @@ -560,6 +564,7 @@ return { ["windwp/nvim-projectconfig"] = { after = {"CodeGPT.nvim"}, + event = "BufRead", config = function() require("custom.plugins.configs.projectconfig").setup() end, @@ -584,11 +589,13 @@ return { -- create new vim modes ["Iron-E/nvim-libmodal"] = { -- {{{ lock = true, + module = "libmodal", }, -- }}} -- get rid of bad habits ["ja-ford/delaytrain.nvim"] = { -- ["~/src/delaytrain.nvim"] = { + event = "BufRead", config = function() require('delaytrain').setup({ delay_ms = 1001, -- How long repeated usage of a key should be prevented @@ -617,6 +624,11 @@ return { }) end }, + + ["dstein64/vim-startuptime"] = { + cmd = {"StartupTime"} + }, + -- ["takac/vim-hardtime"] = {-- {{{ -- -- keys = { "h", "j", "k", "l" }, -- setup = function() @@ -713,6 +725,7 @@ return { ["jose-elias-alvarez/null-ls.nvim"] = { lock = true, requires = {"nvim-lua/plenary.nvim"}, + event = "BufRead", setup = function() require('core.utils').load_mappings 'null_ls' end, @@ -891,6 +904,8 @@ return { -- zk nvim ["mickael-menu/zk-nvim"] = { lock = true, + module = {"zk"}, + cmd = {"Zk*"}, setup = function() require("core.utils").load_mappings "zk" end, diff --git a/lua/spike/dap/init.lua b/lua/spike/dap/init.lua index 6821d2e..50fa082 100644 --- a/lua/spike/dap/init.lua +++ b/lua/spike/dap/init.lua @@ -116,6 +116,7 @@ local function dap_setup() -- } -- } + dap.adapters["codelldb-c"] = { type = 'server', host = "127.0.0.1", @@ -127,7 +128,19 @@ local function dap_setup() } + -- NOTE: if compilation is done in diffferent folder then debugging workind + -- dir (like using symlinked folder when building) source maps are needed + -- "sourceMap": { "/build/time/source/path" : "/current/source/path" } dap.configurations.c = { + { + -- If you get an "Operation not permitted" error using this, try disabling YAMA: + -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope + name = "Attach to process", + type = 'codelldb-c', -- Adjust this to match your adapter name (`dap.adapters.`) + request = 'attach', + pid = require('dap.utils').pick_process, + args = {}, + }, { name = "Launch file", type = "codelldb-c",