lv-config.example-no-ts.lua 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 = {}
  45. O.treesitter.ignore_install = { "haskell" }
  46. O.treesitter.highlight.enabled = true
  47. -- generic LSP settings
  48. -- you can set a custom on_attach function that will be used for all the language servers
  49. -- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>
  50. -- O.lsp.on_attach_callback = function(client, bufnr)
  51. -- local function buf_set_option(...)
  52. -- vim.api.nvim_buf_set_option(bufnr, ...)
  53. -- end
  54. -- --Enable completion triggered by <c-x><c-o>
  55. -- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
  56. -- end
  57. -- python
  58. O.lang.python.diagnostics.virtual_text = true
  59. O.lang.python.analysis.use_library_code_types = true
  60. -- To change default formatter from yapf to black
  61. -- O.lang.python.formatter.exe = "black"
  62. -- O.lang.python.formatter.args = {"-"}
  63. -- To change enabled linters
  64. -- https://github.com/mfussenegger/nvim-lint#available-linters
  65. -- O.lang.python.linters = { "flake8", "pylint", "mypy", ... }
  66. -- go
  67. -- To change default formatter from gofmt to goimports
  68. -- O.lang.formatter.go.exe = "goimports"
  69. -- javascript
  70. O.lang.tsserver.linter = nil
  71. -- latex
  72. -- O.lang.latex.auto_save = false
  73. -- O.lang.latex.ignore_errors = { }
  74. -- Additional Plugins
  75. -- O.user_plugins = {
  76. -- {"folke/tokyonight.nvim"}, {
  77. -- "ray-x/lsp_signature.nvim",
  78. -- config = function() require"lsp_signature".on_attach() end,
  79. -- event = "InsertEnter"
  80. -- }
  81. -- }
  82. -- Autocommands (https://neovim.io/doc/user/autocmd.html)
  83. -- O.user_autocommands = {{ "BufWinEnter", "*", "echo \"hi again\""}}
  84. -- Additional Leader bindings for WhichKey
  85. -- O.user_which_key = {
  86. -- A = {
  87. -- name = "+Custom Leader Keys",
  88. -- a = { "<cmd>echo 'first custom command'<cr>", "Description for a" },
  89. -- b = { "<cmd>echo 'second custom command'<cr>", "Description for b" },
  90. -- },
  91. -- }