options.lua 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. vim.opt.guifont = "monospace:h17" -- the font used in graphical neovim applications
  2. -- Make line numbers default
  3. vim.opt.number = true
  4. vim.opt.relativenumber = true
  5. -- Enable mouse mode, can be useful for resizing splits for example!
  6. vim.opt.mouse = "a"
  7. -- Don't show the mode, since it's already in status line
  8. vim.opt.showmode = false
  9. -- Sync clipboard between OS and Neovim.
  10. -- Remove this option if you want your OS clipboard to remain independent.
  11. -- See `:help 'clipboard'`
  12. vim.opt.clipboard = "unnamedplus"
  13. -- Enable break indent
  14. vim.opt.breakindent = true
  15. -- Save undo history
  16. vim.opt.undofile = true
  17. -- Case-insensitive searching UNLESS \C or capital in search
  18. vim.opt.ignorecase = true
  19. vim.opt.smartcase = true
  20. -- Search as characters are entered
  21. vim.opt.incsearch = true
  22. -- Highlight search
  23. vim.opt.hlsearch = true
  24. -- Keep signcolumn on by default
  25. vim.opt.signcolumn = "yes"
  26. -- Decrease update time
  27. vim.opt.updatetime = 250
  28. vim.opt.timeoutlen = 300
  29. -- Configure how new splits should be opened
  30. vim.opt.splitright = true
  31. vim.opt.splitbelow = true
  32. -- Sets how neovim will display certain whitespace in the editor.
  33. -- See :help 'list'
  34. -- and :help 'listchars'
  35. vim.opt.list = true
  36. vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
  37. -- Preview substitutions live, as you type!
  38. vim.opt.inccommand = "split"
  39. -- Show which line your cursor is on
  40. vim.opt.cursorline = true
  41. -- Minimal number of screen lines to keep above and below the cursor.
  42. vim.opt.scrolloff = 10
  43. vim.opt.wrap = false
  44. vim.opt.colorcolumn = "120"
  45. vim.opt.swapfile = false
  46. vim.opt.backup = false
  47. vim.opt.termguicolors = true
  48. vim.opt.showmatch = true
  49. vim.opt.signcolumn = "yes"
  50. vim.opt.isfname:append("@-@")
  51. -- Give more space for displaying messages.
  52. vim.opt.cmdheight = 1
  53. -- Don't pass messages to |ins-completion-menu|.
  54. vim.opt.shortmess:append("c")
  55. vim.opt.completeopt = { "menuone", "noselect" }
  56. vim.opt.pumheight = 10
  57. vim.opt.pumblend = 10
  58. local group = vim.api.nvim_create_augroup("highlight_yank", { clear = true })
  59. vim.api.nvim_create_autocmd("TextYankPost", {
  60. callback = function()
  61. vim.highlight.on_yank({ higroup = "IncSearch", timeout = 50 })
  62. end,
  63. group = group,
  64. })
  65. vim.opt.foldmethod = "indent"
  66. vim.opt.foldnestmax = 3
  67. vim.opt.foldenable = false
  68. vim.g.netrw_browse_split = 0
  69. vim.g.netrw_banner = 0
  70. vim.g.netrw_winsize = 25
  71. vim.g.netrw_liststyle = 3
  72. vim.g.netrw_localrmdir = "rm -r"
  73. vim.g.netrw_browse_split = 0
  74. vim.g.netrw_banner = 0
  75. vim.g.netrw_winsize = 25
  76. vim.filetype.add({
  77. extension = {
  78. templ = "templ",
  79. njk = "html",
  80. },
  81. })
  82. vim.filetype.add({
  83. extension = { rasi = "rasi" },
  84. pattern = {
  85. [".*/waybar/config"] = "jsonc",
  86. [".*/mako/config"] = "dosini",
  87. [".*/kitty/*.conf"] = "bash",
  88. [".*/hypr/.*%.conf"] = "hyprlang",
  89. },
  90. })