Merge branch 'master' of github.com:lite-xl/lite-xl into better-logview
This commit is contained in:
commit
3e175f5ad5
26
README.md
26
README.md
|
@ -18,9 +18,9 @@ Lite XL has support for high DPI display on Windows and Linux and,
|
|||
since 1.16.7 release, it supports **retina displays** on macOS.
|
||||
|
||||
Please note that Lite XL is compatible with lite for most plugins and all color themes.
|
||||
We provide a separate lite-plugins repository for Lite XL, because in some cases
|
||||
We provide a separate lite-xl-plugins repository for Lite XL, because in some cases
|
||||
some adaptations may be needed to make them work better with Lite XL.
|
||||
The repository with modified plugins is https://github.com/franko/lite-plugins.
|
||||
The repository with modified plugins is https://github.com/lite-xl/lite-xl-plugins.
|
||||
|
||||
The changes and differences between Lite XL and rxi/lite are listed in the
|
||||
[changelog].
|
||||
|
@ -131,10 +131,7 @@ rm -rf $HOME/.local/share/icons/hicolor/scalable/apps/lite-xl.svg \
|
|||
## Contributing
|
||||
|
||||
Any additional functionality that can be added through a plugin should be done
|
||||
as a plugin, after which a pull request to the [plugins repository] can be made.
|
||||
|
||||
If the plugin uses any Lite XL-specific functionality,
|
||||
please open a pull request to the [Lite XL plugins repository].
|
||||
as a plugin, after which a pull request to the [Lite XL plugins repository] can be made.
|
||||
|
||||
Pull requests to improve or modify the editor itself are welcome.
|
||||
|
||||
|
@ -150,14 +147,13 @@ See the [licenses] file for details on licenses used by the required dependencie
|
|||
[Discord Badge Image]: https://img.shields.io/discord/847122429742809208?label=discord&logo=discord
|
||||
[screenshot-dark]: https://user-images.githubusercontent.com/433545/111063905-66943980-84b1-11eb-9040-3876f1133b20.png
|
||||
[lite]: https://github.com/rxi/lite
|
||||
[website]: https://lite-xl.github.io
|
||||
[build]: https://lite-xl.github.io/en/documentation/build/
|
||||
[Get Lite XL]: https://github.com/franko/lite-xl/releases/latest
|
||||
[Get plugins]: https://github.com/franko/lite-plugins
|
||||
[Get color themes]: https://github.com/rxi/lite-colors
|
||||
[changelog]: https://github.com/franko/lite-xl/blob/master/changelog.md
|
||||
[Lite XL plugins repository]: https://github.com/franko/lite-plugins
|
||||
[plugins repository]: https://github.com/rxi/lite-plugins
|
||||
[colors repository]: https://github.com/rxi/lite-colors
|
||||
[website]: https://lite-xl.com
|
||||
[build]: https://lite-xl.com/en/documentation/build/
|
||||
[Get Lite XL]: https://github.com/lite-xl/lite-xl/releases/latest
|
||||
[Get plugins]: https://github.com/lite-xl/lite-xl-plugins
|
||||
[Get color themes]: https://github.com/lite-xl/lite-xl-colors
|
||||
[changelog]: https://github.com/lite-xl/lite-xl/blob/master/changelog.md
|
||||
[Lite XL plugins repository]: https://github.com/lite-xl/lite-xl-plugins
|
||||
[colors repository]: https://github.com/lite-xl/lite-xl-colors
|
||||
[LICENSE]: LICENSE
|
||||
[licenses]: licenses/licenses.md
|
||||
|
|
|
@ -47,22 +47,22 @@ end
|
|||
|
||||
|
||||
function common.color(str)
|
||||
local r, g, b, a = str:match("#(%x%x)(%x%x)(%x%x)")
|
||||
local r, g, b, a = str:match("^#(%x%x)(%x%x)(%x%x)(%x?%x?)$")
|
||||
if r then
|
||||
r = tonumber(r, 16)
|
||||
g = tonumber(g, 16)
|
||||
b = tonumber(b, 16)
|
||||
a = 1
|
||||
a = tonumber(a, 16) or 0xff
|
||||
elseif str:match("rgba?%s*%([%d%s%.,]+%)") then
|
||||
local f = str:gmatch("[%d.]+")
|
||||
r = (f() or 0)
|
||||
g = (f() or 0)
|
||||
b = (f() or 0)
|
||||
a = f() or 1
|
||||
a = (f() or 1) * 0xff
|
||||
else
|
||||
error(string.format("bad color string '%s'", str))
|
||||
end
|
||||
return r, g, b, a * 0xff
|
||||
return r, g, b, a
|
||||
end
|
||||
|
||||
|
||||
|
@ -349,7 +349,7 @@ function common.relative_path(ref_dir, dir)
|
|||
if drive and ref_drive and drive ~= ref_drive then
|
||||
-- Windows, different drives, system.absolute_path fails for C:\..\D:\
|
||||
return dir
|
||||
end
|
||||
end
|
||||
local ref_ls = split_on_slash(ref_dir)
|
||||
local dir_ls = split_on_slash(dir)
|
||||
local i = 1
|
||||
|
|
|
@ -183,7 +183,7 @@ local function show_max_files_warning(dir)
|
|||
"Filesystem is too slow: project files will not be indexed." or
|
||||
"Too many files in project directory: stopped reading at "..
|
||||
config.max_project_files.." files. For more information see "..
|
||||
"usage.md at github.com/franko/lite-xl."
|
||||
"usage.md at github.com/lite-xl/lite-xl."
|
||||
core.status_view:show_message("!", style.accent, message)
|
||||
end
|
||||
|
||||
|
@ -737,7 +737,7 @@ function core.init()
|
|||
"Refused Plugins",
|
||||
string.format(
|
||||
"Some plugins are not loaded due to version mismatch.\n\n%s.\n\n" ..
|
||||
"Please download a recent version from https://github.com/franko/lite-plugins.",
|
||||
"Please download a recent version from https://github.com/lite-xl/lite-xl-plugins.",
|
||||
table.concat(msg, ".\n\n")),
|
||||
opt, function(item)
|
||||
if item.text == "Exit" then os.exit(1) end
|
||||
|
|
|
@ -6,6 +6,7 @@ local function keymap_macos(keymap)
|
|||
["cmd+n"] = "core:new-doc",
|
||||
["cmd+shift+c"] = "core:change-project-folder",
|
||||
["cmd+shift+o"] = "core:open-project-folder",
|
||||
["cmd+shift+r"] = "core:restart",
|
||||
["cmd+ctrl+return"] = "core:toggle-fullscreen",
|
||||
|
||||
["cmd+ctrl+shift+j"] = "root:split-left",
|
||||
|
|
|
@ -146,6 +146,7 @@ keymap.add_direct {
|
|||
["ctrl+n"] = "core:new-doc",
|
||||
["ctrl+shift+c"] = "core:change-project-folder",
|
||||
["ctrl+shift+o"] = "core:open-project-folder",
|
||||
["ctrl+shift+r"] = "core:restart",
|
||||
["alt+return"] = "core:toggle-fullscreen",
|
||||
["f11"] = "core:toggle-fullscreen",
|
||||
|
||||
|
|
|
@ -27,36 +27,42 @@ style.icon_font = renderer.font.load(DATADIR .. "/fonts/icons.ttf", 16 * SCALE,
|
|||
style.icon_big_font = style.icon_font:copy(23 * SCALE)
|
||||
style.code_font = renderer.font.load(DATADIR .. "/fonts/JetBrainsMono-Regular.ttf", 15 * SCALE)
|
||||
|
||||
style.background = { common.color "#2e2e32" }
|
||||
style.background2 = { common.color "#252529" }
|
||||
style.background3 = { common.color "#252529" }
|
||||
style.background = { common.color "#2e2e32" } -- Docview
|
||||
style.background2 = { common.color "#252529" } -- Treeview
|
||||
style.background3 = { common.color "#252529" } -- Command view
|
||||
style.text = { common.color "#97979c" }
|
||||
style.caret = { common.color "#93DDFA" }
|
||||
style.accent = { common.color "#e1e1e6" }
|
||||
-- style.dim - text color for nonactive tabs, tabs divider, prefix in log and
|
||||
-- search result, hotkeys for context menu and command view
|
||||
style.dim = { common.color "#525257" }
|
||||
style.divider = { common.color "#202024" }
|
||||
style.divider = { common.color "#202024" } -- Line between nodes
|
||||
style.selection = { common.color "#48484f" }
|
||||
style.line_number = { common.color "#525259" }
|
||||
style.line_number2 = { common.color "#83838f" }
|
||||
style.line_number2 = { common.color "#83838f" } -- With cursor
|
||||
style.line_highlight = { common.color "#343438" }
|
||||
style.scrollbar = { common.color "#414146" }
|
||||
style.scrollbar2 = { common.color "#4b4b52" }
|
||||
style.scrollbar2 = { common.color "#4b4b52" } -- Hovered
|
||||
style.nagbar = { common.color "#FF0000" }
|
||||
style.nagbar_text = { common.color "#FFFFFF" }
|
||||
style.nagbar_dim = { common.color "rgba(0, 0, 0, 0.45)" }
|
||||
style.drag_overlay = { common.color "rgba(255,255,255,0.1)" }
|
||||
style.drag_overlay_tab = { common.color "#93DDFA" }
|
||||
style.good = { common.color "#72b886" }
|
||||
style.warn = { common.color "#FFA94D" }
|
||||
style.error = { common.color "#FF3333" }
|
||||
style.modified = { common.color "#1c7c9c" }
|
||||
|
||||
style.syntax = {}
|
||||
style.syntax["normal"] = { common.color "#e1e1e6" }
|
||||
style.syntax["symbol"] = { common.color "#e1e1e6" }
|
||||
style.syntax["comment"] = { common.color "#676b6f" }
|
||||
style.syntax["keyword"] = { common.color "#E58AC9" }
|
||||
style.syntax["keyword2"] = { common.color "#F77483" }
|
||||
style.syntax["keyword"] = { common.color "#E58AC9" } -- local function end if case
|
||||
style.syntax["keyword2"] = { common.color "#F77483" } -- self int float
|
||||
style.syntax["number"] = { common.color "#FFA94D" }
|
||||
style.syntax["literal"] = { common.color "#FFA94D" }
|
||||
style.syntax["literal"] = { common.color "#FFA94D" } -- true false nil
|
||||
style.syntax["string"] = { common.color "#f7c95c" }
|
||||
style.syntax["operator"] = { common.color "#93DDFA" }
|
||||
style.syntax["operator"] = { common.color "#93DDFA" } -- = + - / < >
|
||||
style.syntax["function"] = { common.color "#93DDFA" }
|
||||
|
||||
-- This can be used to override fonts per syntax group.
|
||||
|
|
|
@ -57,23 +57,26 @@ process.WAIT_INFINITE = -1
|
|||
---@type integer
|
||||
process.WAIT_DEADLINE = -2
|
||||
|
||||
---Used for the process.options stdin, stdout and stderr fields.
|
||||
---Default behavior for redirecting streams.
|
||||
---This flag is deprecated and for backwards compatibility with reproc only.
|
||||
---The behavior of this flag may change in future versions of Lite XL.
|
||||
---@type integer
|
||||
process.REDIRECT_DEFAULT = 0
|
||||
|
||||
---Used for the process.options stdin, stdout and stderr fields.
|
||||
---Allow Process API to read this stream via process:read functions.
|
||||
---@type integer
|
||||
process.REDIRECT_PIPE = 1
|
||||
|
||||
---Used for the process.options stdin, stdout and stderr fields.
|
||||
---Redirect this stream to the parent.
|
||||
---@type integer
|
||||
process.REDIRECT_PARENT = 2
|
||||
|
||||
---Used for the process.options stdin, stdout and stderr fields.
|
||||
---Discard this stream (piping it to /dev/null)
|
||||
---@type integer
|
||||
process.REDIRECT_DISCARD = 3
|
||||
|
||||
---Used for the process.options stdin, stdout and stderr fields.
|
||||
---Redirect this stream to stdout.
|
||||
---This flag can only be used on process.options.stderr.
|
||||
---@type integer
|
||||
process.REDIRECT_STDOUT = 4
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ show_help() {
|
|||
echo "-h --help Show this help and exit."
|
||||
echo "-p --prefix PREFIX Install directory prefix. Default: '/'."
|
||||
echo "-v --version VERSION Sets the version on the package name."
|
||||
echo " --addons Install 3rd party addons (currently RXI colors)."
|
||||
echo " --addons Install 3rd party addons (currently Lite XL colors)."
|
||||
echo " --debug Debug this script."
|
||||
echo "-A --appimage Create an AppImage (Linux only)."
|
||||
echo "-B --binary Create a normal / portable package or macOS bundle,"
|
||||
|
@ -45,13 +45,13 @@ install_addons() {
|
|||
|
||||
# Copy third party color themes
|
||||
curl --insecure \
|
||||
-L "https://github.com/rxi/lite-colors/archive/master.zip" \
|
||||
-o "${build_dir}/rxi-lite-colors.zip"
|
||||
-L "https://github.com/lite-xl/lite-xl-colors/archive/master.zip" \
|
||||
-o "${build_dir}/lite-xl-colors.zip"
|
||||
|
||||
mkdir -p "${build_dir}/third/data/colors"
|
||||
unzip "${build_dir}/rxi-lite-colors.zip" -d "${build_dir}"
|
||||
mv "${build_dir}/lite-colors-master/colors" "${build_dir}/third/data"
|
||||
rm -rf "${build_dir}/lite-colors-master"
|
||||
unzip "${build_dir}/lite-xl-colors.zip" -d "${build_dir}"
|
||||
mv "${build_dir}/lite-xl-colors-master/colors" "${build_dir}/third/data"
|
||||
rm -rf "${build_dir}/lite-xl-colors-master"
|
||||
|
||||
for module_name in colors; do
|
||||
cp -r "${build_dir}/third/data/$module_name" "${data_dir}"
|
||||
|
|
|
@ -15,12 +15,12 @@ copy_directory_from_repo () {
|
|||
|
||||
lite_copy_third_party_modules () {
|
||||
local build="$1"
|
||||
curl --retry 5 --retry-delay 3 --insecure -L "https://github.com/rxi/lite-colors/archive/master.zip" -o "$build/rxi-lite-colors.zip" || exit 1
|
||||
curl --retry 5 --retry-delay 3 --insecure -L "https://github.com/lite-xl/lite-xl-colors/archive/master.zip" -o "$build/lite-xl-colors.zip" || exit 1
|
||||
mkdir -p "$build/third/data/colors" "$build/third/data/plugins"
|
||||
unzip -qq "$build/rxi-lite-colors.zip" -d "$build"
|
||||
mv "$build/lite-colors-master/colors" "$build/third/data"
|
||||
rm -fr "$build/lite-colors-master"
|
||||
rm "$build/rxi-lite-colors.zip"
|
||||
unzip -qq "$build/lite-xl-colors.zip" -d "$build"
|
||||
mv "$build/lite-xl-colors-master/colors" "$build/third/data"
|
||||
rm -fr "$build/lite-xl-colors-master"
|
||||
rm "$build/lite-xl-colors.zip"
|
||||
}
|
||||
|
||||
lite_branch=master
|
||||
|
@ -47,7 +47,7 @@ workdir=".repackage"
|
|||
rm -fr "$workdir" && mkdir "$workdir" && pushd "$workdir"
|
||||
|
||||
fetch_packages_from_github () {
|
||||
assets=($($wget -q -nv -O- https://api.github.com/repos/franko/lite-xl/releases/latest | grep "browser_download_url" | cut -d '"' -f 4))
|
||||
assets=($($wget -q -nv -O- https://api.github.com/repos/lite-xl/lite-xl/releases/latest | grep "browser_download_url" | cut -d '"' -f 4))
|
||||
|
||||
for url in "${assets[@]}"; do
|
||||
echo "getting: $url"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "api.h"
|
||||
#include "renderer.h"
|
||||
#include "rencache.h"
|
||||
#include "../renderer.h"
|
||||
#include "../rencache.h"
|
||||
|
||||
static int f_font_load(lua_State *L) {
|
||||
const char *filename = luaL_checkstring(L, 1);
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include "api.h"
|
||||
#include "dirmonitor.h"
|
||||
#include "rencache.h"
|
||||
#include "../dirmonitor.h"
|
||||
#include "../rencache.h"
|
||||
#ifdef _WIN32
|
||||
#include <direct.h>
|
||||
#include <windows.h>
|
||||
|
@ -106,7 +106,15 @@ static const char *get_key_name(const SDL_Event *e, char *buf) {
|
|||
!(e->key.keysym.mod & KMOD_NUM)) {
|
||||
return numpad[scancode - SDL_SCANCODE_KP_1];
|
||||
} else {
|
||||
strcpy(buf, SDL_GetScancodeName(e->key.keysym.scancode));
|
||||
/* We need to correctly handle non-standard layouts such as dvorak.
|
||||
Therefore, if a Latin letter(code<128) is pressed in the current layout,
|
||||
then we transmit it as it is. But we also need to support shortcuts in
|
||||
other languages, so for non-Latin characters we pass the scancode that
|
||||
matches the letter in the QWERTY layout. */
|
||||
if (e->key.keysym.sym < 128)
|
||||
strcpy(buf, SDL_GetKeyName(e->key.keysym.sym));
|
||||
else
|
||||
strcpy(buf, SDL_GetScancodeName(scancode));
|
||||
str_tolower(buf);
|
||||
return buf;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#include "lua.h"
|
||||
#include <lua.h>
|
||||
|
||||
#ifdef MACOS_USE_BUNDLE
|
||||
void set_macos_bundle_resources(lua_State *L)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdalign.h>
|
||||
|
||||
#include <lauxlib.h>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[wrap-git]
|
||||
directory = reproc
|
||||
url = https://github.com/franko/reproc
|
||||
revision = v14.2.3-meson-1
|
Loading…
Reference in New Issue