config.example.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. --[[
  2. lvim is the global options object
  3. Linters should be
  4. filled in as strings with either
  5. a global executable or a path to
  6. an executable
  7. ]]
  8. -- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
  9. -- general
  10. lvim.format_on_save = true
  11. lvim.lint_on_save = true
  12. lvim.colorscheme = "spacegray"
  13. -- keymappings
  14. lvim.leader = "space"
  15. -- overwrite/augment the key-mappings provided by LunarVim for any mode, or leave empty to keep the defaults.
  16. -- lvim.keys.normal_mode = {
  17. -- -- Page down/up
  18. -- ["[d"] = { "<PageUp>" },
  19. -- ["]d"] = { "<PageDown>" },
  20. --
  21. -- -- Navigate buffers
  22. -- ["<Tab>"] = { ":bnext<CR>" },
  23. -- ["<S-Tab>"] = { ":bprevious<CR>" },
  24. -- }
  25. -- TODO: User Config for predefined plugins
  26. -- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
  27. lvim.builtin.dashboard.active = true
  28. lvim.builtin.terminal.active = true
  29. lvim.builtin.nvimtree.side = "left"
  30. lvim.builtin.nvimtree.show_icons.git = 0
  31. -- if you don't want all the parsers change this to a table of the ones you want
  32. lvim.builtin.treesitter.ensure_installed = "maintained"
  33. lvim.builtin.treesitter.ignore_install = { "haskell" }
  34. lvim.builtin.treesitter.highlight.enabled = true
  35. -- generic LSP settings
  36. -- you can set a custom on_attach function that will be used for all the language servers
  37. -- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>
  38. -- lvim.lsp.on_attach_callback = function(client, bufnr)
  39. -- local function buf_set_option(...)
  40. -- vim.api.nvim_buf_set_option(bufnr, ...)
  41. -- end
  42. -- --Enable completion triggered by <c-x><c-o>
  43. -- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
  44. -- end
  45. -- set a formatter if you want to override the default lsp one (if it exists)
  46. -- lvim.lang.python.formatters = {
  47. -- {
  48. -- exe = "black",
  49. -- args = {}
  50. -- }
  51. -- }
  52. -- set an additional linter
  53. -- lvim.lang.python.linters = {
  54. -- {
  55. -- exe = "flake8",
  56. -- args = {}
  57. -- }
  58. -- }
  59. -- Additional Plugins
  60. -- lvim.plugins = {
  61. -- {"folke/tokyonight.nvim"}, {
  62. -- "ray-x/lsp_signature.nvim",
  63. -- config = function() require"lsp_signature".on_attach() end,
  64. -- event = "InsertEnter"
  65. -- }
  66. -- }
  67. -- Autocommands (https://neovim.io/doc/user/autocmd.html)
  68. -- lvim.autocommands.custom_groups = {
  69. -- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" },
  70. -- }
  71. -- Additional Leader bindings for WhichKey
  72. -- lvim.builtin.which_key.mappings["P"] = { "<cmd>lua require'telescope'.extensions.project.project{}<CR>", "Projects" }
  73. -- lvim.builtin.which_key.mappings["t"] = {
  74. -- name = "+Trouble",
  75. -- r = { "<cmd>Trouble lsp_references<cr>", "References" },
  76. -- f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" },
  77. -- d = { "<cmd>Trouble lsp_document_diagnostics<cr>", "Diagnosticss" },
  78. -- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" },
  79. -- l = { "<cmd>Trouble loclist<cr>", "LocationList" },
  80. -- w = { "<cmd>Trouble lsp_workspace_diagnostics<cr>", "Diagnosticss" },
  81. -- }