config.lua 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. return {
  2. templates_dir = join_paths(get_runtime_dir(), "site", "after", "ftplugin"),
  3. diagnostics = {
  4. signs = {
  5. active = true,
  6. values = {
  7. { name = "LspDiagnosticsSignError", text = "" },
  8. { name = "LspDiagnosticsSignWarning", text = "" },
  9. { name = "LspDiagnosticsSignHint", text = "" },
  10. { name = "LspDiagnosticsSignInformation", text = "" },
  11. },
  12. },
  13. virtual_text = true,
  14. update_in_insert = false,
  15. underline = true,
  16. severity_sort = true,
  17. },
  18. override = {},
  19. document_highlight = true,
  20. code_lens_refresh = true,
  21. popup_border = "single",
  22. on_attach_callback = nil,
  23. on_init_callback = nil,
  24. automatic_servers_installation = true,
  25. buffer_mappings = {
  26. normal_mode = {
  27. ["K"] = { "<cmd>lua vim.lsp.buf.hover()<CR>", "Show hover" },
  28. ["gd"] = { "<cmd>lua vim.lsp.buf.definition()<CR>", "Goto Definition" },
  29. ["gD"] = { "<cmd>lua vim.lsp.buf.declaration()<CR>", "Goto declaration" },
  30. ["gr"] = { "<cmd>lua vim.lsp.buf.references()<CR>", "Goto references" },
  31. ["gI"] = { "<cmd>lua vim.lsp.buf.implementation()<CR>", "Goto Implementation" },
  32. ["gs"] = { "<cmd>lua vim.lsp.buf.signature_help()<CR>", "show signature help" },
  33. ["gp"] = { "<cmd>lua require'lsp.peek'.Peek('definition')<CR>", "Peek definition" },
  34. ["gl"] = {
  35. "<cmd>lua require'lsp.handlers'.show_line_diagnostics()<CR>",
  36. "Show line diagnostics",
  37. },
  38. },
  39. insert_mode = {},
  40. visual_mode = {},
  41. },
  42. null_ls = {
  43. setup = {},
  44. },
  45. }