My dotfiles
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.

82 lines
1.8 KiB

  1. local g = vim.g
  2. local o = vim.o
  3. local api = vim.api
  4. local opt = vim.opt
  5. local cmd = vim.cmd
  6. local home = os.getenv('HOME')
  7. -- Decrease update time
  8. o.timeoutlen = 500
  9. o.updatetime = 200
  10. -- Number of screen lines to keep above and below the cursor
  11. o.scrolloff = 8
  12. o.number = true
  13. o.relativenumber = true
  14. o.signcolumn = 'yes:1'
  15. o.expandtab = true
  16. -- o.smarttab = true
  17. o.cindent = true
  18. -- o.autoindent = true
  19. o.wrap = false
  20. o.textwidth = 300
  21. o.tabstop = 4
  22. o.shiftwidth = 0
  23. o.softtabstop = -1 -- If negative, shiftwidth value is used
  24. o.list = true
  25. o.listchars = 'trail:·,nbsp:◇,tab:→ ,extends:▸,precedes:◂'
  26. -- OS clipboard
  27. o.clipboard = 'unnamedplus'
  28. -- Mouse in all modes
  29. opt.mouse = 'a'
  30. -- Case insensitive searching UNLESS /C or capital in search
  31. o.ignorecase = true
  32. o.smartcase = true
  33. o.backup = false
  34. o.writebackup = false
  35. o.undofile = true
  36. o.undodir = home .. '/.vim/undodir'
  37. o.swapfile = false
  38. o.splitright = true
  39. o.splitbelow = true
  40. g.lightline = {colorscheme = 'onedark'}
  41. g.mapleader = ' '
  42. g.maplocalleader = ' '
  43. o.termguicolors = true
  44. api.nvim_create_autocmd('ColorScheme', {
  45. command = [[
  46. highlight clear CursorLine
  47. highlight Normal ctermbg=none
  48. highlight Normal guibg=none
  49. highlight LineNr ctermbg=none
  50. highlight LineNr guibg=none
  51. highlight Folded ctermbg=none
  52. highlight Folded guibg=none
  53. highlight NonText ctermbg=none
  54. highlight NonText guibg=none
  55. highlight SpecialKey ctermbg=none
  56. highlight SpecialKey guibg=none
  57. highlight VertSplit ctermbg=none
  58. highlight VertSplit guibg=none
  59. highlight SignColumn ctermbg=none
  60. highlight SignColumn guibg=none
  61. ]]
  62. })
  63. cmd('colorscheme onedark')
  64. -- BUG: this won't update the search count after pressing `n` or `N`
  65. -- When running macros and regexes on a large file, lazy redraw tells neovim/vim not to draw the screen
  66. -- o.lazyredraw = true