mappings.lua 898 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. local bufopts = {
  2. noremap = true,
  3. silent = true,
  4. }
  5. ncvim.add_mappings({
  6. {
  7. mode = 'n',
  8. key_string = 'gd',
  9. command = '<cmd> lua vim.g.helpers.open_definitions()<CR>',
  10. options = bufopts,
  11. },
  12. {
  13. mode = 'n',
  14. key_string = 'gsd',
  15. command = '<C-w>v<cmd> lua vim.g.helpers.open_definitions()<CR>',
  16. options = bufopts,
  17. },
  18. {
  19. mode = 'n',
  20. key_string = '<C-k>',
  21. command = '<cmd> lua vim.lsp.buf.signature_help()<CR>',
  22. options = bufopts,
  23. },
  24. {
  25. mode = 'i',
  26. key_string = '<C-k>',
  27. command = '<cmd> lua vim.lsp.buf.signature_help()<CR>',
  28. options = bufopts,
  29. },
  30. {
  31. mode = 'n',
  32. key_string = 'gi',
  33. command = '<cmd> lua vim.g.helpers.open_implementations()<CR>',
  34. options = bufopts,
  35. },
  36. {
  37. mode = 'n',
  38. key_string = 'gr',
  39. command = '<cmd> lua vim.g.helpers.open_references()<CR>',
  40. options = bufopts,
  41. },
  42. })