colors and tabs

This commit is contained in:
RingOfStorms (Joshua Bell) 2023-07-20 04:18:36 -05:00
parent e7ca29410d
commit a3f8af7fea
4 changed files with 70 additions and 46 deletions

View file

@ -27,7 +27,7 @@ require("util").keymaps({
["<C-d>"] = { "<C-d>zz", desc = "Vertical half page down and center cursor" }, ["<C-d>"] = { "<C-d>zz", desc = "Vertical half page down and center cursor" },
["<C-u>"] = { "<C-u>zz", desc = "Vertical half page up and center cursor" }, ["<C-u>"] = { "<C-u>zz", desc = "Vertical half page up and center cursor" },
["<leader>y"] = { '"*y', desc = "Copy to system clipboard" }, ["<leader>y"] = { '"*y', desc = "Copy to system clipboard" },
["<Leader>p"] = { '"*p', desc = "Paste from system clipboard" }, ["<leader>p"] = { '"*p', desc = "Paste from system clipboard" },
["<leader>Q"] = { ":qa<CR>", desc = "Quit all" }, ["<leader>Q"] = { ":qa<CR>", desc = "Quit all" },
["J"] = { "mzJ`z", desc = "Move line below onto this line" }, ["J"] = { "mzJ`z", desc = "Move line below onto this line" },
-- window navigation -- window navigation
@ -66,7 +66,9 @@ require("util").keymaps({
desc = "Generate and replace UUID", desc = "Generate and replace UUID",
}, },
["<leader>y"] = { '"*y', desc = "Copy to system clipboard" }, ["<leader>y"] = { '"*y', desc = "Copy to system clipboard" },
["<Leader>p"] = { '"*p', desc = "Paste from system clipboard" }, ["<leader>p"] = { '"*p', desc = "Paste from system clipboard" },
["p"] = { '"_dP', desc = "Paste without yanking replaced content" },
["<C-r>"] = { '"hy:%s/<C-r>h//g<left><left>', desc = "Replace current selection" },
}, },
i = { i = {
["<C-k>"] = { "<Up>", desc = "Up" }, ["<C-k>"] = { "<Up>", desc = "Up" },
@ -84,10 +86,6 @@ require("util").keymaps({
["<C-4>"] = { "<End>", desc = "End" }, ["<C-4>"] = { "<End>", desc = "End" },
["<C-6>"] = { "<Home>", desc = "Home" }, ["<C-6>"] = { "<Home>", desc = "Home" },
}, },
x = {
["<leader>p"] = { '"_dP', desc = "Paste w/o copying replaced content" },
["<C-r"] = { '"hy:%s/<C-r>h//g<left><left>', desc = "Replace current selection" },
},
t = { t = {
["<Esc>"] = { "<C-\\><C-n>", desc = "Escape the terminal" }, ["<Esc>"] = { "<C-\\><C-n>", desc = "Escape the terminal" },
}, },

View file

@ -1,4 +1,6 @@
vim.g.NERDCreateDefaultMappings = 0 vim.g.NERDCreateDefaultMappings = 0
vim.g.NERDDefaultAlign = 'both'
vim.g.NERDSpaceDelims = 1
vim.cmd("filetype plugin on") vim.cmd("filetype plugin on")
return { return {

View file

@ -1,45 +1,45 @@
-- Rainbow verison
--vim.cmd([[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]])
--vim.cmd([[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]])
--vim.cmd([[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]])
--vim.cmd([[highlight IndentBlanklineIndent4 guifg=#61AFEF gui=nocombine]])
--vim.cmd([[highlight IndentBlanklineIndent5 guifg=#C678DD gui=nocombine]])
-- Grayscale version
--vim.cmd([[highlight IndentBlanklineIndent1 guifg=#707070 gui=nocombine]])
--vim.cmd([[highlight IndentBlanklineIndent2 guifg=#808080 gui=nocombine]])
--vim.cmd([[highlight IndentBlanklineIndent3 guifg=#909090 gui=nocombine]])
--vim.cmd([[highlight IndentBlanklineIndent4 guifg=#a0a0a0 gui=nocombine]])
--vim.cmd([[highlight IndentBlanklineIndent5 guifg=#b0b0b0 gui=nocombine]])
-- Dull version
vim.cmd([[highlight IndentBlanklineIndent1 guifg=#915053 gui=nocombine]])
vim.cmd([[highlight IndentBlanklineIndent2 guifg=#A27F3E gui=nocombine]])
vim.cmd([[highlight IndentBlanklineIndent3 guifg=#6B7F6E gui=nocombine]])
vim.cmd([[highlight IndentBlanklineIndent4 guifg=#5A747D gui=nocombine]])
vim.cmd([[highlight IndentBlanklineIndent5 guifg=#6B6282 gui=nocombine]])
vim.opt.list = true vim.opt.list = true
-- vim.opt.listchars = ''
-- vim.opt.listchars:append "space:⋅" -- vim.opt.listchars:append "space:⋅"
vim.opt.listchars:append("eol:↴") vim.opt.listchars:append "eol:↴"
vim.opt.listchars:append "tab: >"
local highlight = require('util').highlight
-- Dull Version
highlight("IndentBlanklineIndent1", { fg = "#915053", gui="nocombine" })
highlight("IndentBlanklineIndent2", { fg = "#A27F3E", gui="nocombine" })
highlight("IndentBlanklineIndent3", { fg = "#6B7F6E", gui="nocombine" })
highlight("IndentBlanklineIndent4", { fg = "#5A747D", gui="nocombine" })
highlight("IndentBlanklineIndent5", { fg = "#6B6282", gui="nocombine" })
-- highlight("SpecialKey", { fg = "#fff", gui = "nocombine" })
-- highlight("Whitespace", { fg = "#fff", gui = "nocombine" })
highlight("NonText", { fg = "#303030", gui = "nocombine" })
return { return {
-- Add indentation guides even on blank lines -- Add indentation guides even on blank lines
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
-- Enable `lukas-reineke/indent-blankline.nvim` -- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help indent_blankline.txt` -- See `:help indent_blankline.txt`
opts = { opts = {
-- space_char_blankline = " ", -- space_char_blankline = " ",
-- char = '┊', -- indent_blankline_space_char_blankline = "=",
-- show_trailing_blankline_indent = false, -- char = '┊',
-- show_current_context = false, -- char = '.',
show_current_context_start = true, -- char = '¦',
char_highlight_list = { use_treesitter = true,
"IndentBlanklineIndent1", char_highlight_list = {
"IndentBlanklineIndent2", "IndentBlanklineIndent1",
"IndentBlanklineIndent3", "IndentBlanklineIndent2",
"IndentBlanklineIndent4", "IndentBlanklineIndent3",
"IndentBlanklineIndent5", "IndentBlanklineIndent4",
}, "IndentBlanklineIndent5",
}, },
},
} }

View file

@ -18,6 +18,7 @@ function M.keymaps(mappings)
end end
end end
end end
end end
function M.spread(template) function M.spread(template)
@ -34,4 +35,27 @@ function M.spread(template)
end end
end end
-- From https://github.com/lukas-reineke/onedark.nvim/blob/master/lua/onedark.lua
function M.highlight(group, options)
local guifg = options.fg or "NONE"
local guibg = options.bg or "NONE"
local guisp = options.sp or "NONE"
local gui = options.gui or "NONE"
local blend = options.blend or 0
local ctermfg = options.ctermfg or "NONE"
vim.cmd(
string.format(
"highlight %s guifg=%s ctermfg=%s guibg=%s guisp=%s gui=%s blend=%d",
group,
guifg,
ctermfg,
guibg,
guisp,
gui,
blend
)
)
end
return M return M