config.example.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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.log.level = "warn"
  11. lvim.format_on_save = true
  12. lvim.lint_on_save = true
  13. lvim.colorscheme = "spacegray"
  14. -- keymappings [view all the defaults by pressing <leader>Lk]
  15. lvim.leader = "space"
  16. -- add your own keymapping
  17. lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
  18. -- unmap a default keymapping
  19. -- lvim.keys.normal_mode["<C-Up>"] = ""
  20. -- edit a default keymapping
  21. -- lvim.keys.normal_mode["<C-q>"] = ":q<cr>"
  22. -- Use which-key to add extra bindings with the leader-key prefix
  23. -- lvim.builtin.which_key.mappings["P"] = { "<cmd>lua require'telescope'.extensions.project.project{}<CR>", "Projects" }
  24. -- lvim.builtin.which_key.mappings["t"] = {
  25. -- name = "+Trouble",
  26. -- r = { "<cmd>Trouble lsp_references<cr>", "References" },
  27. -- f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" },
  28. -- d = { "<cmd>Trouble lsp_document_diagnostics<cr>", "Diagnosticss" },
  29. -- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" },
  30. -- l = { "<cmd>Trouble loclist<cr>", "LocationList" },
  31. -- w = { "<cmd>Trouble lsp_workspace_diagnostics<cr>", "Diagnosticss" },
  32. -- }
  33. -- TODO: User Config for predefined plugins
  34. -- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
  35. lvim.builtin.dashboard.active = true
  36. lvim.builtin.terminal.active = true
  37. lvim.builtin.nvimtree.side = "left"
  38. lvim.builtin.nvimtree.show_icons.git = 0
  39. -- if you don't want all the parsers change this to a table of the ones you want
  40. lvim.builtin.treesitter.ensure_installed = "maintained"
  41. lvim.builtin.treesitter.ignore_install = { "haskell" }
  42. lvim.builtin.treesitter.highlight.enabled = true
  43. -- generic LSP settings
  44. -- you can set a custom on_attach function that will be used for all the language servers
  45. -- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>
  46. -- lvim.lsp.on_attach_callback = function(client, bufnr)
  47. -- local function buf_set_option(...)
  48. -- vim.api.nvim_buf_set_option(bufnr, ...)
  49. -- end
  50. -- --Enable completion triggered by <c-x><c-o>
  51. -- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
  52. -- end
  53. -- set a formatter if you want to override the default lsp one (if it exists)
  54. -- lvim.lang.python.formatters = {
  55. -- {
  56. -- exe = "black",
  57. -- args = {}
  58. -- }
  59. -- }
  60. -- set an additional linter
  61. -- lvim.lang.python.linters = {
  62. -- {
  63. -- exe = "flake8",
  64. -- args = {}
  65. -- }
  66. -- }
  67. -- Additional Plugins
  68. -- lvim.plugins = {
  69. -- {"folke/tokyonight.nvim"}, {
  70. -- "ray-x/lsp_signature.nvim",
  71. -- config = function() require"lsp_signature".on_attach() end,
  72. -- event = "InsertEnter"
  73. -- }
  74. -- }
  75. -- Autocommands (https://neovim.io/doc/user/autocmd.html)
  76. -- lvim.autocommands.custom_groups = {
  77. -- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" },
  78. -- }