settings.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. -- Impatient
  2. require("impatient")
  3. -- Autocmds
  4. vim.cmd([[
  5. augroup CursorLine
  6. au!
  7. au VimEnter * setlocal cursorline
  8. au WinEnter * setlocal cursorline
  9. au BufWinEnter * setlocal cursorline
  10. au WinLeave * setlocal nocursorline
  11. augroup END
  12. autocmd FileType nix setlocal shiftwidth=4
  13. ]])
  14. local o = vim.opt
  15. local g = vim.g
  16. -- Show line
  17. o.colorcolumn = "80"
  18. g.loaded_netrw = 1
  19. g.loaded_netrwPlugin = 1
  20. -- Performance
  21. o.lazyredraw = true
  22. o.shell = "bash"
  23. o.shadafile = "NONE"
  24. -- Colors
  25. o.termguicolors = true
  26. -- Undo files
  27. o.undofile = true
  28. -- Indentation
  29. o.smartindent = true
  30. o.tabstop = 4
  31. o.shiftwidth = 2
  32. o.shiftround = true
  33. o.expandtab = true
  34. o.scrolloff = 3
  35. -- Set clipboard to use system clipboard
  36. o.clipboard = "unnamedplus"
  37. -- Use mouse
  38. o.mouse = "a"
  39. -- Nicer UI settings
  40. o.cursorline = true
  41. o.relativenumber = true
  42. o.number = true
  43. -- Get rid of annoying viminfo file
  44. o.viminfo = ""
  45. o.viminfofile = "NONE"
  46. -- Miscellaneous quality of life
  47. o.ignorecase = true
  48. o.hidden = true
  49. o.shortmess = "atI"
  50. o.wrap = false
  51. o.backup = false
  52. o.writebackup = false
  53. o.errorbells = false
  54. o.swapfile = false
  55. o.showmode = false
  56. o.laststatus = 3
  57. o.pumheight = 6
  58. o.splitright = true
  59. o.splitbelow = true
  60. o.completeopt = "menu,menuone,noselect"