This commit is contained in:
abs3nt 2023-02-27 18:27:44 -08:00
commit f34f0dc15a
9 changed files with 1119 additions and 0 deletions

4
.github/README.md vendored Normal file
View File

@ -0,0 +1,4 @@
# absvim
```git clone --depth 1 -b master https://gitea.asdf.cafe/abs3nt/absvim ~/.config/nvim```

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
packer_compiled.lua

5
init.lua Normal file
View File

@ -0,0 +1,5 @@
require('plugins')
require('options')
require('lsp_settings')
require('mappings')
require('autocmds')

159
lua/autocmds.lua Normal file
View File

@ -0,0 +1,159 @@
local autocmd = vim.api.nvim_create_autocmd -- Create autocommand
---- Toggle between line numbers and relative line numbers
local _group = vim.api.nvim_create_augroup("LineNumber", { clear = true })
local function relativeln(target)
if vim.b.lnstatus == nil then
vim.b.lnstatus = "number"
end
if vim.b.lnstatus ~= "nonumber" then
if target == "number" then
vim.o.number = true
vim.o.relativenumber = false
else
vim.o.number = true
vim.o.relativenumber = true
end
else
vim.o.number = false
end
end
autocmd("InsertEnter", {
pattern = "*",
callback = function()
relativeln("number")
end,
once = false,
group = _group,
})
autocmd("InsertLeave", {
pattern = "*",
callback = function()
relativeln("relativenumber")
end,
once = false,
group = _group,
})
autocmd("FocusLost", {
pattern = "*",
callback = function()
relativeln("number")
end,
once = false,
group = _group,
})
autocmd("CursorMoved", {
pattern = "*",
callback = function()
relativeln("relativenumber")
end,
once = false,
group = _group,
})
function Toggleln()
if vim.b.lnstatus == nil then
vim.b.lnstatus = "number"
end
if vim.b.lnstatus == "number" then
vim.o.number = false
vim.o.relativenumber = false
vim.b.lnstatus = "nonumber"
else
vim.o.number = true
vim.o.relativenumber = true
vim.b.lnstatus = "number"
end
end
---- trim whitespace on save
autocmd("BufWritePre", {
pattern = "*",
callback = function()
vim.cmd([[:%s/\s\+$//e]])
end,
once = false,
group = _group,
})
-- change tmux title
autocmd("BufReadPost", {
pattern = "*",
callback = function()
vim.cmd([[call system("tmux rename-window '" . expand("%:t") . "'")]])
end,
once = false,
group = _group,
})
autocmd("FileReadPost", {
pattern = "*",
callback = function()
vim.cmd([[call system("tmux rename-window '" . expand("%:t") . "'")]])
end,
once = false,
group = _group,
})
autocmd("BufNewFile", {
pattern = "*",
callback = function()
vim.cmd([[call system("tmux rename-window '" . expand("%:t") . "'")]])
end,
once = false,
group = _group,
})
autocmd("BufEnter", {
pattern = "*",
callback = function()
vim.cmd([[call system("tmux rename-window '" . expand("%:t") . "'")]])
end,
once = false,
group = _group,
})
-- auto close nvimtree
autocmd('BufEnter', {
command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif",
nested = true,
})
-- dont show line numbers for nvimtree buffers
autocmd("BufEnter",
{
pattern = { "NvimTree*" },
callback = function()
vim.b.lnstatus = "nonumber"
end
})
-- Disable the statusline, tabline and cmdline while the alpha dashboard is open
autocmd('User', {
pattern = 'AlphaReady',
desc = 'disable status, tabline and cmdline for alpha',
callback = function()
vim.go.laststatus = 1
vim.opt.showtabline = 1
vim.opt.cmdheight = 1
end,
})
autocmd('BufUnload', {
buffer = 0,
desc = 'enable status, tabline and cmdline after alpha',
callback = function()
vim.go.laststatus = 2
vim.opt.showtabline = 2
vim.opt.cmdheight = 1
end,
})
-- auto format on write
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
-- syntax fix
vim.cmd("syntax sync fromstart")

70
lua/lsp_settings.lua Normal file
View File

@ -0,0 +1,70 @@
require("mason").setup {
automatic_installation = true
}
-- Setup lspconfig.
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
-- LSP hotkey config
local opts = { noremap = true, silent = true }
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
if client.server_capabilities.colorProvider then
-- Attach document colour support
require("document-color").buf_attach(bufnr, { mode = "background" })
end
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<space>f', vim.lsp.buf.formatting, bufopts)
end
local lsp_flags = {
-- This is the default in Nvim 0.7+
debounce_text_changes = 150,
}
--- initialize language servers
require('mason-lspconfig').setup()
require('mason-lspconfig').setup_handlers {
function(server_name)
require("lspconfig")[server_name].setup {
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
settings = {
Lua = {
diagnostics = {
globals = { 'vim' }
}
},
gopls = {
gofumpt = true
}
}
}
end
}

38
lua/mappings.lua Normal file
View File

@ -0,0 +1,38 @@
local vimp = require('vimp')
-- Map leader
vim.g.mapleader = " "
-- NvimTree
vimp.noremap({ 'silent' }, '<leader>n', [[:NvimTreeToggle<CR>]])
-- Telescope
vimp.noremap({ 'silent' }, '<leader>ff', [[:Telescope find_files<CR>]])
vimp.noremap({ 'silent' }, '<leader>fg', [[:Telescope live_grep<CR>]])
vimp.noremap({ 'silent' }, '<leader>fb', [[:Telescope buffers<CR>]])
-- tabs and stuff
vimp.vnoremap('<C-b>', [[<C-a>]])
vimp.noremap("<Tab>", [[>gv]])
vimp.noremap("<S-Tab>", [[<gv]])
-- tabline
vimp.nnoremap({ 'silent' }, '<A-Right>', [[:TablineBufferNext<CR>]])
vimp.nnoremap({ 'silent' }, '<A-Left>', [[:TablineBufferPrevious<CR>]])
-- markdown
vimp.noremap({ 'silent' }, '<leader>md', [[:MarkdownPreviewToggle<CR>]])
-- Remove search highlight on Enter
vimp.nnoremap("<CR>", [[:nohlsearch<CR><CR>]])
-- Don't lose selection on < or >
vimp.xnoremap("<", [[<gv]])
vimp.xnoremap(">", [[>gv]])
-- ArgWrap
vimp.nnoremap({ 'silent' }, '<leader>a', [[:ArgWrap<CR>]])
-- Toggle Line
vimp.nnoremap({ 'silent' }, '<leader>l', [[:lua Toggleln()<CR>]])

64
lua/options.lua Normal file
View File

@ -0,0 +1,64 @@
-- globals
vim.g.colorizer_auto_color = 1
vim.g.tmuxline_previm = "minimal"
vim.g.powerline_pycmd = "py3"
vim.g.tex_flavor = "latex"
-- dictionary
vim.o.dictionary = "/usr/dict/words"
-- colors
vim.o.termguicolors = true
-- Better display for messages
vim.o.cmdheight = 1
-- You will have bad experience for diagnostic messages when it's default 4000.
vim.o.updatetime = 300
vim.o.mmp = 5000
-- don't give |ins-completion-menu| messages.
vim.o.hidden = true
vim.o.signcolumn = 'yes'
vim.o.encoding = 'utf-8'
vim.o.shortmess = 'c'
vim.o.autoread = true
vim.o.backspace = 'indent,eol,start'
vim.o.ruler = true
vim.o.showmode = true
vim.o.history = 1000
vim.o.hidden = true
vim.o.ignorecase = true
vim.o.smartcase = true
vim.o.hlsearch = true
vim.o.incsearch = true
vim.o.showmatch = true
vim.o.laststatus = 2
vim.o.autoindent = true
vim.o.cindent = true
vim.o.shiftwidth = 2
vim.o.softtabstop = 2
vim.o.tabstop = 2
vim.o.expandtab = true
vim.o.scrolloff = 5
vim.o.foldmethod = 'indent'
vim.o.foldlevel = 99
vim.wo.wrap = false
vim.o.showcmd = true
vim.o.number = true
vim.o.relativenumber = true
vim.o.mouse = 'a'
vim.o.redrawtime = 10000
vim.o.inccommand = 'split'
---- Sync " and + registers
vim.o.clipboard = 'unnamedplus'
-- show completion options on <TAB>
vim.o.wildmenu = true
-- complete only up to the point of ambiguity
vim.o.wildmode = 'list:longest'
vim.opt.backupdir = os.getenv("XDG_CACHE_HOME") .. '/nvim/backup//'
vim.o.directory = os.getenv("XDG_CACHE_HOME") .. '/nvim/swap//'
vim.o.undodir = os.getenv("XDG_CACHE_HOME") .. '/nvim/undo//'
vim.o.undofile = true

366
lua/plugins.lua Normal file
View File

@ -0,0 +1,366 @@
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
return require('packer').startup({ function(use)
-- packer
use 'wbthomason/packer.nvim'
-- brrrrr (in init.lua)
use 'lewis6991/impatient.nvim'
--vimp (in mappings.lua)
use 'svermeulen/vimpeccable'
--nim
use 'alaviss/nim.nvim'
-- golang
use 'fatih/vim-go'
-- obsession
use 'tpope/vim-obsession'
--rust
use {
'simrat39/rust-tools.nvim',
config = function()
local rt = require('rust-tools')
rt.setup({
server = {
on_attach = function(_, bufnr)
-- Hover actions
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
-- Code action groups
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
end
}
})
end
}
--lsp (in lsp_settings.lua)
use 'neovim/nvim-lspconfig'
use 'williamboman/mason-lspconfig'
use 'williamboman/mason.nvim'
use 'mfussenegger/nvim-dap'
-- auto color hex/rgb
use {
'norcalli/nvim-colorizer.lua',
config = function() require('colorizer').setup() end,
}
use {
'mrshmllow/document-color.nvim',
config = function()
require('document-color').setup {
mode = "background",
}
end
}
-- Markdown preview
use {
"iamcco/markdown-preview.nvim",
run = "cd app && npm install",
setup = function()
vim.g.mkdp_filetypes = { "markdown" }
vim.g.mkdp_markdown_css = os.getenv("XDG_CONFIG_HOME") .. '/nvim/static/custom.css'
vim.g.mkdp_highlight_css = os.getenv("XDG_CACHE_HOME") .. '/wal/colors.css'
vim.g.mkdp_browser = 'surf'
vim.g.mkdp_echo_preview_url = 1
end,
ft = { "markdown" }
}
use {
"ellisonleao/glow.nvim",
config = function()
require('glow').setup({})
end
}
-- auto pairs
use {
'windwp/nvim-autopairs',
config = function()
require('nvim-autopairs').setup {}
end
}
-- show git diffs
use {
'lewis6991/gitsigns.nvim',
config = function() require('gitsigns').setup() end
}
-- fuzzy finder
use {
'nvim-telescope/telescope.nvim',
branch = '0.1.x',
requires = {
'nvim-lua/plenary.nvim',
}
}
-- file explorer
use {
'kyazdani42/nvim-tree.lua',
config = function()
require('nvim-tree').setup {
sort_by = "case_sensitive",
view = {
adaptive_size = true,
mappings = {
list = {
{ key = "u", action = "dir_up" },
},
},
},
renderer = {
group_empty = true,
},
}
end
}
-- open file at last location
use {
'ethanholz/nvim-lastplace',
config = function()
require('nvim-lastplace').setup {
lastplace_open_folds = true
}
end
}
-- multiple cursors
use 'mg979/vim-visual-multi'
-- wrap things inside pairs
use 'FooSoft/vim-argwrap'
-- which key
use {
"folke/which-key.nvim",
config = function()
require("which-key").setup {}
end
}
-- pasting indents
use {
'hrsh7th/nvim-pasta',
config = function()
require('pasta').setup {
converters = {
require('pasta.converters').indentation,
},
paste_mode = true,
next_key = vim.api.nvim_replace_termcodes('<C-p>', true, true, true),
prev_key = vim.api.nvim_replace_termcodes('<C-n>', true, true, true),
}
end
}
use {
"hrsh7th/nvim-cmp",
requires = {
{ "hrsh7th/cmp-nvim-lsp" },
{ "hrsh7th/cmp-nvim-lua" },
{ "hrsh7th/cmp-buffer" },
{ "hrsh7th/cmp-path" },
{ "hrsh7th/cmp-cmdline" },
{ "L3MON4D3/LuaSnip" },
{ "saadparwaiz1/cmp_luasnip" },
{ "rafamadriz/friendly-snippets" },
{ "f3fora/cmp-spell", { "hrsh7th/cmp-calc" }, { "hrsh7th/cmp-emoji" } },
},
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
local cmp = require 'cmp'
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
}, {
{ name = 'buffer' },
})
})
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = 'buffer' },
})
})
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
})
end,
}
-- terminal toggler
use {
"NvChad/nvterm",
config = function()
require("nvterm").setup()
local toggle_modes = { 'n', 't' }
local mappings = {
{ toggle_modes, '<leader>th', function() require("nvterm.terminal").toggle('horizontal') end },
{ toggle_modes, '<leader>tv', function() require("nvterm.terminal").toggle('vertical') end },
{ toggle_modes, '<leader>tf', function() require("nvterm.terminal").toggle('float') end },
}
local opts = { noremap = true, silent = true }
for _, mapping in ipairs(mappings) do
vim.keymap.set(mapping[1], mapping[2], mapping[3], opts)
end
end
}
--- THEME STUFF
-- colors
use {
'AlphaTechnolog/pywal.nvim',
as = 'pywal',
config = function()
local pywal = require('pywal')
pywal.setup()
end
}
-- better statusbar
use {
'hoob3rt/lualine.nvim',
requires = { { 'kyazdani42/nvim-web-devicons', opt = true } },
config = function()
require('lualine').setup({ options = { theme = 'pywal-nvim' } })
end,
after = 'pywal'
}
-- better tabs
use {
'kdheepak/tabline.nvim',
requires = { { 'kyazdani42/nvim-web-devicons', opt = true } },
config = function()
require('tabline').setup({ options = { theme = 'pywal-nvim' } })
end,
after = { 'pywal' }
}
-- fwatch updates colors automatically
use {
'rktjmp/fwatch.nvim',
config = function()
require('fwatch').watch(os.getenv("XDG_CACHE_HOME") .. "/wal/colors",
{ on_event = function()
vim.defer_fn(function()
vim.cmd('colorscheme pywal')
end, 100)
end })
end,
after = 'pywal'
}
-- greeter
use {
'goolord/alpha-nvim',
requires = { 'kyazdani42/nvim-web-devicons' },
config = function()
local alpha = require('alpha')
local dashboard = require('alpha.themes.dashboard')
dashboard.section.header.val = {
[[ ▄▄▄ ▄▄▄▄ ██████ ███▄ █ ▄▄▄█████▓]],
[[▒████▄ ▓█████▄ ▒██ ▒ ██ ▀█ █ ▓ ██▒ ▓▒]],
[[▒██ ▀█▄ ▒██▒ ▄██░ ▓██▄ ▓██ ▀█ ██▒▒ ▓██░ ▒░]],
[[░██▄▄▄▄██ ▒██░█▀ ▒ ██▒▓██▒ ▐▌██▒░ ▓██▓ ░ ]],
[[ ▓█ ▓██▒░▓█ ▀█▓▒██████▒▒▒██░ ▓██░ ▒██▒ ░ ]],
[[ ▒▒ ▓▒█░░▒▓███▀▒▒ ▒▓▒ ▒ ░░ ▒░ ▒ ▒ ▒ ░░ ]],
[[ ▒ ▒▒ ░▒░▒ ░ ░ ░▒ ░ ░░ ░░ ░ ▒░ ░ ]],
[[ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ]],
[[ ░ ░ ░ ░ ░ ]],
[[ ░ ]]
}
dashboard.section.buttons.val = {
dashboard.button("e", " New file", ":ene <BAR> startinsert <CR>"),
dashboard.button("r", " Recently used files", ":Telescope oldfiles<CR>"),
dashboard.button("f", " Find file", ":Telescope find_files<CR>"),
dashboard.button("t", " Find text", ":Telescope live_grep <CR>"),
dashboard.button("s", " Settings",
":e $HOME/.config/nvim/init.lua | :cd %:p:h | split . | wincmd k | pwd<CR>"),
dashboard.button("q", " Quit NVIM", ":qa<CR>"),
}
local handle = assert(io.popen('fortune -s'))
local fortune = handle:read("*all")
handle:close()
dashboard.section.footer.val = fortune
dashboard.section.header.opts.hl = "Title"
dashboard.section.buttons.opts.hl = "Debug"
dashboard.section.footer.opts.hl = "Conceal"
dashboard.config.opts.noautocmd = true
dashboard.config.opts.setup = function()
vim.b.lnstatus = "nonumber"
end
alpha.setup(dashboard.opts)
end
}
if packer_bootstrap then
require('packer').sync()
end
end,
config = {
display = {
open_fn = function()
return require('packer.util').float({ border = 'single' })
end
}
} })

