lv-config.example.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. --[[
  2. O 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. O.format_on_save = true
  11. O.lint_on_save = true
  12. O.completion.autocomplete = true
  13. O.colorscheme = "spacegray"
  14. O.default_options.wrap = true
  15. O.default_options.timeoutlen = 100
  16. -- keymappings
  17. O.keys.leader_key = "space"
  18. -- overwrite the key-mappings provided by LunarVim for any mode, or leave it empty to keep them
  19. -- O.keys.normal_mode = {
  20. -- Page down/up
  21. -- {'[d', '<PageUp>'},
  22. -- {']d', '<PageDown>'},
  23. --
  24. -- Navigate buffers
  25. -- {'<Tab>', ':bnext<CR>'},
  26. -- {'<S-Tab>', ':bprevious<CR>'},
  27. -- }
  28. -- if you just want to augment the existing ones then use the utility function
  29. -- require("lv-utils").add_keymap_insert_mode({ silent = true }, {
  30. -- { "<C-s>", ":w<cr>" },
  31. -- { "<C-c>", "<ESC>" },
  32. -- })
  33. -- you can also use the native vim way directly
  34. -- vim.api.nvim_set_keymap("i", "<C-Space>", "compe#complete()", { noremap = true, silent = true, expr = true })
  35. -- TODO: User Config for predefined plugins
  36. -- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
  37. O.plugin.dashboard.active = true
  38. O.plugin.terminal.active = true
  39. O.plugin.zen.active = false
  40. O.plugin.zen.window.height = 0.90
  41. O.plugin.nvimtree.side = "left"
  42. O.plugin.nvimtree.show_icons.git = 0
  43. -- if you don't want all the parsers change this to a table of the ones you want
  44. O.treesitter.ensure_installed = "maintained"
  45. O.treesitter.ignore_install = { "haskell" }
  46. O.treesitter.highlight.enabled = true
  47. -- python
  48. O.lang.python.diagnostics.virtual_text = true
  49. O.lang.python.analysis.use_library_code_types = true
  50. -- To change default formatter from yapf to black
  51. -- O.lang.python.formatter.exe = "black"
  52. -- O.lang.python.formatter.args = {"-"}
  53. -- To change enabled linters
  54. -- https://github.com/mfussenegger/nvim-lint#available-linters
  55. -- O.lang.python.linters = { "flake8", "pylint", "mypy", ... }
  56. -- go
  57. -- To change default formatter from gofmt to goimports
  58. -- O.lang.formatter.go.exe = "goimports"
  59. -- javascript
  60. O.lang.tsserver.linter = nil
  61. -- rust
  62. -- O.lang.rust.rust_tools = true
  63. -- O.lang.rust.formatter = {
  64. -- exe = "rustfmt",
  65. -- args = {"--emit=stdout", "--edition=2018"},
  66. -- }
  67. -- scala
  68. -- O.lang.scala.metals.active = true
  69. -- O.lang.scala.metals.server_version = "0.10.5",
  70. --LaTeX
  71. -- Options: https://github.com/latex-lsp/texlab/blob/master/docs/options.md
  72. O.lang.latex.active = true
  73. O.lang.latex.aux_directory = "."
  74. O.lang.latex.bibtex_formatter = "texlab"
  75. O.lang.latex.build.args = { "-pdf", "-interaction=nonstopmode", "-synctex=1", "%f" }
  76. O.lang.latex.build.executable = "latexmk"
  77. O.lang.latex.build.forward_search_after = false
  78. O.lang.latex.build.on_save = false
  79. O.lang.latex.chktex.on_edit = false
  80. O.lang.latex.chktex.on_open_and_save = false
  81. O.lang.latex.diagnostics_delay = 300
  82. O.lang.latex.formatter_line_length = 80
  83. O.lang.latex.forward_search.executable = "zathura"
  84. O.lang.latex.latex_formatter = "latexindent"
  85. O.lang.latex.latexindent.modify_line_breaks = false
  86. -- O.lang.latex.auto_save = false
  87. -- O.lang.latex.ignore_errors = { }
  88. -- Additional Plugins
  89. -- O.user_plugins = {
  90. -- {"folke/tokyonight.nvim"}, {
  91. -- "ray-x/lsp_signature.nvim",
  92. -- config = function() require"lsp_signature".on_attach() end,
  93. -- event = "InsertEnter"
  94. -- }
  95. -- }
  96. -- Autocommands (https://neovim.io/doc/user/autocmd.html)
  97. -- O.user_autocommands = {{ "BufWinEnter", "*", "echo \"hi again\""}}
  98. -- Additional Leader bindings for WhichKey
  99. -- O.user_which_key = {
  100. -- A = {
  101. -- name = "+Custom Leader Keys",
  102. -- a = { "<cmd>echo 'first custom command'<cr>", "Description for a" },
  103. -- b = { "<cmd>echo 'second custom command'<cr>", "Description for b" },
  104. -- },
  105. -- }