settings.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. -- change terminal title
  2. vim.o.title = true
  3. -- default indentation
  4. vim.o.shiftwidth = 2
  5. vim.o.tabstop = 4
  6. vim.o.expandtab = true
  7. -- permanent undo history
  8. vim.o.undofile = true
  9. -- allow switching buffers
  10. vim.o.hidden = true
  11. -- always scroll (keep current line vertically centered)
  12. vim.o.scrolloff = 999
  13. -- show line numbers
  14. vim.o.number = true
  15. vim.o.relativenumber = true
  16. -- set wordwrap indent
  17. vim.o.wrap = false
  18. vim.o.linebreak = true
  19. vim.o.breakindent = true
  20. vim.o.breakindentopt = 'shift:2,sbr'
  21. -- show whitespace
  22. vim.o.list = true
  23. -- disable search highlight
  24. vim.o.hlsearch = false
  25. -- always show sign column to avoid layout shift when staging
  26. vim.o.signcolumn = 'yes'
  27. -- make a new copy of the file for backup
  28. -- setting to no or auto messes with filewatchers
  29. vim.o.backupcopy = 'yes'
  30. -- disable modelines
  31. vim.o.modeline = false
  32. -- show preview of lines when using :s
  33. vim.o.inccommand = 'split'
  34. -- disable mouse support
  35. vim.o.mouse = false
  36. -- set foldexpr to use treesitter
  37. vim.o.foldmethod = 'expr'
  38. vim.o.foldexpr = 'nvim_treesitter#foldexpr()'
  39. vim.o.foldenable = false
  40. vim.o.shell = '/bin/sh'