diff --git a/init.lua b/init.lua index 7d76f98..e0efbb4 100644 --- a/init.lua +++ b/init.lua @@ -15,8 +15,7 @@ require('lazy').setup(vim.tbl_extend('keep', config.user_lazy_opts(), { { import = 'plex.plugins.extras.editor' }, { import = 'plex.plugins.extras.org' }, { import = 'plex.plugins.extras.lang.go' }, - { import = 'plex.plugins.extras.lang.cpp' }, - { import = 'plex.plugins.extras.lang.rust' }, + { import = 'plex.plugins.extras.lang.cpp' }, -- also does C and rust { import = 'plex.plugins.extras.lang.json' }, { import = 'plex.plugins.extras.lang.python' }, { import = 'plex.plugins.extras.lang.yaml' }, diff --git a/lua/plex/config/autocmds.lua b/lua/plex/config/autocmds.lua index 6842616..a839982 100644 --- a/lua/plex/config/autocmds.lua +++ b/lua/plex/config/autocmds.lua @@ -88,7 +88,7 @@ vim.api.nvim_create_autocmd('BufWritePre', { -- Disable conceallevel for specific file-types. vim.api.nvim_create_autocmd('FileType', { group = augroup('fix_conceallevel'), - pattern = { 'markdown' }, + pattern = { 'latex', 'tex' }, callback = function() vim.opt_local.conceallevel = 0 end, diff --git a/lua/plex/config/keymaps.lua b/lua/plex/config/keymaps.lua index 42ec1d0..fb10ef1 100644 --- a/lua/plex/config/keymaps.lua +++ b/lua/plex/config/keymaps.lua @@ -344,8 +344,8 @@ map('n', '"', 'vsplit', { desc = 'Split window vertically' }) map('n', 'wb', 'buffer#', { desc = 'Alternate buffer' }) map('n', 'wc', 'close', { desc = 'Close window' }) map('n', 'wd', 'bdelete', { desc = 'Buffer delete' }) -map('n', 'wv', 'split', { desc = 'Split window horizontally' }) -map('n', 'wg', 'vsplit', { desc = 'Split window vertically' }) +map('n', 'w%', 'split', { desc = 'Split window horizontally' }) +map('n', 'w"', 'vsplit', { desc = 'Split window vertically' }) map('n', 'wt', 'tabnew', { desc = 'New tab' }) map('n', 'wtp', 'tabprevious', { desc = 'Previous tab' }) map('n', 'wtn', 'tabnext', { desc = 'Next tab' }) diff --git a/lua/plex/plugins/coding.lua b/lua/plex/plugins/coding.lua index 9afb160..164823c 100644 --- a/lua/plex/plugins/coding.lua +++ b/lua/plex/plugins/coding.lua @@ -337,7 +337,7 @@ return { desc = 'Debugging: Toggle breakpoint', }, { - 'db', + 'dc', 'lua require\'dap\'.continue()', mode = { 'n', 'x' }, desc = 'Debugging: Start or continue debug session', @@ -355,10 +355,30 @@ return { desc = 'Debugging: Step over code', }, { - 'dm', + 'dr', 'lua require\'dap\'.repl.open()', mode = { 'n', 'x' }, - desc = 'Debugging: Menu', + desc = 'Debugging: repl Menu', + }, + { + 'dms', + function() + local widgets = require('dap.ui.widgets') + local my_sidebar = widgets.sidebar(widgets.scopes) + my_sidebar.open() + end, + mode = { 'n', 'x' }, + desc = 'Debugging: Menu scopes', + }, + { + 'dmf', + function() + local widgets = require('dap.ui.widgets') + local my_sidebar = widgets.sidebar(widgets.frames) + my_sidebar.open() + end, + mode = { 'n', 'x' }, + desc = 'Debugging: Menu frames', }, }, }, diff --git a/lua/plex/plugins/extras/lang/cpp.lua b/lua/plex/plugins/extras/lang/cpp.lua index 33cc8be..c77cc1d 100644 --- a/lua/plex/plugins/extras/lang/cpp.lua +++ b/lua/plex/plugins/extras/lang/cpp.lua @@ -1,7 +1,7 @@ return { { 'mfussenegger/nvim-dap', - optional = true, + -- optional = true, dependencies = { 'mfussenegger/nvim-dap-python', }, @@ -10,65 +10,55 @@ return { -- { 'dPt', function() require('dap-python').test_method() end, desc = 'Debug Method' }, -- { 'dPc', function() require('dap-python').test_class() end, desc = 'Debug Class' }, -- }, - config = function() + opts = function() local dap = require('dap') - dap.adapters.lldb = { + dap.adapters.cppdbg = { + id = 'cppdbg', type = 'executable', - command = '/usr/bin/lldb-vscode', -- adjust as needed, must be absolute path - name = 'lldb' - } - dap.configurations.c= { - { - name = 'Launch', - type = 'lldb', - request = 'launch', - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - cwd = '${workspaceFolder}', - stopOnEntry = false, - args = {}, - - -- 💀 - -- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting: - -- - -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope - -- - -- Otherwise you might get the following error: - -- - -- Error on launch: Failed to attach to the target process - -- - -- But you should be aware of the implications: - -- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html - -- runInTerminal = false, - }, + command = '/home/cscherr/.local/share/nvim/nvim-dap/debuggers/cpptools/extension/debugAdapters/bin/OpenDebugAD7', } dap.configurations.cpp = { { - name = 'Launch', - type = 'lldb', - request = 'launch', + name = "Launch file", + type = "cppdbg", + request = "launch", program = function() return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') end, cwd = '${workspaceFolder}', - stopOnEntry = false, - args = {}, + stopAtEntry = true, + setupCommands = { + { + text = '-enable-pretty-printing', + description = 'enable pretty printing', + ignoreFailures = false + }, + }, + + }, + { + name = 'Attach to gdbserver :1234', + type = 'cppdbg', + request = 'launch', + MIMode = 'gdb', + miDebuggerServerAddress = 'localhost:1234', + miDebuggerPath = '/usr/bin/gdb', + cwd = '${workspaceFolder}', + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + end, + setupCommands = { + { + text = '-enable-pretty-printing', + description = 'enable pretty printing', + ignoreFailures = false + }, + }, - -- 💀 - -- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting: - -- - -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope - -- - -- Otherwise you might get the following error: - -- - -- Error on launch: Failed to attach to the target process - -- - -- But you should be aware of the implications: - -- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html - -- runInTerminal = false, }, } + dap.configurations.c = dap.configurations.cpp + dap.configurations.rust = dap.configurations.cpp end, }, } diff --git a/lua/plex/plugins/extras/org/neorg.lua b/lua/plex/plugins/extras/org/neorg.lua index 0b8bdd7..9f9e716 100644 --- a/lua/plex/plugins/extras/org/neorg.lua +++ b/lua/plex/plugins/extras/org/neorg.lua @@ -1,7 +1,7 @@ return { { "nvim-neorg/neorg", - enabled = false, + enabled = true, lazy = true, build = ":Neorg sync-parsers", dependencies = { "nvim-lua/plenary.nvim" },