2021-11-30 19:22:51 +00:00
|
|
|
local vim = require("vim")
|
|
|
|
local cmd = vim.cmd
|
2021-12-06 13:08:36 +00:00
|
|
|
local g = vim.g
|
2021-11-30 19:22:51 +00:00
|
|
|
local o = vim.opt
|
|
|
|
|
|
|
|
cmd[[syntax on]] -- Turn on syntax highlighting
|
|
|
|
|
|
|
|
o.cursorline = true -- Highlight cursor line
|
|
|
|
o.laststatus = 2 -- Always show status line
|
|
|
|
o.number = true -- Show line numbers
|
|
|
|
o.relativenumber = true -- Use relative line numbers
|
|
|
|
o.showmatch = true -- Show matching bracket
|
|
|
|
o.scrolloff = 5 -- Keep 5 lines horizontal scrolloff
|
|
|
|
o.sidescrolloff = 5 -- Keep 5 chars vertical scrolloff
|
2021-12-06 13:05:00 +00:00
|
|
|
o.showmode = false -- Don't display mode (it's on status line anyway)
|
2021-11-30 19:22:51 +00:00
|
|
|
|
|
|
|
-- I wasn't able to find a way to set guioptions directly in lua
|
|
|
|
cmd[[
|
|
|
|
set guioptions-=m " Remove menubar
|
|
|
|
set guioptions-=T " Remove toolbar
|
|
|
|
set guioptions-=r " Remove right-hand scrollbar
|
|
|
|
set guioptions-=L " Remove left-hand scrollbar
|
|
|
|
]]
|
|
|
|
|
2021-12-05 19:09:52 +00:00
|
|
|
-- Override some colorscheme colors
|
|
|
|
-- * Use more noticable cursor line color
|
|
|
|
cmd[[
|
|
|
|
augroup coloroverride
|
|
|
|
autocmd!
|
|
|
|
autocmd ColorScheme * highlight CursorLine guibg=#2b2b2b
|
|
|
|
autocmd ColorScheme * highlight CursorLineNr guifg=#1F85DE ctermfg=LightBlue
|
|
|
|
augroup END
|
|
|
|
]]
|
2021-11-30 19:22:51 +00:00
|
|
|
|
2021-12-07 21:13:59 +00:00
|
|
|
-- Set the colorscheme to default to trigger the above autocmds
|
|
|
|
-- This can be overridden from plugin definitions as this file is ran before those
|
|
|
|
cmd[[colorscheme default]]
|
|
|
|
|
2021-11-30 19:22:51 +00:00
|
|
|
-- Don't use true colors in TTY
|
|
|
|
o.termguicolors = os.getenv("DISPLAY") and true or false
|
2021-12-06 13:08:36 +00:00
|
|
|
|
|
|
|
-- Use proper syntax highlighting in fenced codeblocks
|
|
|
|
g.markdown_fenced_languages = {"html", "javascript", "typescript", "css", "scss", "lua", "vim", "python"}
|