Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.7 KiB

  1. -- Enable syntax highlighting
  2. vim.opt.syntax = "on"
  3. -- Autocomplete settings in command mode
  4. vim.opt.wildmenu = true
  5. vim.opt.wildmode = "longest,list,full"
  6. -- Various settings
  7. vim.opt.autoread = true
  8. vim.opt.backspace = { "indent", "eol", "start" }
  9. vim.opt.splitright = true
  10. vim.opt.splitbelow = true
  11. vim.opt.lazyredraw = false
  12. vim.opt.ttyfast = true
  13. vim.opt.wrap = false
  14. vim.opt.backup = false
  15. vim.opt.writebackup = false
  16. vim.opt.swapfile = false
  17. vim.opt.errorbells = false
  18. vim.opt.visualbell = false
  19. vim.opt.history = 500
  20. vim.opt.hidden = true
  21. vim.opt.ignorecase = true
  22. vim.opt.smartcase = true
  23. vim.opt.incsearch = true
  24. vim.opt.timeoutlen = 500
  25. vim.opt.ttimeoutlen = 0
  26. vim.opt.showcmd = true
  27. vim.cmd('nohlsearch')
  28. vim.opt.scrolloff = 5
  29. vim.opt.sidescrolloff = 10
  30. vim.opt.shortmess:append("c")
  31. vim.opt.updatetime = 300
  32. -- Persistent undo settings
  33. vim.opt.undodir = vim.fn.expand('~/.local/share/vim/undo/')
  34. vim.opt.undofile = true
  35. vim.opt.undolevels = 1000
  36. vim.opt.undoreload = 10000
  37. -- Wildignore settings
  38. vim.opt.wildignore:append({"*/tmp/*", "*.so", "*.zip", "*/vendor/bundle/*", "*/node_modules/"})
  39. -- Autocommand to disable auto commenting on new lines
  40. vim.api.nvim_create_autocmd("FileType", {
  41. pattern = "*",
  42. callback = function()
  43. vim.opt_local.formatoptions:remove("c")
  44. vim.opt_local.formatoptions:remove("r")
  45. vim.opt_local.formatoptions:remove("o")
  46. end
  47. })
  48. -- Filetype settings
  49. vim.cmd('filetype off')
  50. vim.cmd('filetype plugin on')
  51. -- Autocomplete settings
  52. vim.opt.completeopt = {"menu", "menuone", "noselect"}
  53. -- Folding settings
  54. vim.o.foldcolumn = '1' -- '0' is not bad
  55. vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
  56. vim.o.foldlevelstart = 99
  57. vim.o.foldenable = true