412
static/custom.css Normal file
View File

@ -0,0 +1,412 @@
body { background-color: var(--background); }
.markdown-body ol ol,
.markdown-body ul ol,
.markdown-body ol ul,
.markdown-body ul ul,
.markdown-body ol ul ol,
.markdown-body ul ul ol,
.markdown-body ol ul ul,
.markdown-body ul ul ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body {
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 16px;
color: var(--foreground);
line-height: 1.6;
word-wrap: break-word;
padding: 45px;
background: var(--background);
border: 0px solid var(--foreground);
-webkit-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
}
.markdown-body > *:first-child {
margin-top: 0 !important;
}
.markdown-body > *:last-child {
margin-bottom: 0 !important;
}
.markdown-body .table-of-contents ol {
list-style: none;
}
.markdown-body .table-of-contents > ol {
padding-left: 0;
}
.markdown-body * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .anchor,
.markdown-body h2 .anchor,
.markdown-body h3 .anchor,
.markdown-body h4 .anchor,
.markdown-body h5 .anchor,
.markdown-body h6 .anchor {
margin-left: -24px;
visibility: hidden;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
visibility: visible;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
background-color: var(--background) !important; /* Changes background of code block */
}
.markdown-body h1 {
margin: 0.67em 0;
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid var(--color4);
color: var(--color13) !important;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid var(--color4);
color: var(--color12) !important;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h6 {
font-size: 1em;
color: var(--color8) !important;
}
.markdown-body hr {
margin-top: 20px;
margin-bottom: 20px;
height: 0;
border: 0;
border-top: 1px solid var(--color4);
}
.markdown-body ol,
.markdown-body ul {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ol ul,
.markdown-body ul ul {
list-style-type: circle;
}
.markdown-body ol ul ul,
.markdown-body ul ul ul {
list-style-type: square;
}
.markdown-body ol {
list-style-type: decimal;
}
.markdown-body ul {
list-style-type: disc;
/* color: var(--color9) !important; */ /* changes color of all bullet lists */
}
li::marker {
color: var(--color14) !important; /* changes color of bullet points */
}
.markdown-body dl {
margin-bottom: 1.3em
}
.markdown-body dl dt {
font-weight: 700;
}
.markdown-body dl dd {
margin-left: 0;
}
.markdown-body dl dd p {
margin-bottom: 0.8em;
}
.markdown-body blockquote {
margin-left: 0;
margin-right: 0;
padding: 0 15px;
color: var(--color8) !important;
border-left: 4px solid var(--color3) !important; /* border denoting block quote */
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body table tr {
background-color: var(--background) !important; /* Changes bacground color of tables */
border-top: 1px solid var(--color4);
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid var(--color4); /* color of table cells/border */
}
.markdown-body pre {
word-wrap: normal;
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
font-size: 100%;
line-height: inherit;
word-wrap: normal;
white-space: pre;
-webkit-border-radius: 3px;
border-radius: 3px;
background-color: transparent;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\00a0";
}
.markdown-body a {
color: var(--color2) !important; /* Change style of hyperlinks */
text-decoration: underline;
background: transparent;
}
.markdown-body img {
max-width: 100%;
max-height: 100%;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body em {
font-style: italic;
}
.markdown-body del {
text-decoration: line-through;
}
.task-list-item {
list-style-type: none;
}
.task-list-item input {
font: 13px/1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
margin: 0 0.35em 0.25em -1.6em;
vertical-align: middle;
}
.task-list-item input[disabled] {
cursor: default;
}
.task-list-item input[type="checkbox"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.task-list-item input[type="radio"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
/* Below are the page settings */
#page-ctn {
margin: 0 auto;
max-width: 900px;
}
#page-header {
padding: 8px;
background-color: var(--background) !important;
border-color: var(--foreground) !important;
border-style: solid;
border-width: 1px 1px 0;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
#page-header svg {
display: inline-block;
margin-right: 5px;
overflow: hidden;
fill: var(--foreground) !important;
}
#page-header h3 {
display: flex;
align-items: center;
margin-top: 0;
margin-bottom: 0;
padding-right: 16px;
font-size: 14px;
font-weight: 600;
color: var(--foreground) !important;
}
/* Highlight settings */
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
/* color: #333; */
color: var(--color7) !important;
background: var(--background) !important;
}
.hljs-comment,
.hljs-quote {
color: var(--color8) !important; /* color of comments */
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: var(--color4) !important;
font-weight: bold;
}
.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color: var(--color5) !important;
}
.hljs-string,
.hljs-doctag {
color: var(--color1) !important;
}
.hljs-title,
.hljs-section,
.hljs-selector-id {
color: var(--color3) !important; /* Color of function title */
font-weight: bold;
}
.hljs-subst {
font-weight: normal;
}
.hljs-type,
.hljs-class .hljs-title {
color: var(--color2) !important; /* Color of class title */
font-weight: bold;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
font-weight: normal;
color: var(--color6) !important; /* Color of XML/HTML tags */
}
.hljs-regexp,
.hljs-link {
/* color: #009926; */
color: var(--color9) !important;
}
.hljs-symbol,
.hljs-bullet {
/* color: #990073; */
color: var(--color10) !important;
}
.hljs-built_in,
.hljs-builtin-name {
/* color: #0086b3; */
color: var(--color12) !important;
}
.hljs-meta {
color: var(--color8) !important; /* Color of meta tags */
font-weight: bold;
}
.hljs-deletion {
background: var(--color3);
}
.hljs-addition {
background: #dfd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
.katex-html {
color: var(--color6);
}