set.lua 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --
  2. -- General settings
  3. --
  4. -- vim.opt.autochdir = true -- Switch to the current file directory
  5. --
  6. -- Backups and swap files
  7. --
  8. vim.opt.backup = true
  9. -- vim.opt.backupdir = "~/.cache/nvim/backups"
  10. -- vim.opt.directory = "~/.cache/nvim/swap"
  11. --
  12. -- UI settings
  13. --
  14. vim.opt.title = true -- Show title
  15. vim.opt.number = true -- Show line numbers
  16. vim.opt.ruler = true -- Show the line and column number of the cursor postion
  17. vim.opt.confirm = true -- raise a dialog asking what to do instead of failing
  18. vim.opt.mouse = "" -- Disable mouse
  19. vim.opt.shortmess = "a" -- Show all abbreviations on status line
  20. --
  21. -- Editor settings
  22. --
  23. vim.opt.report = 0 -- Agressive reporting
  24. vim.opt.autoindent = true -- Copy indent from current line when starting a new line
  25. vim.opt.smartindent = true -- Do smart autoindenting when starting a new line.
  26. vim.opt.expandtab = true -- Convert tabs to space
  27. vim.opt.tabstop = 4 -- Number of spaces that a <Tab> in the file counts for
  28. vim.opt.shiftwidth = 4 -- Number of spaces to use for each step of (auto)indent
  29. vim.opt.shiftround = true -- Round indent to multiple of 'shiftwidth'
  30. vim.opt.softtabstop = 4 -- Number of spaces that a <Tab> counts for while editing
  31. vim.opt.showmatch = true -- When a bracket is inserted, briefly jump to the matching one
  32. vim.opt.infercase = true -- Infer case when doing keyword completion
  33. --
  34. -- Search settings
  35. --
  36. vim.opt.hlsearch = true -- When there is a previous search pattern, highlight the matches
  37. vim.opt.ignorecase = true -- Ignore case in search patterns