config.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. popup_border = "single",
  21. on_attach_callback = nil,
  22. on_init_callback = nil,
  23. automatic_servers_installation = true,
  24. buffer_mappings = {
  25. normal_mode = {
  26. ["K"] = { "<cmd>lua vim.lsp.buf.hover()<CR>", "Show hover" },
  27. ["gd"] = { "<cmd>lua vim.lsp.buf.definition()<CR>", "Goto Definition" },
  28. ["gD"] = { "<cmd>lua vim.lsp.buf.declaration()<CR>", "Goto declaration" },
  29. ["gr"] = { "<cmd>lua vim.lsp.buf.references()<CR>", "Goto references" },
  30. ["gI"] = { "<cmd>lua vim.lsp.buf.implementation()<CR>", "Goto Implementation" },
  31. ["gs"] = { "<cmd>lua vim.lsp.buf.signature_help()<CR>", "show signature help" },
  32. ["gp"] = { "<cmd>lua require'lsp.peek'.Peek('definition')<CR>", "Peek definition" },
  33. ["gl"] = {
  34. "<cmd>lua require'lsp.handlers'.show_line_diagnostics()<CR>",
  35. "Show line diagnostics",
  36. },
  37. },
  38. insert_mode = {},
  39. visual_mode = {},
  40. },
  41. null_ls = {
  42. setup = {},
  43. },
  44. }