mappings.lua 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. local mappings_utils = require('utils.mappings_utils')
  2. local default_opts = mappings_utils.default_opts
  3. -- dap
  4. -- map('n', '<leader>dc', ":lua require'dap'.continue() <CR>", default_opts)
  5. -- map('n', '<leader>db', ":lua require'dap'.toggle_breakpoint() <CR>", default_opts)
  6. -- map('n', '<leader>dj', ":lua require'dap'.step_over() <CR>", default_opts)
  7. -- map('n', '<leader>dl', ":lua require'dap'.step_into() <CR>", default_opts)
  8. -- map('n', '<leader>dk', ":lua require'dap'.step_out() <CR>", default_opts)
  9. -- map('n', '<leader>dr', ":lua require'dap'.repl.open() <CR>", default_opts)
  10. -- map('n', '<leader>dt', ":lua require'dapui'.toggle() <CR>", default_opts)
  11. -- map('n', '<leader>dq', ":lua require'dap'.terminate() <CR>", default_opts)
  12. -- map('n', '<leader>di', ":lua require'dap.ui.wdigets'.hover() <CR>", default_opts)
  13. -- map('n', '<leader>di', ":lua require'dap.ui.wdigets'.hover(function () return vim.fn.expand('<cexpr>') end) <CR>", default_opts)
  14. -- map('n', '<leader>di', ":lua require'dap.ui.wdigets'.visual_hover() <CR>", default_opts)
  15. -- map('n', '<leader>ds', ":lua require'dap.ui.wdigets'.scopes() <CR>", default_opts)
  16. ncvim.add_mappings({
  17. {
  18. mode = 'n',
  19. key_string = '<leader>dc',
  20. command = ":lua require'dap'.continue() <CR>",
  21. options = default_opts,
  22. },
  23. {
  24. mode = 'n',
  25. key_string = '<leader>db',
  26. command = ":lua require'dap'.toggle_breakpoint() <CR>",
  27. options = default_opts,
  28. },
  29. {
  30. mode = 'n',
  31. key_string = '<leader>dj',
  32. command = ":lua require'dap'.step_over() <CR>",
  33. options = default_opts,
  34. },
  35. {
  36. mode = 'n',
  37. key_string = '<leader>dl',
  38. command = ":lua require'dap'.step_into() <CR>",
  39. options = default_opts,
  40. },
  41. {
  42. mode = 'n',
  43. key_string = '<leader>dk',
  44. command = ":lua require'dap'.step_out() <CR>",
  45. options = default_opts,
  46. },
  47. {
  48. mode = 'n',
  49. key_string = '<leader>dr',
  50. command = ":lua require'dap'.repl.open() <CR>",
  51. options = default_opts,
  52. },
  53. {
  54. mode = 'n',
  55. key_string = '<leader>dt',
  56. command = require 'dapui'.toggle,
  57. options = default_opts,
  58. },
  59. {
  60. mode = 'n',
  61. key_string = '<leader>dq',
  62. command = ":lua require'dap'.terminate() <CR>",
  63. options = default_opts,
  64. },
  65. })