init.vim 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. " noah's $VIMINIT
  2. " 1. Essential Neovim 0.11+ fixes and environment setup
  3. lua << EOF
  4. -- Add paths to RTP
  5. local site = vim.fn.expand("~/.local/share/nvim/site/")
  6. local ts_runtime = vim.fn.expand("~/.cache/vim/plugged/nvim-treesitter/runtime/")
  7. vim.opt.runtimepath:prepend(site)
  8. vim.opt.runtimepath:prepend(ts_runtime)
  9. -- Disable built-in LSP mappings
  10. local builtins = { 'grn', 'gra', 'grr', 'gri', 'grt' }
  11. for _, k in ipairs(builtins) do
  12. pcall(vim.keymap.del, 'n', k, { builtin = true })
  13. end
  14. -- Disable built-in commentary
  15. vim.g.loaded_commentary = 1
  16. EOF
  17. " 2. get basic (set)tings
  18. source $XDG_CONFIG_HOME/nvim/general/basic.vim
  19. " get plugins
  20. source $XDG_CONFIG_HOME/nvim/vim-plug/plugins.vim
  21. " 3. Load Theme FIRST (important for Treesitter highlight groups)
  22. source $XDG_CONFIG_HOME/nvim/theme/theme.vim
  23. " 4. get plugin configs
  24. source $XDG_CONFIG_HOME/nvim/plug-conf/fern.vim
  25. source $XDG_CONFIG_HOME/nvim/plug-conf/emmet.vim
  26. source $XDG_CONFIG_HOME/nvim/plug-conf/ctrlp.vim
  27. source $XDG_CONFIG_HOME/nvim/plug-conf/sneak.vim
  28. source $XDG_CONFIG_HOME/nvim/plug-conf/airline.vim
  29. source $XDG_CONFIG_HOME/nvim/plug-conf/startify.vim
  30. source $XDG_CONFIG_HOME/nvim/plug-conf/wilder.vim
  31. source $XDG_CONFIG_HOME/nvim/plug-conf/vcoolor.vim
  32. source $XDG_CONFIG_HOME/nvim/plug-conf/better-whitespace.vim
  33. source $XDG_CONFIG_HOME/nvim/plug-conf/vimspector.vim
  34. " 5. Lua configurations (LSP and Treesitter)
  35. lua require 'treesitter'
  36. lua require 'lsp'
  37. lua require 'telescope-conf'
  38. lua require 'refactoring-conf'
  39. lua require 'gitsigns-conf'
  40. lua require 'indent-blankline'
  41. lua require 'whichkey'
  42. lua require 'colorizer'.setup()
  43. " 6. get keybinds and autocommands
  44. source $XDG_CONFIG_HOME/nvim/keys/bindings.vim
  45. source $XDG_CONFIG_HOME/nvim/keys/tex-macros.vim
  46. source $XDG_CONFIG_HOME/nvim/general/auto.vim
  47. " enable intelligent indentation
  48. filetype plugin indent on