config.example.lua 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 the key-mappings provided by LunarVim for any mode, or leave it empty to keep them
  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. -- if you just want to augment the existing ones then use the utility function
  26. -- require("utils").add_keymap_insert_mode({ silent = true }, {
  27. -- { "<C-s>", ":w<cr>" },
  28. -- { "<C-c>", "<ESC>" },
  29. -- })
  30. -- you can also use the native vim way directly
  31. -- vim.api.nvim_set_keymap("i", "<C-Space>", "compe#complete()", { noremap = true, silent = true, expr = true })
  32. -- TODO: User Config for predefined plugins
  33. -- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
  34. lvim.builtin.dashboard.active = true
  35. lvim.builtin.terminal.active = true
  36. lvim.builtin.nvimtree.side = "left"
  37. lvim.builtin.nvimtree.show_icons.git = 0
  38. -- if you don't want all the parsers change this to a table of the ones you want
  39. lvim.builtin.treesitter.ensure_installed = "maintained"
  40. lvim.builtin.treesitter.ignore_install = { "haskell" }
  41. lvim.builtin.treesitter.highlight.enabled = true
  42. -- generic LSP settings
  43. -- you can set a custom on_attach function that will be used for all the language servers
  44. -- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>
  45. -- lvim.lsp.on_attach_callback = function(client, bufnr)
  46. -- local function buf_set_option(...)
  47. -- vim.api.nvim_buf_set_option(bufnr, ...)
  48. -- end
  49. -- --Enable completion triggered by <c-x><c-o>
  50. -- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
  51. -- end
  52. -- set a formatter if you want to override the default lsp one (if it exists)
  53. -- lvim.lang.python.formatters = {
  54. -- {
  55. -- exe = "black",
  56. -- args = {}
  57. -- }
  58. -- }
  59. -- set an additional linter
  60. -- lvim.lang.python.linters = {
  61. -- {
  62. -- exe = "flake8",
  63. -- args = {}
  64. -- }
  65. -- }
  66. -- Additional Plugins
  67. -- lvim.plugins = {
  68. -- {"folke/tokyonight.nvim"}, {
  69. -- "ray-x/lsp_signature.nvim",
  70. -- config = function() require"lsp_signature".on_attach() end,
  71. -- event = "InsertEnter"
  72. -- }
  73. -- }
  74. -- Autocommands (https://neovim.io/doc/user/autocmd.html)
  75. -- lvim.autocommands.custom_groups = {
  76. -- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" },
  77. -- }
  78. -- Additional Leader bindings for WhichKey
  79. -- lvim.builtin.which_key.mappings["P"] = { "<cmd>lua require'telescope'.extensions.project.project{}<CR>", "Projects" }
  80. -- lvim.builtin.which_key.mappings["t"] = {
  81. -- name = "+Trouble",
  82. -- r = { "<cmd>Trouble lsp_references<cr>", "References" },
  83. -- f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" },
  84. -- d = { "<cmd>Trouble lsp_document_diagnostics<cr>", "Diagnosticss" },
  85. -- q = { "<cmd>Trouble quickfix<cr>", "QuickFix" },
  86. -- l = { "<cmd>Trouble loclist<cr>", "LocationList" },
  87. -- w = { "<cmd>Trouble lsp_workspace_diagnostics<cr>", "Diagnosticss" },
  88. -- }