require("config.lazy")

vim.opt.title = true
vim.opt.background = 'dark'
vim.opt.guicursor = ''
vim.opt.mouse = 'a'
vim.opt.hlsearch = false
vim.opt.clipboard:append('unnamedplus')
vim.opt.showmode = false
vim.opt.ruler = false
vim.opt.laststatus = 0
vim.opt.showcmd = false

vim.cmd('highlight Normal ctermbg=NONE guibg=NONE')

-- Some basics:
vim.api.nvim_set_keymap('n', 'c', '"_c', { noremap = true })
vim.opt.compatible = false
vim.cmd('filetype plugin on')
vim.cmd('syntax on')
vim.opt.encoding = 'utf-8'
vim.opt.number = true
vim.opt.relativenumber = true

-- Enable autocompletion:
vim.opt.wildmode = { 'longest', 'list', 'full' }

-- Disables automatic commenting on newline:
vim.api.nvim_exec([[
  autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
]], false)

-- Perform dot commands over visual blocks:
vim.api.nvim_set_keymap('v', '.', ':normal .<CR>', { noremap = true })

-- Goyo plugin makes text more readable when writing prose:
vim.api.nvim_set_keymap('n', '<leader>f', ':Goyo | set bg=light | set linebreak<CR>', { noremap = true })

-- Spell-check set to <leader>o, 'o' for 'orthography':
vim.api.nvim_set_keymap('n', '<leader>o', ':setlocal spell! spelllang=en_us<CR>', { noremap = true })

-- Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
vim.opt.splitbelow = true
vim.opt.splitright = true

-- Shortcutting split navigation, saving a keypress:
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', { noremap = true })
vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', { noremap = true })
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', { noremap = true })
vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', { noremap = true })



vim.o.background = "dark" -- or "light" for light mode

require("solarizedDark").setup({
  transparent_mode = true,
})

vim.cmd([[colorscheme solarizedDark]])
