diff --git a/common/.config/btop/btop.conf b/common/.config/btop/btop.conf index 7037a57..3321309 100644 --- a/common/.config/btop/btop.conf +++ b/common/.config/btop/btop.conf @@ -54,7 +54,7 @@ update_ms = 400 #* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", #* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. -proc_sorting = "cpu direct" +proc_sorting = "cpu lazy" #* Reverse sorting order, True or False. proc_reversed = False diff --git a/common/.config/nvim/lua/lsp-general.lua b/common/.config/nvim/lua/lsp-general.lua index aa7455b..1674012 100644 --- a/common/.config/nvim/lua/lsp-general.lua +++ b/common/.config/nvim/lua/lsp-general.lua @@ -1,15 +1,116 @@ local lsp = require('lsp-zero') local cmp = require('cmp') local luasnip = require('luasnip') +local dap = require('dap') +local dapui = require('dapui') require('mason').setup({}) +require('mason-nvim-dap').setup({ + ensure_installed = { + 'cpptools', + 'cppdbg', + }, +}) require('mason-lspconfig').setup({}) +dap.configurations = { + cpp = { + { + name = "Launch", + type = "codelldb", + request = "launch", + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build/', 'file') + end, + cwd = '${workspaceFolder}', + stopOnEntry = true, + }, + }, +} + +dap.adapters.codelldb = { + type = 'server', + port = '13000', + host = '127.0.0.1', + executable = { + command = vim.fn.stdpath('data') .. '/mason/bin/codelldb', + args = {"--port", "13000"} + } +} + +dapui.setup({ + icons = { expanded = "➡️", collapsed = "⬇️" }, + mappings = { + open = "o", + remove = "d", + edit = "e", + repl = "r", + toggle = "t", + }, + expand_lines = vim.fn.has("nvim-0.7"), + layouts = { + { + elements = { + "scopes", + "stacks", + "watches" + }, + size = 0.2, + position = "left" + }, + { + elements = { + "repl", + "console", + "breakpoints", + }, + size = 0.3, + position = "bottom", + }, + }, + floating = { + max_height = nil, + max_width = nil, + border = "single", + mappings = { + close = { "q", "" }, + }, + }, + windows = { indent = 1 }, + render = { + max_type_length = nil, + }, +}) + +dap.listeners.after.event_initialized["dapui_config"]=function() + dapui.open() +end +dap.listeners.before.event_terminated["dapui_config"]=function() + dapui.close() +end +dap.listeners.before.event_exited["dapui_config"]=function() + dapui.close() +end +vim.keymap.set("n", "ds", function() + dap.continue() + dapui.toggle({}) +end) +vim.keymap.set("n", "de", function() + dapui.toggle({}) + dap.terminate() + require("notify")("Debugger session ended", "warn") +end) +vim.keymap.set("n", "dC", function() + require('dap').clear_breakpoints() + require("notify")("Cleared breakpoints", "warn") +end) +vim.fn.sign_define('DapBreakpoint',{ text ='🔴', texthl ='', linehl ='', numhl =''}) +vim.fn.sign_define('DapStopped',{ text ='▶️', texthl ='', linehl ='', numhl =''}) + lsp.preset({ name = 'recommended', }) - lsp.ensure_installed({ 'tsserver', 'clangd', diff --git a/common/.config/nvim/lua/plugins.lua b/common/.config/nvim/lua/plugins.lua index abc69ae..c08a302 100644 --- a/common/.config/nvim/lua/plugins.lua +++ b/common/.config/nvim/lua/plugins.lua @@ -70,6 +70,7 @@ return { 'debugloop/telescope-undo.nvim', 'folke/todo-comments.nvim', 'kevinhwang91/nvim-bqf', + 'rcarriga/nvim-notify', }, config = function() require('plugin-config/telescope') @@ -232,6 +233,8 @@ return { -- LSP Support { 'neovim/nvim-lspconfig' }, { 'williamboman/mason.nvim' }, + { 'mfussenegger/nvim-dap' }, + { 'jay-babu/mason-nvim-dap.nvim' }, { 'williamboman/mason-lspconfig.nvim' }, { 'simrat39/rust-tools.nvim' }, @@ -264,6 +267,13 @@ return { dependencies = { 'mfussenegger/nvim-dap', }, + keys = { + { 'db', 'lua require("dap").toggle_breakpoint()', desc = "Toggle DAP UI" }, + { 'dc', 'lua require("dap").continue()' }, + { 'dn', 'lua require("dap").step_over()' }, + { 'di', 'lua require("dap").step_into()' }, + { 'do', 'lua require("dap").step_out()' }, + }, lazy = false }, { diff --git a/common/.vimrc b/common/.vimrc index 905ce82..5001112 100644 --- a/common/.vimrc +++ b/common/.vimrc @@ -103,3 +103,8 @@ nn r :Telescope registers " Paste and keep the " register nn p "_dP + +" on leader vs, run mksession! .vims +nn vs :mksession! .vims +nn vl :source .vims + diff --git a/common/.zshrc b/common/.zshrc index 37f0fc3..3e8e122 100644 --- a/common/.zshrc +++ b/common/.zshrc @@ -26,7 +26,7 @@ export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || pr export PATH=$PATH:$HOME/.local/bin/ export PATH=$PATH:$HOME/.cargo/env/ -export MAKEFLAGS="-j$(nproc)" +export MAKEFLAGS="-j20" source $HOME/.zshrc.local diff --git a/node_modules/.cache/custom-elements-language-server/custom-elements.json b/node_modules/.cache/custom-elements-language-server/custom-elements.json new file mode 100644 index 0000000..3b9ccb5 --- /dev/null +++ b/node_modules/.cache/custom-elements-language-server/custom-elements.json @@ -0,0 +1 @@ +{"schemaVersion":"1.0.0","readme":"","modules":[{"kind":"javascript-module","path":"add-dotfile.js","declarations":[],"exports":[]},{"kind":"javascript-module","path":"bootstrap.js","declarations":[],"exports":[]},{"kind":"javascript-module","path":"host-seperation.js","declarations":[],"exports":[]}]} \ No newline at end of file