From 9a428648a9bf3506713108aec95b9631f1cf9407 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Wed, 1 Jun 2022 03:48:47 +0200 Subject: [PATCH 1/9] Add `common.is_absolute_path` --- data/core/common.lua | 5 +++++ data/core/init.lua | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/data/core/common.lua b/data/core/common.lua index 1aa2b86e..7ed87456 100644 --- a/data/core/common.lua +++ b/data/core/common.lua @@ -385,6 +385,11 @@ function common.normalize_path(filename) end +function common.is_absolute_path(path) + return path:sub(1, 1) == PATHSEP or path:match("^(%a):\\") +end + + function common.path_belongs_to(filename, path) return string.find(filename, path .. PATHSEP, 1, true) == 1 end diff --git a/data/core/init.lua b/data/core/init.lua index 59b293c5..4ed83716 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -605,7 +605,7 @@ end -- This function should get only filenames normalized using -- common.normalize_path function. function core.project_absolute_path(filename) - if filename:match('^%a:\\') or filename:find('/', 1, true) == 1 then + if common.is_absolute_path(filename) then return common.normalize_path(filename) elseif not core.project_dir then local cwd = system.absolute_path(".") From 295e6b7e5ac19348fa4052beec376bf2573122f1 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Wed, 1 Jun 2022 03:51:29 +0200 Subject: [PATCH 2/9] Allow `common.path_suggest` to specify a root directory This will make relative paths start from `root`. --- data/core/common.lua | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/data/core/common.lua b/data/core/common.lua index 7ed87456..c123bb4b 100644 --- a/data/core/common.lua +++ b/data/core/common.lua @@ -140,9 +140,25 @@ function common.fuzzy_match_with_recents(haystack, recents, needle) end -function common.path_suggest(text) +function common.path_suggest(text, root) + if root and root:sub(-1) ~= PATHSEP then + root = root .. PATHSEP + end local path, name = text:match("^(.-)([^/\\]*)$") - local files = system.list_dir(path == "" and "." or path) or {} + -- ignore root if path is absolute + local is_absolute = common.is_absolute_path(text) + if not is_absolute then + if path == "" then + path = root or "." + else + path = (root or "") .. path + end + end + + local files = system.list_dir(path) or {} + if path:sub(-1) ~= PATHSEP then + path = path .. PATHSEP + end local res = {} for _, file in ipairs(files) do file = path .. file @@ -151,6 +167,13 @@ function common.path_suggest(text) if info.type == "dir" then file = file .. PATHSEP end + if root then + -- remove root part from file path + local s, e = file:find(root, nil, true) + if s == 1 then + file = file:sub(e + 1) + end + end if file:lower():find(text:lower(), nil, true) == 1 then table.insert(res, file) end From e94c996a26f76aba6b1200412071f291e06ea14a Mon Sep 17 00:00:00 2001 From: Guldoman Date: Wed, 1 Jun 2022 03:55:55 +0200 Subject: [PATCH 3/9] Add `TreeView` helper functions to get previous/next item --- data/plugins/treeview.lua | 66 ++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/data/plugins/treeview.lua b/data/plugins/treeview.lua index ecb3a76d..a0dc4a4f 100644 --- a/data/plugins/treeview.lua +++ b/data/plugins/treeview.lua @@ -389,6 +389,7 @@ function TreeView:draw() end end + function TreeView:get_parent(item) local parent_path = common.dirname(item.abs_filename) if not parent_path then return end @@ -399,6 +400,40 @@ function TreeView:get_parent(item) end end + +function TreeView:get_item(item, where) + local last_item, last_x, last_y, last_w, last_h + local stop = false + + for it, x, y, w, h in self:each_item() do + if not item and where >= 0 then + return it, x, y, w, h + end + if item == it then + if where < 0 and last_item then + break + elseif where == 0 or (where < 0 and not last_item) then + return it, x, y, w, h + end + stop = true + elseif stop then + item = it + return it, x, y, w, h + end + last_item, last_x, last_y, last_w, last_h = it, x, y, w, h + end + return last_item, last_x, last_y, last_w, last_h +end + +function TreeView:get_next(item) + return self:get_item(item, 1) +end + +function TreeView:get_previous(item) + return self:get_item(item, -1) +end + + function TreeView:toggle_expand(toggle) local item = self.selected_item @@ -548,38 +583,13 @@ command.add(nil, { command.add(TreeView, { ["treeview:next"] = function() - local item = view.selected_item - local item_y - local stop = false - for it, _, y in view:each_item() do - if item == it then - stop = true - elseif stop then - item = it - item_y = y - break - end - end - + local item, _, item_y = view:get_next(view.selected_item) view:set_selection(item, item_y) end, ["treeview:previous"] = function() - local last_item - local last_item_y - for it, _, y in view:each_item() do - if it == view.selected_item then - if not last_item then - last_item = it - last_item_y = y - end - break - end - last_item = it - last_item_y = y - end - - view:set_selection(last_item, last_item_y) + local item, _, item_y = view:get_previous(view.selected_item) + view:set_selection(item, item_y) end, ["treeview:open"] = function() From 730ea0c91bf42b71f7be2ce641af521ca226ba81 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Wed, 1 Jun 2022 03:57:14 +0200 Subject: [PATCH 4/9] Make `TreeView` more multi-project-dir aware --- data/plugins/treeview.lua | 93 ++++++++++++++++++++++++++++++++------- 1 file changed, 76 insertions(+), 17 deletions(-) diff --git a/data/plugins/treeview.lua b/data/plugins/treeview.lua index a0dc4a4f..0f818e0c 100644 --- a/data/plugins/treeview.lua +++ b/data/plugins/treeview.lua @@ -404,7 +404,7 @@ end function TreeView:get_item(item, where) local last_item, last_x, last_y, last_w, last_h local stop = false - + for it, x, y, w, h in self:each_item() do if not item and where >= 0 then return it, x, y, w, h @@ -518,6 +518,15 @@ function core.on_quit_project() end local function is_project_folder(path) + for _,dir in pairs(core.project_directories) do + if dir.name == path then + return true + end + end + return false +end + +local function is_primary_project_folder(path) return core.project_dir == path end @@ -547,6 +556,17 @@ menu:register( } ) +menu:register( + function() + return view.hovered_item + and not is_primary_project_folder(view.hovered_item.abs_filename) + and is_project_folder(view.hovered_item.abs_filename) + end, + { + { text = "Remove directory", command = "treeview:remove-project-directory" }, + } +) + local previous_view = nil -- Register the TreeView commands and keymap @@ -637,7 +657,17 @@ command.add(TreeView, { end, ["treeview:expand"] = function() - view:toggle_expand(true) + local item = view.selected_item + if not item or item.type ~= "dir" then return end + + if item.expanded then + local next_item, _, next_y = view:get_next(item) + if next_item.depth > item.depth then + view:set_selection(next_item, next_y) + end + else + view:toggle_expand(true) + end end, }) @@ -656,8 +686,13 @@ command.add( ) end, { ["treeview:delete"] = function() - local filename = treeitem().abs_filename - local relfilename = treeitem().filename + local item = treeitem() + local filename = item.abs_filename + local relfilename = item.filename + if item.dir_name ~= core.project_dir then + -- add secondary project dirs names to the file path to show + relfilename = common.basename(item.dir_name) .. PATHSEP .. relfilename + end local file_info = system.get_file_info(filename) local file_type = file_info.type == "dir" and "Directory" or "File" -- Ask before deleting @@ -697,13 +732,16 @@ command.add( command.add(function() return treeitem() ~= nil end, { ["treeview:rename"] = function() - local old_filename = treeitem().filename - local old_abs_filename = treeitem().abs_filename + local item = treeitem() + local old_filename = item.filename + local old_abs_filename = item.abs_filename core.command_view:set_text(old_filename) core.command_view:enter("Rename", { submit = function(filename) - filename = core.normalize_to_project_dir(filename) - local abs_filename = core.project_absolute_path(filename) + local abs_filename = filename + if not common.is_absolute_path(filename) then + abs_filename = item.dir_name .. PATHSEP .. filename + end local res, err = os.rename(old_abs_filename, abs_filename) if res then -- successfully renamed for _, doc in ipairs(core.docs) do @@ -718,38 +756,47 @@ command.add(function() return treeitem() ~= nil end, { core.error("Error while renaming \"%s\" to \"%s\": %s", old_abs_filename, abs_filename, err) end end, - suggest = common.path_suggest + suggest = function(text) + return common.path_suggest(text, item.dir_name) + end }) end, ["treeview:new-file"] = function() - if not is_project_folder(treeitem().abs_filename) then - core.command_view:set_text(treeitem().filename .. "/") + local item = treeitem() + if not is_project_folder(item.abs_filename) then + core.command_view:set_text(item.filename .. PATHSEP) end core.command_view:enter("Filename", { submit = function(filename) - local doc_filename = core.project_dir .. PATHSEP .. filename + local doc_filename = item.dir_name .. PATHSEP .. filename + core.log(doc_filename) local file = io.open(doc_filename, "a+") file:write("") file:close() core.root_view:open_doc(core.open_doc(doc_filename)) core.log("Created %s", doc_filename) end, - suggest = common.path_suggest + suggest = function(text) + return common.path_suggest(text, item.dir_name) + end }) end, ["treeview:new-folder"] = function() - if not is_project_folder(treeitem().abs_filename) then - core.command_view:set_text(treeitem().filename .. "/") + local item = treeitem() + if not is_project_folder(item.abs_filename) then + core.command_view:set_text(item.filename .. "/") end core.command_view:enter("Folder Name", { submit = function(filename) - local dir_path = core.project_dir .. PATHSEP .. filename + local dir_path = item.dir_name .. PATHSEP .. filename common.mkdirp(dir_path) core.log("Created %s", dir_path) end, - suggest = common.path_suggest + suggest = function(text) + return common.path_suggest(text, item.dir_name) + end }) end, @@ -766,6 +813,18 @@ command.add(function() return treeitem() ~= nil end, { end }) +command.add(function() + local item = treeitem() + return item + and not is_primary_project_folder(item.abs_filename) + and is_project_folder(item.abs_filename) + end, { + ["treeview:remove-project-directory"] = function() + core.remove_project_directory(treeitem().dir_name) + end, +}) + + keymap.add { ["ctrl+\\"] = "treeview:toggle", ["up"] = "treeview:previous", From ca46d8e261476d18b99fd82759c0a6a10e25a0f0 Mon Sep 17 00:00:00 2001 From: jgmdev Date: Thu, 2 Jun 2022 19:20:54 -0400 Subject: [PATCH 5/9] style: move default colors to its own style file --- data/colors/default.lua | 46 +++++++++++++++++++++++++++++++++++++++++ data/core/init.lua | 2 +- data/core/style.lua | 43 +------------------------------------- 3 files changed, 48 insertions(+), 43 deletions(-) create mode 100644 data/colors/default.lua diff --git a/data/colors/default.lua b/data/colors/default.lua new file mode 100644 index 00000000..8f60deee --- /dev/null +++ b/data/colors/default.lua @@ -0,0 +1,46 @@ +local style = require "core.style" +local common = require "core.common" + +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" } -- Line between nodes +style.selection = { common.color "#48484f" } +style.line_number = { common.color "#525259" } +style.line_number2 = { common.color "#83838f" } -- With cursor +style.line_highlight = { common.color "#343438" } +style.scrollbar = { common.color "#414146" } +style.scrollbar2 = { common.color "#4b4b52" } -- Hovered +style.scrollbar_track = { common.color "#252529" } +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["normal"] = { common.color "#e1e1e6" } +style.syntax["symbol"] = { common.color "#e1e1e6" } +style.syntax["comment"] = { common.color "#676b6f" } +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" } -- true false nil +style.syntax["string"] = { common.color "#f7c95c" } +style.syntax["operator"] = { common.color "#93DDFA" } -- = + - / < > +style.syntax["function"] = { common.color "#93DDFA" } + +style.log["INFO"] = { icon = "i", color = style.text } +style.log["WARN"] = { icon = "!", color = style.warn } +style.log["ERROR"] = { icon = "!", color = style.error } + +return style diff --git a/data/core/init.lua b/data/core/init.lua index 59b293c5..afde6fea 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -2,7 +2,7 @@ require "core.strict" require "core.regex" local common = require "core.common" local config = require "core.config" -local style = require "core.style" +local style = require "colors.default" local command local keymap local dirwatch diff --git a/data/core/style.lua b/data/core/style.lua index 7258eb16..3e340c57 100644 --- a/data/core/style.lua +++ b/data/core/style.lua @@ -28,44 +28,7 @@ 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" } -- 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" } -- Line between nodes -style.selection = { common.color "#48484f" } -style.line_number = { common.color "#525259" } -style.line_number2 = { common.color "#83838f" } -- With cursor -style.line_highlight = { common.color "#343438" } -style.scrollbar = { common.color "#414146" } -style.scrollbar2 = { common.color "#4b4b52" } -- Hovered -style.scrollbar_track = { common.color "#252529" } -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" } -- 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" } -- true false nil -style.syntax["string"] = { common.color "#f7c95c" } -style.syntax["operator"] = { common.color "#93DDFA" } -- = + - / < > -style.syntax["function"] = { common.color "#93DDFA" } -- This can be used to override fonts per syntax group. -- The syntax highlighter will take existing values from this table and @@ -74,10 +37,6 @@ style.syntax["function"] = { common.color "#93DDFA" } style.syntax_fonts = {} -- style.syntax_fonts["comment"] = renderer.font.load(path_to_font, size_of_font, rendering_options) -style.log = { - INFO = { icon = "i", color = style.text }, - WARN = { icon = "!", color = style.warn }, - ERROR = { icon = "!", color = style.error } -} +style.log = {} return style From 5da7467a5c5b7cd221bd4532d97a2da7dd263fd4 Mon Sep 17 00:00:00 2001 From: jgmdev Date: Fri, 3 Jun 2022 03:16:18 -0400 Subject: [PATCH 6/9] plugin drawwhitespace: return line height on draw_line_text --- data/plugins/drawwhitespace.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/plugins/drawwhitespace.lua b/data/plugins/drawwhitespace.lua index efa2be3a..6186eac6 100644 --- a/data/plugins/drawwhitespace.lua +++ b/data/plugins/drawwhitespace.lua @@ -176,5 +176,5 @@ function DocView:draw_line_text(idx, x, y) end end - draw_line_text(self, idx, x, y) + return draw_line_text(self, idx, x, y) end From de63574b534cf838be090702b5c78feca9f031d2 Mon Sep 17 00:00:00 2001 From: jgmdev Date: Fri, 3 Jun 2022 04:13:54 -0400 Subject: [PATCH 7/9] plugin linewrapping: added priority Since the linewrapping plugin modifies some of the DocView line calculation and positioning functions we need to make sure of loading it before other plugins. This way we make sure that plugins that also overwrite and depend on DocView functionality aren't using the original methods without the linewrapping changes, which leads to wrong line and column calculations. --- data/plugins/linewrapping.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/plugins/linewrapping.lua b/data/plugins/linewrapping.lua index 885474fb..66b303ee 100644 --- a/data/plugins/linewrapping.lua +++ b/data/plugins/linewrapping.lua @@ -1,4 +1,4 @@ --- mod-version:3 +-- mod-version:3 --priority:10 local core = require "core" local common = require "core.common" local DocView = require "core.docview" From 2caa96e9b95ffcd0a73bff5ddb9d062e650ab404 Mon Sep 17 00:00:00 2001 From: jgmdev Date: Tue, 7 Jun 2022 03:00:44 -0400 Subject: [PATCH 8/9] ChangesLog: more details to 2.1.0 release --- changelog.md | 606 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 427 insertions(+), 179 deletions(-) diff --git a/changelog.md b/changelog.md index b27f5f4f..0ae2953c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,74 +1,288 @@ -This files document the changes done in Lite XL for each release. +# Changes Log -### 2.1 +## 2.1 - 2022-06-07 -Upgraded Lua to 5.4, which should improve performance, and provide useful extra functionality. -It should also be more available out of the box with most modern linux/unix-based package -managers. +### New Features +* Make distinction between + [line and block comments](https://github.com/lite-xl/lite-xl/pull/771), + and added all appropriate functionality to the commenting/uncommenting lines. -Removed `dmon`, and implemented independent backends for dirmonitoring. Also more cleanly -split out dirmonitoring into its own class in lua, from core.init. We should now support -FreeBSD; and any other system that uses `kqueue` as their dirmonitoring library. We also -have a dummy-backend, which reverts transparnetly to scanning if there is some issue with -applying OS-level watches (such as system limits). +* [Added in line paste mode](https://github.com/lite-xl/lite-xl/pull/713), + if you copy without a selection. -Removed `libagg` and the font renderer; compacted all font rendering into a single renderer.c -file which uses `libfreetype` directly. Now allows for ad-hoc bolding, italics, and underlining -of fonts. +* Many [improvements to treeview](https://github.com/lite-xl/lite-xl/pull/732), + including keyboard navigation of treeview, and ability to specify single vs. + double-click behavior. -Removed `reproc` and replaced this with a simple POSIX/Windows implementation in `process.c`. -This allows for greater tweakability (i.e. we can now `break` for debugging purposes), -performance (startup time of subprocesses is noticeably shorter), and simplicity -(we no longer have to link reproc, or winsock, on windows). +* Added in [soft line wrapping](https://github.com/lite-xl/lite-xl/pull/636) + as core plugin, under `linewrapping.lua`, use `F10` to activate. -Split out `Node` and `EmptyView` into their own lua files, for plugin extensibility reasons. +* Revamped [StatusView](https://github.com/lite-xl/lite-xl/pull/852) API with + new features that include: -Revamped StatusView API, so that plugins can more easily coexist with each other. + * Support for predicates, click actions, tooltips on item hover + and custom drawing of added items. + * Hide items that are too huge by rendering with clip_rect. + * Ability to drag or scroll the left or right if too many items to display. + * New status bar commands accessible from the command palette that + include: toggling status bar visibility, toggling specific item visibility, + enable/disable status messages, etc... -Removed `cp_replace`, and replaced this with a core plugin, `drawwhitespace.lua`. +* Added `renderer.font.group` interface to set up + [font fallback groups](https://github.com/lite-xl/lite-xl/pull/616) in + the font renderer, if a token doesn't have a corresponding glyph. -Made distinction between line and block comments, and added all appropriate functionality -to the commenting/uncommenting lines. + **Example:** + ```lua + local emoji_font = renderer.font.load(USERDIR .. "/fonts/NotoEmoji-Regular.ttf", 15 * SCALE) + local nonicons = renderer.font.load(USERDIR .. "/fonts/nonicons.ttf", 15 * SCALE) + style.code_font = renderer.font.group({style.code_font, nonicons, emoji_font}) + ``` -Added in line paste mode, if you copy without a selection. +* Added in the ability to specify + [mouse clicks](https://github.com/lite-xl/lite-xl/pull/589) in the + keymap, allowing for easy binds of `ctrl+lclick`, and the like. -May improvements to treeview, including keyboard navigation of treeview, and ability to -specify single vs. double-click behavior. + **Example:** + ```lua + keymap.add { ["ctrl+shift+3lclick"] = "core:open-log" } + ``` -Added in soft line wrapping as core plugin, under `linewrapping.lua`, with an -F10 to activate. +* Improved ability for plugins to be loaded at a given time, by making the + convention of defining a config for the plugin using `common.merge` to merge + existing hashes together, rather than overwriting. -Bumped plugin mod-version number, as the rendering interface for docviews has changed. +* Releases will now include all language plugins and the + [settings gui](https://github.com/lite-xl/lite-xl-plugins/pull/65) plugin. -Added in meson wraps for freetype, pcre2, and SDL2 which target public, rather than -lite-xl maintained repos. +* New [core.warn](https://github.com/lite-xl/lite-xl/pull/1005) was introduced. -Added in the ability to set up font fallback groups in the font renderer, if a token -doesn't have a corresponding glyph. +* Added [suggestions warping](https://github.com/lite-xl/lite-xl/pull/1003) + for `CommandView`. -Added in a native plugin interface that allows for C-level interfacing with a -statically-linked lite-xl. The implementation of this may change in future. +* Allow regexes in tokenizer to + [split tokens with group](https://github.com/lite-xl/lite-xl/pull/999). -Improved fuzzy_matching to probably give you something closer to what you're -looking for. +* Added [settings gui support](https://github.com/lite-xl/lite-xl/pull/995) + to core plugins. -Improved handling of alternate keyboard layouts. +* Support for [stricter predicates](https://github.com/lite-xl/lite-xl/pull/990) + by appending a `!`, eg: `"core.docview!"`. -Improved ability for plugins to be loaded at a given time, by making the convention -of defining a config for the plugin use `common.merge` to merge existing hashes -together, rather than overwriting. +* [UTF8 support in tokenizer](https://github.com/lite-xl/lite-xl/pull/945) + and new utf8 counter parts of string functions, + eg: `string.ulen`, `string.ulower`, etc... -Added in the ability to specify mouseclicks in the keymap, allowing for easy binds of -`ctrl+lclick`, and the like. +* Added [utf8 support](https://github.com/lite-xl/lite-xl/pull/986) on doc + lower and upper commands. -Changed interface for keyhandling; now, all components should return true if they've -handled the event. +* Allow syntax patterns to match with the + [beginning of the line](https://github.com/lite-xl/lite-xl/pull/860). -Added in a default keymap for `core:restart`, `ctrl+shift+r`. + **Example:** + ```lua + { pattern = "^my_pattern_starting_at_beginning", type="symbol" } + ``` -Many, many, many more changes that are too numerous to list. +* [Add View:on_file_dropped](https://github.com/lite-xl/lite-xl/pull/845). -### 2.0.5 +* Implemented new function to retrieve current process id of lite-xl + [system.get_process_id()](https://github.com/lite-xl/lite-xl/pull/833). + +* [Allow functions in keymap](https://github.com/lite-xl/lite-xl/pull/948). + +* [Add type ahead to CommandView](https://github.com/lite-xl/lite-xl/pull/963). + +* Add syntax symbols to + [auto-complete](https://github.com/lite-xl/lite-xl/pull/913). + +* Add [animation categories](https://github.com/lite-xl/lite-xl/pull/941) + to enable finer transitions control. + +* Added in a [native plugin](https://github.com/lite-xl/lite-xl/pull/527) + interface that allows for C-level interfacing with a statically-linked + lite-xl. The implementation of this may change in future. + +* Config: added new development option to prevent plugin version checking at + startup named [skip_plugins_version](https://github.com/lite-xl/lite-xl/pull/879) + +### Backward Incompatible Changes +* Bumped plugin mod-version number as various interfaces like: `DocView`, + `StatusView` and `CommandView` have changed which should require a revision + from plugin developers to make sure their plugins work with this new release. + +* Changed interface for key handling; now, all components should return true if + they've handled the event. + +* For plugin developers, declaring config options by directly assigning + to the plugin table (eg: `config.plugins.plugin_name.myvalue = 10`) was + deprecated in favor of using `common.merge` + + **Example:** + ```lua + config.plugins.autowrap = common.merge({ + enabled = false, + files = { "%.md$", "%.txt$" } + }, config.plugins.autowrap) + ``` + +* The `font.set_size` function was dropped in favor of `font.copy`. + +* `DocView:draw_text_line` and related functions been used by plugin developers + require a revision, since some of this interfaces were updated to support + line wrapping. + +* Removed `cp_replace`, and replaced this with a core plugin, + [drawwhitespace.lua](https://github.com/lite-xl/lite-xl/pull/908). + +### Deprecated Features +* For plugins the usage of the `--lite-xl` version tag was dropped + in favor of `--mod-version`. + +* Overriding `StatusView:get_items()` has been deprecated in favor of + the new dedicated interface to insert status bar items: + + **New Interface:** + ```lua + ------@return StatusView.Item + function StatusView:add_item( + predicate, name, alignment, getitem, command, pos, tooltip + ) end + ``` + + **Example:** + ```lua + core.status_view:add_item( + nil, + "status:memory-usage", + StatusView.Item.RIGHT, + function() + return { + style.text, + string.format( + "%.2f MB", + (math.floor(collectgarbage("count") / 10.24) / 100) + ) + } + end, + nil, + 1, + "lua memory usage" + ).separator = core.status_view.separator2 + ``` + +* [CommandView:enter](https://github.com/lite-xl/lite-xl/pull/1004) now accepts + a single options table as a parameter, meaning that the old way of calling + this function will now show a deprecation message. + + **Example:** + ```lua + core.command_view:enter("Title", { + submit = function() end, + suggest = function() return end, + cancel = function() end, + validate = function() return true end, + typeahead = true, + wrap = true + }) + ``` + +### Other Changes +* [Upgraded Lua to 5.4](https://github.com/lite-xl/lite-xl/pull/781), which + should improve performance, and provide useful extra functionality. It should + also be more available out of the box with most modern + linux/unix-based package managers. + +* Removed `dmon`, and implemented independent backends for dirmonitoring. Also + more cleanly split out dirmonitoring into its own class in lua, from core.init. + We should now support FreeBSD; and any other system that uses `kqueue` as + their dir monitoring library. We also have a dummy-backend, which reverts + transparently to scanning if there is some issue with applying OS-level + watches (such as system limits). + +* Removed `libagg` and the font renderer; compacted all font rendering into a + single renderer.c file which uses `libfreetype` directly. Now allows for ad-hoc + bolding, italics, and underlining of fonts. + +* Removed `reproc` and replaced this with a simple POSIX/Windows implementation + in `process.c`. This allows for greater tweakability (i.e. we can now `break` + for debugging purposes), performance (startup time of subprocesses is + noticeably shorter), and simplicity (we no longer have to link reproc, or + winsock, on windows). + +* [Split out `Node` and `EmptyView`](https://github.com/lite-xl/lite-xl/pull/715) + into their own lua files, for plugin extensibility reasons. + +* Improved fuzzy_matching to probably give you something closer to what you're + looking for. + +* Improved handling of alternate keyboard layouts. + +* Added in a default keymap for `core:restart`, `ctrl+shift+r`. + +* Improvements to the [C and C++](https://github.com/lite-xl/lite-xl/pull/875) + syntax files. + +* Improvements to [markdown](https://github.com/lite-xl/lite-xl/pull/862) + syntax file. + +* [Improvements to borderless](https://github.com/lite-xl/lite-xl/pull/994) + mode on Windows + +* Fixed a bunch of problems relating to + [multi-cursor](https://github.com/lite-xl/lite-xl/pull/886). + +* [Performance improvement](https://github.com/lite-xl/lite-xl/pull/883) + of detect indent plugin. + +* NagView: [support vscroll](https://github.com/lite-xl/lite-xl/pull/876) when + message is too long. + +* Meson improvements which include: + * Added in meson wraps for freetype, pcre2, and SDL2 which target public, + rather than lite-xl maintained repos. + * [Seperate dirmonitor logic](https://github.com/lite-xl/lite-xl/pull/866), + add build time detection of features. + * Add [fallbacks](https://github.com/lite-xl/lite-xl/pull/798) to all + common dependencies. + * [Update SDL to 2.0.20](https://github.com/lite-xl/lite-xl/pull/884). + * install [docs/api](https://github.com/lite-xl/lite-xl/pull/979) to datadir + for lsp support. + +* Always check if the beginning of the + [text needs to be clipped](https://github.com/lite-xl/lite-xl/pull/871). + +* Added [git commit](https://github.com/lite-xl/lite-xl/pull/859) + on development builds. + +* Update [autocomplete](https://github.com/lite-xl/lite-xl/pull/832) + with changes needed for latest LSP plugin. + +* Use SDL to manage color format mapping in + [ren_draw_rect](https://github.com/lite-xl/lite-xl/pull/829). + +* Various code [clean ups](https://github.com/lite-xl/lite-xl/pull/826). + +* [Autoreload Nagview](https://github.com/lite-xl/lite-xl/pull/942). + +* Improve performance of + [ren_draw_rect](https://github.com/lite-xl/lite-xl/pull/935). + +* [Enhancements to scrollbar](https://github.com/lite-xl/lite-xl/pull/916). + +* Set the correct working directory for the + [AppImage version](https://github.com/lite-xl/lite-xl/pull/937). + +* Core: fixes and changes to + [temp file](https://github.com/lite-xl/lite-xl/pull/906) functions. + +* [Added plugin load-time log](https://github.com/lite-xl/lite-xl/pull/966). + +* Improved [tokenizer performance](https://github.com/lite-xl/lite-xl/pull/896). + +* Many, many, many more changes that are too numerous to list. + +## 2.0.5 Revamp the project's user module so that modifications are immediately applied. @@ -77,9 +291,10 @@ The new mechanism is backward compatible.* Essentially there are two mechanisms: -- if a '/' or a '/$' appear at the end of the pattern it will match only directories -- if a '/' appears anywhere in the pattern except at the end the pattern will be - applied to the path +- if a '/' or a '/$' appear at the end of the pattern it will match only + directories +- if a '/' appears anywhere in the pattern except at the end the pattern will + be applied to the path In the first case, when the pattern corresponds to a directory, a '/' will be appended to the name of each directory before checking the pattern. @@ -96,43 +311,45 @@ Directory monitoring is now aware of symlinks and treat them appropriately. Fix problem when encountering special files type on linux. -Improve directory monitoring so that the related thread actually waits without using -any CPU time when there are no events. +Improve directory monitoring so that the related thread actually waits without +using any CPU time when there are no events. Improve the suggestion when changing project folder or opening a new one. Now the previously used directory are suggested but if the path is changed the actual existing directories that match the pattern are suggested. -In addition always use the text entered in the command view even if a suggested entry -is highlighted. +In addition always use the text entered in the command view even if a suggested +entry is highlighted. The NagView warning window now no longer moves the document content. -### 2.0.4 +## 2.0.4 -Fix some bugs related to newly introduced directory monitoring using the dmon library. +Fix some bugs related to newly introduced directory monitoring using the +dmon library. Fix a problem with plain text search using Lua patterns by error. -Fix a problem with visualization of UTF-8 characters that caused garbage characters -visualization. +Fix a problem with visualization of UTF-8 characters that caused garbage +characters visualization. Other fixes and improvements contributed by @Guldoman. -### 2.0.3 +## 2.0.3 -Replace periodic rescan of project folder with a notification based system using the -[dmon library](https://github.com/septag/dmon). Improves performance especially for -large project folders since the application no longer needs to rescan. -The application also reports immediatly any change in the project directory even -when the application is unfocused. +Replace periodic rescan of project folder with a notification based system +using the [dmon library](https://github.com/septag/dmon). Improves performance +especially for large project folders since the application no longer needs to +rescan. The application also reports immediately any change in the project +directory even when the application is unfocused. Improved find-replace reverse and forward search. -Fixed a bug in incremental syntax highlighting affecting documents with multiple-lines -comments or strings. +Fixed a bug in incremental syntax highlighting affecting documents with +multiple-lines comments or strings. -The application now always shows the tabs in the documents' view even when a single -document is opened. Can be changed with the option `config.always_show_tabs`. +The application now always shows the tabs in the documents' view even when +a single document is opened. Can be changed with the option +`config.always_show_tabs`. Fix problem with numeric keypad function keys not properly working. @@ -140,32 +357,36 @@ Fix problem with pixel not correctly drawn at the window's right edge. Treat correctly and open network paths on Windows. -Add some improvements for very slow network filesystems. +Add some improvements for very slow network file systems. -Fix problem with python syntax highliting, contributed by @dflock. +Fix problem with python syntax highlighting, contributed by @dflock. -### 2.0.2 +## 2.0.2 -Fix problem project directory when starting the application from Launcher on macOS. +Fix problem project directory when starting the application from Launcher on +macOS. -Improved LogView. Entries can now be expanded and there is a context menu to copy the item's content. +Improved LogView. Entries can now be expanded and there is a context menu to +copy the item's content. -Change the behavior of `ctrl+d` to add a multi-cursor selection to the next occurrence. -The old behavior to move the selection to the next occurrence is now done using the shortcut `ctrl+f3`. +Change the behavior of `ctrl+d` to add a multi-cursor selection to the next +occurrence. The old behavior to move the selection to the next occurrence is +now done using the shortcut `ctrl+f3`. -Added a command to create a multi-cursor with all the occurrences of the current selection. -Activated with the shortcut `ctrl+shift+l`. +Added a command to create a multi-cursor with all the occurrences of the +current selection. Activated with the shortcut `ctrl+shift+l`. Fix problem when trying to close an unsaved new document. -No longer shows an error for the `-psn` argument passed to the application on macOS. +No longer shows an error for the `-psn` argument passed to the application on +macOS. Fix `treeview:open-in-system` command on Windows. Fix rename command to update name of document if opened. -Improve the find and replace dialog so that previously used expressions can be recalled -using "up" and "down" keys. +Improve the find and replace dialog so that previously used expressions can be +recalled using "up" and "down" keys. Build package script rewrite with many improvements. @@ -173,63 +394,76 @@ Use bigger fonts by default. Other minor improvements and fixes. -With many thanks to the contributors: @adamharrison, @takase1121, @Guldoman, @redtide, @Timofffee, @boppyt, @Jan200101. +With many thanks to the contributors: @adamharrison, @takase1121, @Guldoman, +@redtide, @Timofffee, @boppyt, @Jan200101. -### 2.0.1 +## 2.0.1 Fix a few bugs and we mandate the mod-version 2 for plugins. This means that users should ensure they have up-to-date plugins for Lite XL 2.0. Here some details about the bug fixes: -- fix a bug that created a fatal error when using the command to change project folder or when closing all the active documents -- add a limit to avoid scaling fonts too much and fix a related invalid memory access for very small fonts +- fix a bug that created a fatal error when using the command to change project + folder or when closing all the active documents +- add a limit to avoid scaling fonts too much and fix a related invalid memory + access for very small fonts - fix focus problem with NagView when switching project directory - fix error that prevented the verification of plugins versions - fix error on X11 that caused a bug window event on exit -### 2.0 +## 2.0 -The 2.0 version of lite contains *breaking changes* to lite, in terms of how plugin settings are structured; -any custom plugins may need to be adjusted accordingly (see note below about plugin namespacing). +The 2.0 version of lite contains *breaking changes* to lite, in terms of how +plugin settings are structured; any custom plugins may need to be adjusted +accordingly (see note below about plugin namespacing). Contains the following new features: -Full PCRE (regex) support for find and replace, as well as in language syntax definitions. Can be accessed -programatically via the lua `regex` module. +Full PCRE (regex) support for find and replace, as well as in language syntax +definitions. Can be accessed programatically via the lua `regex` module. -A full, finalized subprocess API, using libreproc. Subprocess can be started and interacted with using -`Process.new`. +A full, finalized subprocess API, using libreproc. Subprocess can be started +and interacted with using `Process.new`. -Support for multi-cursor editing. Cursors can be created by either ctrl+clicking on the screen, or by using -the keyboard shortcuts ctrl+shift+up/down to create an additional cursor on the previous/next line. +Support for multi-cursor editing. Cursors can be created by either ctrl+clicking +on the screen, or by using the keyboard shortcuts ctrl+shift+up/down to create +an additional cursor on the previous/next line. All build systems other than meson removed. -A more organized directory structure has been implemented; in particular a docs folder which contains C api -documentation, and a resource folder which houses all build resources. +A more organized directory structure has been implemented; in particular a docs +folder which contains C api documentation, and a resource folder which houses +all build resources. -Plugin config namespacing has been implemented. This means that instead of using `config.myplugin.a`, -to read settings, and `config.myplugin = false` to disable plugins, this has been changed to -`config.plugins.myplugin.a`, and `config.plugins.myplugin = false` repsectively. This may require changes to +Plugin config namespacing has been implemented. This means that instead of +using `config.myplugin.a`, to read settings, and `config.myplugin = false` to +disable plugins, this has been changed to `config.plugins.myplugin.a`, and +`config.plugins.myplugin = false` respectively. This may require changes to your user plugin, or to any custom plugins you have. A context menu on right click has been added. -Changes to how we deal with indentation have been implemented; in particular, hitting home no longer brings you -to the start of a line, it'll bring you to the start of indentation, which is more in line with other editors. +Changes to how we deal with indentation have been implemented; in particular, +hitting home no longer brings you to the start of a line, it'll bring you to +the start of indentation, which is more in line with other editors. -Lineguide, and scale plugins moved into the core, and removed from `lite-plugins`. This may also require you to -adjust your personal plugin folder to remove these if they're present. +Lineguide, and scale plugins moved into the core, and removed from +`lite-plugins`. This may also require you to adjust your personal plugin +folder to remove these if they're present. -In addition, there have been many other small fixes and improvements, too numerous to list here. +In addition, there have been many other small fixes and improvements, too +numerous to list here. -### 1.16.11 +## 1.16.11 -When opening directories with too many files lite-xl now keep diplaying files and directories in the treeview. -The application remains functional and the directories can be explored without using too much memory. -In this operating mode the files of the project are not indexed so the command "Core: Find File" will act as the "Core: Open File" command. -The "Project Search: Find" will work by searching all the files present in the project directory even if they are not indexed. +When opening directories with too many files lite-xl now keep displaying files +and directories in the treeview. The application remains functional and the +directories can be explored without using too much memory. In this operating +mode the files of the project are not indexed so the command "Core: Find File" +will act as the "Core: Open File" command.The "Project Search: Find" will work +by searching all the files present in the project directory even if they are +not indexed. Implemented changing fonts per syntax group by @liquidev. @@ -249,30 +483,30 @@ Fix bug with close button not working in borderless window mode. Fix problem with normalization of filename for opened documents. -### 1.16.10 +## 1.16.10 Improved syntax highlight system thanks to @liquidev and @adamharrison. -Thanks to the new system we provide more a accurate syntax highlighting for Lua, C and C++. -Other syntax improvements contributed by @vincens2005. +Thanks to the new system we provide more a accurate syntax highlighting for +Lua, C and C++. Other syntax improvements contributed by @vincens2005. Move to JetBrains Mono and Fira Sans fonts for code and UI respectively. -Thet are provided under the SIL Open Font License, Version 1.1. +They are provided under the SIL Open Font License, Version 1.1. See `doc/licenses.md` for license details. -Fixed bug with fonts and rencache module. -Under very specific situations the application was crashing due to invalid memory access. +Fixed bug with fonts and rencache module. Under very specific situations the +application was crashing due to invalid memory access. Add documentation for keymap binding, thanks to @Janis-Leuenberger. Added a contributors page in `doc/contributors.md`. -### 1.16.9 +## 1.16.9 Fix a bug related to nested panes resizing. Fix problem preventing creating a new file. -### 1.16.8 +## 1.16.8 Fix application crash when using the command `core:restart`. @@ -294,27 +528,28 @@ Both kind of tags can appear in new plugins in the form: where the old tag needs to appear at the end for compatibility. -### 1.16.7 +## 1.16.7 Add support for retina displays on Mac OS X. Fix a few problems related to file paths. -### 1.16.6 +## 1.16.6 -Implement a system to check the compatibility of plugins by checking a release tag. -Plugins that don't have the release tag will not be loaded. +Implement a system to check the compatibility of plugins by checking a release +tag. Plugins that don't have the release tag will not be loaded. Improve and extend the NagView with keyboard commands. -Special thanks to @takase1121 for the implementation and @liquidev for proposing and -discussing the enhancements. +Special thanks to @takase1121 for the implementation and @liquidev for proposing +and discussing the enhancements. Add support to build on Mac OS X and create an application bundle. Special thanks to @mathewmariani for his lite-macos fork, the Mac OS specific resources and his support. -Add hook function `DocView.on_text_change` so that plugin can accurately react on document changes. -Thanks to @vincens2005 for the suggestion and testing the implementation. +Add hook function `DocView.on_text_change` so that plugin can accurately react +on document changes. Thanks to @vincens2005 for the suggestion and testing the +implementation. Enable borderless window mode using the `config.borderless` variable. If enable the system window's bar will be replaced by a title bar provided @@ -332,13 +567,14 @@ commands `draw-whitespace:toggle`, `draw-whitespace:enable`, Improve the NagView to accept keyboard commands and introduce dialog commands. -Add hook function `Doc:on_text_change` called on document changes, to be used by plugins. +Add hook function `Doc:on_text_change` called on document changes, to be +used by plugins. -### 1.16.5 +## 1.16.5 Hotfix for Github's issue https://github.com/franko/lite-xl/issues/122 -### 1.16.4 +## 1.16.4 Add tooltips to show full file names from the tree-view. @@ -353,7 +589,7 @@ Made borders between tabs look cleaner. Fix problem with files using hard tabs. -### 1.16.2 +## 1.16.2 Implement close button for tabs. @@ -361,12 +597,12 @@ Make the command view list of suggestion scrollable to see all the items. Improve update/resize behavior of treeview and toolbar. -### 1.16.1 +## 1.16.1 Improve behavior of commands to move, delete and duplicate multiple lines: no longer include the last line if it does not contain any selection. -Fix graphical artefacts when rendering some fonts like FiraSans. +Fix graphical artifacts when rendering some fonts like FiraSans. Introduce the `config.transitions` boolean variable. When false the transitions will be disabled and changes will be done immediately. @@ -375,7 +611,7 @@ Very useful for remote sessions where visual transitions doesn't work well. Fix many small problems related to the new toolbar and the tooptips. Fix problem with spacing in treeview when using monospace fonts. -### 1.16 +## 1.16 Implement a toolbar shown in the bottom part of the tree-view. The toolbar is especially meant for new users to give an easy, visual, access @@ -387,8 +623,8 @@ are actually resizable. Add config mechanism to disable a plugin by setting `config. = false`. -Improve the "detect indent" plugin to take into account the syntax and exclude comments -for much accurate results. +Improve the "detect indent" plugin to take into account the syntax and exclude +comments for much accurate results. Add command `root:close-all` to close all the documents currently opened. @@ -396,21 +632,24 @@ Show the full path filename of the active document in the window's title. Fix problem with user's module reload not always enabled. -### 1.15 +## 1.15 **Project directories** -Extend your project by adding more directories using the command `core:add-directory`. -To remove them use the corresponding command `core:remove-directory`. +Extend your project by adding more directories using the command +`core:add-directory`. To remove them use the corresponding command +`core:remove-directory`. **Workspaces** The workspace plugin from rxi/lite-plugins is now part of Lite XL. -In addition to the functionalities of the original plugin the extended version will -also remember the window size and position and the additonal project directories. -To not interfere with the project's files the workspace file is saved in the personal -Lite's configuration folder. -On unix-like systems it will be in: `$HOME/.config/lite-xl/ws`. +In addition to the functionalities of the original plugin the extended version +will also remember the window size and position and the additional project +directories. + +To not interfere with the project's files the workspace file is saved in the +personal Lite's configuration folder. On unix-like systems it will be in: +`$HOME/.config/lite-xl/ws`. **Scrolling the Tree View** @@ -422,10 +661,11 @@ As in the unix shell `~` is now used to identify the home directory. **Files and Directories** -Add command to create a new empty directory within the project using the command -`files:create-directory`. -In addition a control-click on a project directory will prompt the user to create -a new directory inside the directory pointed. +Add command to create a new empty directory within the project using the +command `files:create-directory`. + +In addition a control-click on a project directory will prompt the user to +create a new directory inside the directory pointed. **New welcome screen** @@ -433,51 +673,56 @@ Show 'Lite XL' instead of 'lite' and the version number. **Various fixes and improvements** -A few quirks previously with some of the new features have been fixed for a better user experience. +A few quirks previously with some of the new features have been fixed for a +better user experience. -### 1.14 +## 1.14 **Project Management** -Add a new command, Core: Change Project Folder, to change project directory by staying on the same window. -All the current opened documents will be closed. +Add a new command, Core: Change Project Folder, to change project directory by +staying on the same window. All the current opened documents will be closed. The new command is associated with the keyboard combination ctrl+shit+c. -A similar command is also added, Core: Open Project Folder, with key binding ctrl+shift+o. -It will open the chosen folder in a new window. +A similar command is also added, Core: Open Project Folder, with key binding +ctrl+shift+o. It will open the chosen folder in a new window. -In addition Lite XL will now remember the recently used projects across different sessions. -When invoked without arguments it will now open the project more recently used. -If a directory is specified it will behave like before and open the directory indicated as an argument. +In addition Lite XL will now remember the recently used projects across +different sessions. When invoked without arguments it will now open the project +more recently used. If a directory is specified it will behave like before and +open the directory indicated as an argument. **Restart command** -A Core: Restart command is added to restart the editor without leaving the current window. -Very convenient when modifying the Lua code for the editor itself. +A Core: Restart command is added to restart the editor without leaving the +current window. Very convenient when modifying the Lua code for the editor +itself. **User's setting auto-reload** -When saving the user configuration, the user's module, the changes will be automatically applied to the -current instance. +When saving the user configuration, the user's module, the changes will be +automatically applied to the current instance. **Bundle community provided colors schemes** -Included now in the release files the colors schemes from github.com/rxi/lite-colors. +Included now in the release files the colors schemes from +github.com/rxi/lite-colors. **Usability improvements** -Improve left and right scrolling of text to behave like other editors and improves text selection with mouse. +Improve left and right scrolling of text to behave like other editors and +improves text selection with mouse. **Fixes** Correct font's rendering for full hinting mode when using subpixel antialiasing. -### 1.13 +## 1.13 **Rendering options for fonts** -When loading fonts with the function renderer.font.load some rendering options can -be optionally specified: +When loading fonts with the function renderer.font.load some rendering options +can be optionally specified: - antialiasing: grayscale or subpixel - hinting: none, slight or full @@ -486,36 +731,39 @@ See data/core/style.lua for the details about its utilisation. The default remains antialiasing subpixel and hinting slight to reproduce the behavior of previous versions. -The option grayscale with full hinting is specially interesting for crisp font rendering -without color artifacts. +The option grayscale with full hinting is specially interesting for crisp font +rendering without color artifacts. **Unix-like install directories** Use unix-like install directories for the executable and for the data directory. The executable will be placed under $prefix/bin and the data folder will be $prefix/share/lite-xl. + The folder $prefix is not hard-coded in the binary but is determined at runtime as the directory such as the executable is inside $prefix/bin. -If no such $prefix exist it will fall back to the old behavior and use the "data" -folder from the executable directory. -In addtion to the `EXEDIR` global variable an additional variable is exposed, `DATADIR`, -to point to the data directory. +If no such $prefix exist it will fall back to the old behavior and use the +"data" folder from the executable directory. -The old behavior using the "data" directory can be still selected at compile time -using the "portable" option. The released Windows package will use the "data" -directory as before. +In addtion to the `EXEDIR` global variable an additional variable is exposed, +`DATADIR`, to point to the data directory. + +The old behavior using the "data" directory can be still selected at compile +time using the "portable" option. The released Windows package will use the +"data" directory as before. **Configuration stored into the user's home directory** -Now the Lite XL user's configuration will be stored in the user's home directory under -".config/lite-xl". -The home directory is determined using the "HOME" environment variable except on Windows -wher "USERPROFILE" is used instead. +Now the Lite XL user's configuration will be stored in the user's home directory +under .config/lite-xl". + +The home directory is determined using the "HOME" environment variable except +on Windows wher "USERPROFILE" is used instead. A new global variable `USERDIR` is exposed to point to the user's directory. -### 1.11 +## 1.11 - include changes from rxi's Lite 1.11 - fix behavior of tab to indent multiple lines @@ -523,11 +771,11 @@ A new global variable `USERDIR` is exposed to point to the user's directory. - limit project scan to a maximum number of files to limit memory usage - list recently visited files when using "Find File" command -### 1.08 +## 1.08 - Subpixel font rendering, removed gamma correction - Avoid using CPU when the editor is idle -### 1.06 +## 1.06 - subpixel font rendering with gamma correction From 1c6573aa1b0a07167693de89ed893ef4588575a1 Mon Sep 17 00:00:00 2001 From: jgmdev Date: Tue, 7 Jun 2022 18:47:19 -0400 Subject: [PATCH 9/9] changelog: include treeview fixes --- changelog.md | 65 +++++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/changelog.md b/changelog.md index 0ae2953c..8241ceeb 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,6 @@ # Changes Log -## 2.1 - 2022-06-07 +## [2.1.0] - 2022-06-07 ### New Features * Make distinction between @@ -107,6 +107,11 @@ startup named [skip_plugins_version](https://github.com/lite-xl/lite-xl/pull/879) ### Backward Incompatible Changes +* [Upgraded Lua to 5.4](https://github.com/lite-xl/lite-xl/pull/781), which + should improve performance, and provide useful extra functionality. It should + also be more available out of the box with most modern + linux/unix-based package managers. + * Bumped plugin mod-version number as various interfaces like: `DocView`, `StatusView` and `CommandView` have changed which should require a revision from plugin developers to make sure their plugins work with this new release. @@ -116,7 +121,7 @@ * For plugin developers, declaring config options by directly assigning to the plugin table (eg: `config.plugins.plugin_name.myvalue = 10`) was - deprecated in favor of using `common.merge` + deprecated in favor of using `common.merge`. **Example:** ```lua @@ -188,11 +193,6 @@ ``` ### Other Changes -* [Upgraded Lua to 5.4](https://github.com/lite-xl/lite-xl/pull/781), which - should improve performance, and provide useful extra functionality. It should - also be more available out of the box with most modern - linux/unix-based package managers. - * Removed `dmon`, and implemented independent backends for dirmonitoring. Also more cleanly split out dirmonitoring into its own class in lua, from core.init. We should now support FreeBSD; and any other system that uses `kqueue` as @@ -227,7 +227,7 @@ syntax file. * [Improvements to borderless](https://github.com/lite-xl/lite-xl/pull/994) - mode on Windows + mode on Windows. * Fixed a bunch of problems relating to [multi-cursor](https://github.com/lite-xl/lite-xl/pull/886). @@ -280,9 +280,12 @@ * Improved [tokenizer performance](https://github.com/lite-xl/lite-xl/pull/896). +* TreeView improvements for + [multi-project](https://github.com/lite-xl/lite-xl/pull/1010). + * Many, many, many more changes that are too numerous to list. -## 2.0.5 +## [2.0.5] - 2022-01-29 Revamp the project's user module so that modifications are immediately applied. @@ -322,7 +325,7 @@ entry is highlighted. The NagView warning window now no longer moves the document content. -## 2.0.4 +## [2.0.4] - 2021-12-20 Fix some bugs related to newly introduced directory monitoring using the dmon library. @@ -334,7 +337,7 @@ characters visualization. Other fixes and improvements contributed by @Guldoman. -## 2.0.3 +## [2.0.3] - 2021-10-23 Replace periodic rescan of project folder with a notification based system using the [dmon library](https://github.com/septag/dmon). Improves performance @@ -361,7 +364,7 @@ Add some improvements for very slow network file systems. Fix problem with python syntax highlighting, contributed by @dflock. -## 2.0.2 +## [2.0.2] - 2021-09-10 Fix problem project directory when starting the application from Launcher on macOS. @@ -397,7 +400,7 @@ Other minor improvements and fixes. With many thanks to the contributors: @adamharrison, @takase1121, @Guldoman, @redtide, @Timofffee, @boppyt, @Jan200101. -## 2.0.1 +## [2.0.1] - 2021-08-28 Fix a few bugs and we mandate the mod-version 2 for plugins. This means that users should ensure they have up-to-date plugins for Lite XL 2.0. @@ -412,7 +415,7 @@ Here some details about the bug fixes: - fix error that prevented the verification of plugins versions - fix error on X11 that caused a bug window event on exit -## 2.0 +## [2.0] - 2021-08-16 The 2.0 version of lite contains *breaking changes* to lite, in terms of how plugin settings are structured; any custom plugins may need to be adjusted @@ -455,7 +458,7 @@ folder to remove these if they're present. In addition, there have been many other small fixes and improvements, too numerous to list here. -## 1.16.11 +## [1.16.11] - 2021-05-28 When opening directories with too many files lite-xl now keep displaying files and directories in the treeview. The application remains functional and the @@ -483,7 +486,7 @@ Fix bug with close button not working in borderless window mode. Fix problem with normalization of filename for opened documents. -## 1.16.10 +## [1.16.10] - 2021-05-22 Improved syntax highlight system thanks to @liquidev and @adamharrison. Thanks to the new system we provide more a accurate syntax highlighting for @@ -500,13 +503,13 @@ Add documentation for keymap binding, thanks to @Janis-Leuenberger. Added a contributors page in `doc/contributors.md`. -## 1.16.9 +## [1.16.9] - 2021-05-06 Fix a bug related to nested panes resizing. Fix problem preventing creating a new file. -## 1.16.8 +## [1.16.8] - 2021-05-06 Fix application crash when using the command `core:restart`. @@ -528,13 +531,13 @@ Both kind of tags can appear in new plugins in the form: where the old tag needs to appear at the end for compatibility. -## 1.16.7 +## [1.16.7] - 2021-05-01 Add support for retina displays on Mac OS X. Fix a few problems related to file paths. -## 1.16.6 +## [1.16.6] - 2021-04-21 Implement a system to check the compatibility of plugins by checking a release tag. Plugins that don't have the release tag will not be loaded. @@ -570,11 +573,11 @@ Improve the NagView to accept keyboard commands and introduce dialog commands. Add hook function `Doc:on_text_change` called on document changes, to be used by plugins. -## 1.16.5 +## [1.16.5] - 2021-03-20 Hotfix for Github's issue https://github.com/franko/lite-xl/issues/122 -## 1.16.4 +## [1.16.4] - 2021-03-20 Add tooltips to show full file names from the tree-view. @@ -589,7 +592,7 @@ Made borders between tabs look cleaner. Fix problem with files using hard tabs. -## 1.16.2 +## [1.16.2] - 2021-03-05 Implement close button for tabs. @@ -597,7 +600,7 @@ Make the command view list of suggestion scrollable to see all the items. Improve update/resize behavior of treeview and toolbar. -## 1.16.1 +## [1.16.1] - 2021-02-25 Improve behavior of commands to move, delete and duplicate multiple lines: no longer include the last line if it does not contain any selection. @@ -611,7 +614,7 @@ Very useful for remote sessions where visual transitions doesn't work well. Fix many small problems related to the new toolbar and the tooptips. Fix problem with spacing in treeview when using monospace fonts. -## 1.16 +## [1.16] - 2021-02-19 Implement a toolbar shown in the bottom part of the tree-view. The toolbar is especially meant for new users to give an easy, visual, access @@ -632,7 +635,7 @@ Show the full path filename of the active document in the window's title. Fix problem with user's module reload not always enabled. -## 1.15 +## [1.15] - 2021-01-04 **Project directories** @@ -676,7 +679,7 @@ Show 'Lite XL' instead of 'lite' and the version number. A few quirks previously with some of the new features have been fixed for a better user experience. -## 1.14 +## [1.14] - 2020-12-13 **Project Management** @@ -717,7 +720,7 @@ improves text selection with mouse. Correct font's rendering for full hinting mode when using subpixel antialiasing. -## 1.13 +## [1.13] - 2020-12-06 **Rendering options for fonts** @@ -763,7 +766,7 @@ on Windows wher "USERPROFILE" is used instead. A new global variable `USERDIR` is exposed to point to the user's directory. -## 1.11 +## [1.11] - 2020-07-05 - include changes from rxi's Lite 1.11 - fix behavior of tab to indent multiple lines @@ -771,11 +774,11 @@ A new global variable `USERDIR` is exposed to point to the user's directory. - limit project scan to a maximum number of files to limit memory usage - list recently visited files when using "Find File" command -## 1.08 +## [1.08] - 2020-06-14 - Subpixel font rendering, removed gamma correction - Avoid using CPU when the editor is idle -## 1.06 +## [1.06] - 2020-05-31 - subpixel font rendering with gamma correction