local HOME = os.getenv("HOME")

vim.opt.number = true
vim.opt.hlsearch = false
vim.opt.relativenumber = true
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.swapfile = false
vim.opt.undodir = HOME .. "/.vim/undodir"
vim.opt.undofile = true
vim.opt.scrolloff = 8
vim.opt.showmode = false
vim.opt.winblend = 0
vim.opt.wildoptions = "pum"
vim.opt.pumblend = 5
vim.opt.background = "dark"
vim.opt.cursorline = true
vim.opt.cmdheight = 2
vim.opt.hidden = true
vim.opt.termguicolors = true
vim.opt.completeopt = { "menu", "menuone", "noselect" }
vim.opt.signcolumn = "yes"
vim.o.guifont = "Roboto Mono for Powerline:h14"
vim.o.winborder = "rounded"

-- temp solution to force sync parsing for treesitter due to flickering
-- see gh issue: https://github.com/neovim/neovim/issues/32660
vim.g._ts_force_sync_parsing = true

vim.cmd([[
syntax on
syntax enable
hi CursorLine cterm=NONE ctermbg=237 ctermfg=NONE
set clipboard+=unnamedplus
]])

if vim.g.neovide then
  vim.opt.linespace = 4
  vim.g.neovide_cursor_animation_length = 0
end
