Remove lite-xl config
This commit is contained in:
parent
c8a8934200
commit
f8e679598e
7 changed files with 0 additions and 350 deletions
|
|
@ -1,41 +0,0 @@
|
|||
local style = require "core.style"
|
||||
local common = require "core.common"
|
||||
|
||||
-- GitHub color palette
|
||||
-- Ported by Andrey Proskurin (proskur1n)
|
||||
local bg = { common.color "#0d1117" }
|
||||
local bg2 = { common.color "#161925" }
|
||||
local fg = { common.color "#adbac7" }
|
||||
local fgdim = { common.color "#768390" }
|
||||
local red = { common.color "#f47067" }
|
||||
local blue = { common.color "#6cb6ff" }
|
||||
local purple = { common.color "#dcbdfb" }
|
||||
|
||||
style.background = bg
|
||||
style.background2 = bg
|
||||
style.background3 = bg2
|
||||
style.text = fg
|
||||
style.caret = red
|
||||
style.accent = blue
|
||||
style.dim = fgdim
|
||||
style.divider = { common.color "#444c56" }
|
||||
style.selection = { common.color "#2e4c77" }
|
||||
style.line_number = fgdim
|
||||
style.line_number2 = fg
|
||||
style.line_highlight = {common.color "#1e202e"}
|
||||
style.scrollbar = fgdim
|
||||
style.scrollbar2 = fg
|
||||
|
||||
style.syntax["normal"] = fg
|
||||
style.syntax["symbol"] = fg
|
||||
style.syntax["comment"] = fgdim
|
||||
style.syntax["keyword"] = red
|
||||
style.syntax["keyword2"] = red
|
||||
style.syntax["number"] = blue
|
||||
style.syntax["literal"] = blue
|
||||
style.syntax["string"] = { common.color "#96d0ff" }
|
||||
style.syntax["operator"] = fg
|
||||
style.syntax["function"] = blue
|
||||
|
||||
style.guide = { common.color "#404040" } -- indentguide
|
||||
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
local style = require "core.style"
|
||||
local common = require "core.common"
|
||||
|
||||
style.background = { common.color "#282c34" }
|
||||
style.background2 = { common.color "#21252B" }
|
||||
style.background3 = { common.color "#21252B" }
|
||||
style.text = { common.color "#abb2bf" }
|
||||
style.caret = { common.color "#528bff" }
|
||||
style.accent = { common.color "#ffffff" }
|
||||
style.dim = { common.color "#4f5873" }
|
||||
style.divider = { common.color "#181A1F" }
|
||||
style.selection = { common.color "#383D49" }
|
||||
style.line_number = { common.color "#53576e" }
|
||||
style.line_number2 = { common.color "#666B76" }
|
||||
style.line_highlight = { common.color "#2C333E" }
|
||||
style.scrollbar = { common.color "#4f5873" }
|
||||
style.scrollbar2 = { common.color "#3060C1" }
|
||||
|
||||
style.syntax["normal"] = { common.color "#abb2bf" }
|
||||
style.syntax["symbol"] = { common.color "#abb2bf" }
|
||||
style.syntax["comment"] = { common.color "#5f697a" }
|
||||
style.syntax["keyword"] = { common.color "#cd74e8" }
|
||||
style.syntax["keyword2"] = { common.color "#eb6772" }
|
||||
style.syntax["number"] = { common.color "#db9d63" }
|
||||
style.syntax["literal"] = { common.color "#e6c07b" }
|
||||
style.syntax["string"] = { common.color "#9acc76" }
|
||||
style.syntax["operator"] = { common.color "#56B6C2" }
|
||||
style.syntax["function"] = { common.color "#5cb3fa" }
|
||||
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
-- put user settings here
|
||||
-- this module will be loaded after everything else when the application starts
|
||||
-- it will be automatically reloaded when saved
|
||||
|
||||
local core = require "core"
|
||||
local keymap = require "core.keymap"
|
||||
local config = require "core.config"
|
||||
local style = require "core.style"
|
||||
|
||||
------------------------------ Themes ----------------------------------------
|
||||
|
||||
-- light theme:
|
||||
core.reload_module("colors.onedark")
|
||||
|
||||
--------------------------- Key bindings -------------------------------------
|
||||
|
||||
-- key binding:
|
||||
-- keymap.add { ["ctrl+escape"] = "core:quit" }
|
||||
|
||||
------------------------------- Fonts ----------------------------------------
|
||||
|
||||
-- customize fonts:
|
||||
-- style.font = renderer.font.load(DATADIR .. "/fonts/FiraSans-Regular.ttf", 14 * SCALE)
|
||||
-- style.code_font = renderer.font.load(DATADIR .. "/fonts/JetBrainsMono-Regular.ttf", 14 * SCALE)
|
||||
--
|
||||
-- DATADIR is the location of the installed Lite XL Lua code, default color
|
||||
-- schemes and fonts.
|
||||
-- USERDIR is the location of the Lite XL configuration directory.
|
||||
--
|
||||
-- font names used by lite:
|
||||
-- style.font : user interface
|
||||
-- style.big_font : big text in welcome screen
|
||||
-- style.icon_font : icons
|
||||
-- style.icon_big_font : toolbar icons
|
||||
-- style.code_font : code
|
||||
--
|
||||
-- the function to load the font accept a 3rd optional argument like:
|
||||
--
|
||||
-- {antialiasing="grayscale", hinting="full", bold=true, italic=true, underline=true, smoothing=true, strikethrough=true}
|
||||
--
|
||||
-- possible values are:
|
||||
-- antialiasing: grayscale, subpixel
|
||||
-- hinting: none, slight, full
|
||||
-- bold: true, false
|
||||
-- italic: true, false
|
||||
-- underline: true, false
|
||||
-- smoothing: true, false
|
||||
-- strikethrough: true, false
|
||||
|
||||
------------------------------ Plugins ----------------------------------------
|
||||
|
||||
-- enable or disable plugin loading setting config entries:
|
||||
|
||||
-- enable plugins.trimwhitespace, otherwise it is disable by default:
|
||||
-- config.plugins.trimwhitespace = true
|
||||
--
|
||||
-- disable detectindent, otherwise it is enabled by default
|
||||
-- config.plugins.detectindent = false
|
||||
|
||||
---------------------------- Miscellanous --------------------------------------
|
||||
|
||||
-- modify list of files to ignore when indexing the project:
|
||||
-- config.ignore_files = {
|
||||
-- -- folders
|
||||
-- "^%.svn/", "^%.git/", "^%.hg/", "^CVS/", "^%.Trash/", "^%.Trash%-.*/",
|
||||
-- "^node_modules/", "^%.cache/", "^__pycache__/",
|
||||
-- -- files
|
||||
-- "%.pyc$", "%.pyo$", "%.exe$", "%.dll$", "%.obj$", "%.o$",
|
||||
-- "%.a$", "%.lib$", "%.so$", "%.dylib$", "%.ncb$", "%.sdf$",
|
||||
-- "%.suo$", "%.pdb$", "%.idb$", "%.class$", "%.psd$", "%.db$",
|
||||
-- "^desktop%.ini$", "^%.DS_Store$", "^%.directory$",
|
||||
-- }
|
||||
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
-- mod-version:3
|
||||
local syntax = require "core.syntax"
|
||||
|
||||
syntax.add {
|
||||
name = "Rust",
|
||||
files = { "%.rs$" },
|
||||
comment = "//",
|
||||
patterns = {
|
||||
{ pattern = "//.-\n", type = "comment" },
|
||||
{ pattern = { "/%*", "%*/" }, type = "comment" },
|
||||
{ pattern = { 'r#"', '"#', '\\' }, type = "string" },
|
||||
{ pattern = { '"', '"', '\\' }, type = "string" },
|
||||
{ pattern = "'.'", type = "string" },
|
||||
{ pattern = "'%a", type = "keyword2" },
|
||||
{ pattern = "0[oO_][0-7]+", type = "number" },
|
||||
{ pattern = "-?0x[%x_]+", type = "number" },
|
||||
{ pattern = "-?%d+_%d", type = "number" },
|
||||
{ pattern = "-?%d+[%d%.eE]*f?", type = "number" },
|
||||
{ pattern = "-?%.?%d+f?", type = "number" },
|
||||
{ pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" },
|
||||
{ pattern = "[%a_][%w_]*!%f[%[(]", type = "function" },
|
||||
{ pattern = "[%a_][%w_]*%f[(]", type = "function" },
|
||||
{ pattern = "[%a_][%w_]*", type = "symbol" },
|
||||
},
|
||||
symbols = {
|
||||
["as"] = "keyword",
|
||||
["async"] = "keyword",
|
||||
["await"] = "keyword",
|
||||
["break"] = "keyword",
|
||||
["const"] = "keyword",
|
||||
["continue"] = "keyword",
|
||||
["crate"] = "keyword",
|
||||
["dyn"] = "keyword",
|
||||
["else"] = "keyword",
|
||||
["enum"] = "keyword",
|
||||
["extern"] = "keyword",
|
||||
["fn"] = "keyword",
|
||||
["for"] = "keyword",
|
||||
["if"] = "keyword",
|
||||
["impl"] = "keyword",
|
||||
["in"] = "keyword",
|
||||
["let"] = "keyword",
|
||||
["loop"] = "keyword",
|
||||
["match"] = "keyword",
|
||||
["mod"] = "keyword",
|
||||
["move"] = "keyword",
|
||||
["mut"] = "keyword",
|
||||
["pub"] = "keyword",
|
||||
["ref"] = "keyword",
|
||||
["return"] = "keyword",
|
||||
["Self"] = "keyword",
|
||||
["self"] = "keyword",
|
||||
["static"] = "keyword",
|
||||
["struct"] = "keyword",
|
||||
["super"] = "keyword",
|
||||
["trait"] = "keyword",
|
||||
["type"] = "keyword",
|
||||
["unsafe"] = "keyword",
|
||||
["use"] = "keyword",
|
||||
["where"] = "keyword",
|
||||
["while"] = "keyword",
|
||||
["i32"] = "keyword2",
|
||||
["i64"] = "keyword2",
|
||||
["i128"] = "keyword2",
|
||||
["i16"] = "keyword2",
|
||||
["i8"] = "keyword2",
|
||||
["u8"] = "keyword2",
|
||||
["u16"] = "keyword2",
|
||||
["u32"] = "keyword2",
|
||||
["u64"] = "keyword2",
|
||||
["usize"] = "keyword2",
|
||||
["isize"] = "keyword2",
|
||||
["f32"] = "keyword2",
|
||||
["f64"] = "keyword2",
|
||||
["f128"] = "keyword2",
|
||||
["String"] = "keyword2",
|
||||
["char"] = "keyword2",
|
||||
["str"] = "keyword2",
|
||||
["bool"] = "keyword2",
|
||||
["true"] = "literal",
|
||||
["false"] = "literal",
|
||||
["None"] = "literal",
|
||||
["Some"] = "literal",
|
||||
["Option"] = "literal",
|
||||
["Result"] = "literal",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
-- mod-version:3
|
||||
local core = require "core"
|
||||
local config = require "core.config"
|
||||
local style = require "core.style"
|
||||
local common = require "core.common"
|
||||
local DocView = require "core.docview"
|
||||
|
||||
config.plugins.smoothcaret = common.merge({
|
||||
enabled = true,
|
||||
rate = 0.65,
|
||||
-- The config specification used by the settings gui
|
||||
config_spec = {
|
||||
name = "Smooth Caret",
|
||||
{
|
||||
label = "Enabled",
|
||||
description = "Disable or enable the smooth caret animation.",
|
||||
path = "enabled",
|
||||
type = "toggle",
|
||||
default = true
|
||||
},
|
||||
{
|
||||
label = "Rate",
|
||||
description = "Speed of the animation.",
|
||||
path = "rate",
|
||||
type = "number",
|
||||
default = 0.65,
|
||||
min = 0.2,
|
||||
max = 1.0,
|
||||
step = 0.05
|
||||
},
|
||||
}
|
||||
}, config.plugins.smoothcaret)
|
||||
|
||||
local docview_update = DocView.update
|
||||
function DocView:update()
|
||||
docview_update(self)
|
||||
|
||||
if not config.plugins.smoothcaret.enabled then return end
|
||||
|
||||
local minline, maxline = self:get_visible_line_range()
|
||||
|
||||
-- We need to keep track of all the carets
|
||||
if not self.carets then
|
||||
self.carets = { }
|
||||
end
|
||||
-- and we need the list of visible ones that `DocView:draw_caret` will use in succession
|
||||
self.visible_carets = { }
|
||||
|
||||
local idx, v_idx = 1, 1
|
||||
for _, line, col in self.doc:get_selections() do
|
||||
local x, y = self:get_line_screen_position(line, col)
|
||||
-- Keep the position relative to the whole View
|
||||
-- This way scrolling won't animate the caret
|
||||
x = x + self.scroll.x
|
||||
y = y + self.scroll.y
|
||||
|
||||
if not self.carets[idx] then
|
||||
self.carets[idx] = { current = { x = x, y = y }, target = { x = x, y = y } }
|
||||
end
|
||||
|
||||
local c = self.carets[idx]
|
||||
c.target.x = x
|
||||
c.target.y = y
|
||||
|
||||
-- Chech if the number of carets changed
|
||||
if self.last_n_selections ~= #self.doc.selections then
|
||||
-- Don't animate when there are new carets
|
||||
c.current.x = x
|
||||
c.current.y = y
|
||||
else
|
||||
self:move_towards(c.current, "x", c.target.x, config.plugins.smoothcaret.rate)
|
||||
self:move_towards(c.current, "y", c.target.y, config.plugins.smoothcaret.rate)
|
||||
end
|
||||
|
||||
-- Keep track of visible carets
|
||||
if line >= minline and line <= maxline then
|
||||
self.visible_carets[v_idx] = self.carets[idx]
|
||||
v_idx = v_idx + 1
|
||||
end
|
||||
idx = idx + 1
|
||||
end
|
||||
self.last_n_selections = #self.doc.selections
|
||||
|
||||
-- Remove unused carets to avoid animating new ones when they are added
|
||||
for i = idx, #self.carets do
|
||||
self.carets[i] = nil
|
||||
end
|
||||
|
||||
if self.mouse_selecting ~= self.last_mouse_selecting then
|
||||
self.last_mouse_selecting = self.mouse_selecting
|
||||
-- Show the caret on click, so that it can be seen moving towards the new position
|
||||
if self.mouse_selecting then
|
||||
core.blink_timer = core.blink_timer + config.blink_period / 2
|
||||
core.redraw = true
|
||||
end
|
||||
end
|
||||
|
||||
-- This is used by `DocView:draw_caret` to keep track of the current caret
|
||||
self.caret_idx = 1
|
||||
end
|
||||
|
||||
local docview_draw_caret = DocView.draw_caret
|
||||
function DocView:draw_caret(x, y)
|
||||
if not config.plugins.smoothcaret.enabled then
|
||||
docview_draw_caret(self, x, y)
|
||||
return
|
||||
end
|
||||
|
||||
local c = self.visible_carets[self.caret_idx] or { current = { x = x, y = y } }
|
||||
local lh = self:get_line_height()
|
||||
|
||||
-- We use the scroll position to move back to the position relative to the window
|
||||
renderer.draw_rect(c.current.x - self.scroll.x, c.current.y - self.scroll.y, style.caret_width, lh, style.caret)
|
||||
|
||||
self.caret_idx = self.caret_idx + 1
|
||||
end
|
||||
|
|
@ -1 +0,0 @@
|
|||
return {recents={[1]="/home/reo/Programming/gtktesting"}, window={[1]=1536,[2]=864,[3]=136,[4]=147,["n"]=4}, window_mode="normal", previous_find={}, previous_replace={}}
|
||||
|
|
@ -1 +0,0 @@
|
|||
return { path = "/home/reo/Programming/gtktesting", documents = {["type"]="leaf",["active_view"]=3,["views"]={[1]={["type"]="doc",["selection"]={[1]=1,[2]=1,[3]=30,[4]=2},["active"]=false,["filename"]="src/main.rs",["text"]=false,["scroll"]={["y"]=0,["x"]=0}},[2]={["type"]="doc",["selection"]={[1]=13,[2]=35,[3]=13,[4]=35},["active"]=false,["filename"]="/home/reo/.config/lite-xl/init.lua",["text"]=false,["scroll"]={["y"]=0,["x"]=0}},[3]={["type"]="doc",["selection"]={[1]=9,[2]=25,[3]=9,[4]=25},["active"]=true,["filename"]="Cargo.toml",["text"]=false,["scroll"]={["y"]=0,["x"]=0}}}}, directories = {} }
|
||||
Loading…
Add table
Add a link
Reference in a new issue