init.vim 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 (using native LSP in lsp.lua)
  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 to favor tpope/vim-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. get plugin configs
  22. source $XDG_CONFIG_HOME/nvim/plug-conf/fern.vim
  23. source $XDG_CONFIG_HOME/nvim/plug-conf/emmet.vim
  24. source $XDG_CONFIG_HOME/nvim/plug-conf/ctrlp.vim
  25. source $XDG_CONFIG_HOME/nvim/plug-conf/sneak.vim
  26. source $XDG_CONFIG_HOME/nvim/plug-conf/airline.vim
  27. source $XDG_CONFIG_HOME/nvim/plug-conf/startify.vim
  28. source $XDG_CONFIG_HOME/nvim/plug-conf/wilder.vim
  29. source $XDG_CONFIG_HOME/nvim/plug-conf/vcoolor.vim
  30. source $XDG_CONFIG_HOME/nvim/plug-conf/better-whitespace.vim
  31. source $XDG_CONFIG_HOME/nvim/plug-conf/vimspector.vim
  32. " 4. Lua configurations
  33. lua require 'treesitter'
  34. lua require 'lsp'
  35. lua require 'telescope-conf'
  36. lua require 'refactoring-conf'
  37. lua require 'gitsigns-conf'
  38. lua require 'indent-blankline'
  39. lua require 'whichkey'
  40. lua require 'colorizer'.setup()
  41. " 5. get theme, keybinds, and autocommands
  42. source $XDG_CONFIG_HOME/nvim/theme/theme.vim
  43. source $XDG_CONFIG_HOME/nvim/keys/bindings.vim
  44. source $XDG_CONFIG_HOME/nvim/keys/tex-macros.vim
  45. source $XDG_CONFIG_HOME/nvim/general/auto.vim
  46. " enable intelligent indentation
  47. filetype plugin indent on