refactor: better source code framework
This commit is contained in:
276
lua/Trans/style/spinner.lua
Normal file
276
lua/Trans/style/spinner.lua
Normal file
@@ -0,0 +1,276 @@
|
||||
-- Spinners adapted from: https://github.com/sindresorhus/cli-spinners
|
||||
--
|
||||
-- Some designs' names are made more descriptive; differences noted in comments.
|
||||
-- Other designs are omitted for brevity.
|
||||
--
|
||||
-- You may want to adjust spinner_rate according to the number of frames of your
|
||||
-- chosen spinner.
|
||||
|
||||
-- MIT License
|
||||
--
|
||||
-- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
--
|
||||
-- Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
-- of this software and associated documentation files (the "Software"), to deal
|
||||
-- in the Software without restriction, including without limitation the rights
|
||||
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
-- copies of the Software, and to permit persons to whom the Software is
|
||||
-- furnished to do so, subject to the following conditions:
|
||||
--
|
||||
-- The above copyright notice and this permission notice shall be included in
|
||||
-- all copies or substantial portions of the Software.
|
||||
--
|
||||
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
-- SOFTWARE.
|
||||
return {
|
||||
dots = {
|
||||
"⠋",
|
||||
"⠙",
|
||||
"⠹",
|
||||
"⠸",
|
||||
"⠼",
|
||||
"⠴",
|
||||
"⠦",
|
||||
"⠧",
|
||||
"⠇",
|
||||
"⠏",
|
||||
},
|
||||
dots_negative = { -- dots2
|
||||
"⣾",
|
||||
"⣽",
|
||||
"⣻",
|
||||
"⢿",
|
||||
"⡿",
|
||||
"⣟",
|
||||
"⣯",
|
||||
"⣷",
|
||||
},
|
||||
dots_snake = { -- dots3
|
||||
"⠋",
|
||||
"⠙",
|
||||
"⠚",
|
||||
"⠒",
|
||||
"⠂",
|
||||
"⠂",
|
||||
"⠒",
|
||||
"⠲",
|
||||
"⠴",
|
||||
"⠦",
|
||||
"⠖",
|
||||
"⠒",
|
||||
"⠐",
|
||||
"⠐",
|
||||
"⠒",
|
||||
"⠓",
|
||||
"⠋",
|
||||
},
|
||||
dots_footsteps = { -- dots10
|
||||
"⢄",
|
||||
"⢂",
|
||||
"⢁",
|
||||
"⡁",
|
||||
"⡈",
|
||||
"⡐",
|
||||
"⡠",
|
||||
},
|
||||
dots_hop = { -- dots11
|
||||
"⠁",
|
||||
"⠂",
|
||||
"⠄",
|
||||
"⡀",
|
||||
"⢀",
|
||||
"⠠",
|
||||
"⠐",
|
||||
"⠈",
|
||||
},
|
||||
line = {
|
||||
"-",
|
||||
"\\",
|
||||
"|",
|
||||
"/",
|
||||
},
|
||||
pipe = {
|
||||
"┤",
|
||||
"┘",
|
||||
"┴",
|
||||
"└",
|
||||
"├",
|
||||
"┌",
|
||||
"┬",
|
||||
"┐",
|
||||
},
|
||||
dots_ellipsis = { -- simpleDots
|
||||
". ",
|
||||
".. ",
|
||||
"...",
|
||||
" ",
|
||||
},
|
||||
dots_scrolling = { -- simpleDotsScrolling
|
||||
". ",
|
||||
".. ",
|
||||
"...",
|
||||
" ..",
|
||||
" .",
|
||||
" ",
|
||||
},
|
||||
star = {
|
||||
"✶",
|
||||
"✸",
|
||||
"✹",
|
||||
"✺",
|
||||
"✹",
|
||||
"✷",
|
||||
},
|
||||
flip = {
|
||||
"_",
|
||||
"_",
|
||||
"_",
|
||||
"-",
|
||||
"`",
|
||||
"`",
|
||||
"'",
|
||||
"´",
|
||||
"-",
|
||||
"_",
|
||||
"_",
|
||||
"_",
|
||||
},
|
||||
hamburger = {
|
||||
"☱",
|
||||
"☲",
|
||||
"☴",
|
||||
},
|
||||
grow_vertical = { -- growVertical
|
||||
"▁",
|
||||
"▃",
|
||||
"▄",
|
||||
"▅",
|
||||
"▆",
|
||||
"▇",
|
||||
"▆",
|
||||
"▅",
|
||||
"▄",
|
||||
"▃",
|
||||
},
|
||||
grow_horizontal = { -- growHorizontal
|
||||
"▏",
|
||||
"▎",
|
||||
"▍",
|
||||
"▌",
|
||||
"▋",
|
||||
"▊",
|
||||
"▉",
|
||||
"▊",
|
||||
"▋",
|
||||
"▌",
|
||||
"▍",
|
||||
"▎",
|
||||
},
|
||||
noise = {
|
||||
"▓",
|
||||
"▒",
|
||||
"░",
|
||||
},
|
||||
dots_bounce = { -- bounce
|
||||
"⠁",
|
||||
"⠂",
|
||||
"⠄",
|
||||
"⠂",
|
||||
},
|
||||
triangle = {
|
||||
"◢",
|
||||
"◣",
|
||||
"◤",
|
||||
"◥",
|
||||
},
|
||||
arc = {
|
||||
"◜",
|
||||
"◠",
|
||||
"◝",
|
||||
"◞",
|
||||
"◡",
|
||||
"◟",
|
||||
},
|
||||
circle = {
|
||||
"◡",
|
||||
"⊙",
|
||||
"◠",
|
||||
},
|
||||
square_corners = { -- squareCorners
|
||||
"◰",
|
||||
"◳",
|
||||
"◲",
|
||||
"◱",
|
||||
},
|
||||
circle_quarters = { -- circleQuarters
|
||||
"◴",
|
||||
"◷",
|
||||
"◶",
|
||||
"◵",
|
||||
},
|
||||
circle_halves = { -- circleHalves
|
||||
"◐",
|
||||
"◓",
|
||||
"◑",
|
||||
"◒",
|
||||
},
|
||||
dots_toggle = { -- toggle
|
||||
"⊶",
|
||||
"⊷",
|
||||
},
|
||||
box_toggle = { -- toggle2
|
||||
"▫",
|
||||
"▪",
|
||||
},
|
||||
arrow = {
|
||||
"←",
|
||||
"↖",
|
||||
"↑",
|
||||
"↗",
|
||||
"→",
|
||||
"↘",
|
||||
"↓",
|
||||
"↙",
|
||||
},
|
||||
clock = {
|
||||
"🕛 ",
|
||||
"🕐 ",
|
||||
"🕑 ",
|
||||
"🕒 ",
|
||||
"🕓 ",
|
||||
"🕔 ",
|
||||
"🕕 ",
|
||||
"🕖 ",
|
||||
"🕗 ",
|
||||
"🕘 ",
|
||||
"🕙 ",
|
||||
"🕚 ",
|
||||
},
|
||||
earth = {
|
||||
"🌍 ",
|
||||
"🌎 ",
|
||||
"🌏 ",
|
||||
},
|
||||
moon = {
|
||||
"🌑 ",
|
||||
"🌒 ",
|
||||
"🌓 ",
|
||||
"🌔 ",
|
||||
"🌕 ",
|
||||
"🌖 ",
|
||||
"🌗 ",
|
||||
"🌘 ",
|
||||
},
|
||||
dots_pulse = { -- point
|
||||
"∙∙∙",
|
||||
"●∙∙",
|
||||
"∙●∙",
|
||||
"∙∙●",
|
||||
"∙∙∙",
|
||||
},
|
||||
}
|
140
lua/Trans/style/theme.lua
Normal file
140
lua/Trans/style/theme.lua
Normal file
@@ -0,0 +1,140 @@
|
||||
return {
|
||||
default = {
|
||||
TransWord = {
|
||||
fg = '#7ee787',
|
||||
bold = true,
|
||||
},
|
||||
TransPhonetic = {
|
||||
link = 'Linenr'
|
||||
},
|
||||
TransTitle = {
|
||||
fg = '#0f0f15',
|
||||
bg = '#75beff',
|
||||
bold = true,
|
||||
},
|
||||
TransTitleRound = {
|
||||
fg = '#75beff',
|
||||
},
|
||||
TransTag = {
|
||||
-- fg = '#e5c07b',
|
||||
link = '@tag'
|
||||
},
|
||||
TransExchange = {
|
||||
link = 'TransTag',
|
||||
},
|
||||
TransPos = {
|
||||
link = 'TransTag',
|
||||
},
|
||||
TransTranslation = {
|
||||
link = 'TransWord',
|
||||
},
|
||||
TransDefinition = {
|
||||
link = 'Moremsg',
|
||||
},
|
||||
TransWin = {
|
||||
link = 'Normal',
|
||||
},
|
||||
TransBorder = {
|
||||
fg = '#89B4FA',
|
||||
},
|
||||
TransCollins = {
|
||||
fg = '#faf743',
|
||||
bold = true,
|
||||
},
|
||||
TransFailed = {
|
||||
fg = '#7aa89f',
|
||||
},
|
||||
},
|
||||
|
||||
--- TODO :
|
||||
tokyonight = {
|
||||
TransWord = {
|
||||
fg = '#4ed4bc',
|
||||
bold = true,
|
||||
},
|
||||
TransPhonetic = {
|
||||
link = 'Comment',
|
||||
},
|
||||
TransTitle = {
|
||||
fg = '#0f0f15',
|
||||
bg = '#82aaff',
|
||||
bold = true,
|
||||
},
|
||||
TransTitleRound = {
|
||||
fg = '#82aaff',
|
||||
},
|
||||
TransTag = {
|
||||
fg = '#6d8fda',
|
||||
},
|
||||
TransExchange = {
|
||||
link = 'TransTag',
|
||||
},
|
||||
TransPos = {
|
||||
link = 'TransTag',
|
||||
},
|
||||
TransTranslation = {
|
||||
link = 'TransWord',
|
||||
},
|
||||
TransDefinition = {
|
||||
fg = '#82aaff',
|
||||
},
|
||||
TransWin = {
|
||||
link = 'Normal',
|
||||
},
|
||||
TransBorder = {
|
||||
fg = '#8269b5',
|
||||
},
|
||||
TransCollins = {
|
||||
fg = '#cfa364',
|
||||
bold = true,
|
||||
},
|
||||
TransFailed = {
|
||||
fg = '#f4b085',
|
||||
},
|
||||
},
|
||||
dracula = {
|
||||
TransWord = {
|
||||
fg = '#50fa7b',
|
||||
bold = true,
|
||||
},
|
||||
TransPhonetic = {
|
||||
fg = '#6272a4',
|
||||
},
|
||||
TransTitle = {
|
||||
fg = '#0f0f15',
|
||||
bg = '#bd93f9',
|
||||
bold = true,
|
||||
},
|
||||
TransTitleRound = {
|
||||
fg = '#bd93f9',
|
||||
},
|
||||
TransTag = {
|
||||
fg = '#ffb86c',
|
||||
},
|
||||
TransExchange = {
|
||||
link = 'TransTag',
|
||||
},
|
||||
TransPos = {
|
||||
link = 'TransTag',
|
||||
},
|
||||
TransTranslation = {
|
||||
link = 'TransWord',
|
||||
},
|
||||
TransDefinition = {
|
||||
fg = '#8be9fd',
|
||||
},
|
||||
TransWin = {
|
||||
link = 'Normal',
|
||||
},
|
||||
TransBorder = {
|
||||
fg = '#9274c0',
|
||||
},
|
||||
TransCollins = {
|
||||
fg = '#f1fa8c',
|
||||
bold = true,
|
||||
},
|
||||
TransFailed = {
|
||||
fg = '#8be9fd',
|
||||
},
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user