diff options
75 files changed, 125 insertions, 196 deletions
@@ -13,19 +13,20 @@ with the official version of lite, format the name in italic.* Plugin | Description -------|----------------------------------------- [`autoinsert`](plugins/autoinsert.lua?raw=1) | Automatically inserts closing brackets and quotes +*[`autosave`](plugins/autosave.lua?raw=1)* | Automatically saves files when they are changed [`autowrap`](plugins/autowrap.lua?raw=1) | Automatically hardwraps lines when typing -[`bigclock`](plugins/bigclock.lua?raw=1) | Shows the current time and date in a view with large text *([screenshot](https://user-images.githubusercontent.com/3920290/82752891-3318df00-9db9-11ea-803f-261d80d5cf53.png))* +*[`bigclock`](plugins/bigclock.lua?raw=1)* | Shows the current time and date in a view with large text *([screenshot](https://user-images.githubusercontent.com/3920290/82752891-3318df00-9db9-11ea-803f-261d80d5cf53.png))* [`black`](https://git.sr.ht/~tmpod/black-lite)* | Integrates the [black](https://github.com/psf/black) Python formatter with lite [`bracketmatch`](plugins/bracketmatch.lua?raw=1) | Underlines matching pair for bracket under the caret *([screenshot](https://user-images.githubusercontent.com/3920290/80132745-0c863f00-8594-11ea-8875-c455c6fd7eae.png))* [`centerdoc`](plugins/centerdoc.lua?raw=1) | Centers document's content on the screen *([screenshot](https://user-images.githubusercontent.com/3920290/82127896-bf6e4500-97ae-11ea-97fc-ba9a552bc9a4.png))* -[`closeconfirmx`](plugins/closeconfirmx.lua?raw=1) | Replaces a system close confirmation dialog with a command view, like for individual files *([screenshot](https://user-images.githubusercontent.com/1689801/107596774-afa76280-6c53-11eb-80ab-22e73058c097.png))* +~~[`closeconfirmx`](plugins/closeconfirmx.lua?raw=1)~~ | Replaced by NagView dialog ~~Replaces a system close confirmation dialog with a command view, like for individual files *([screenshot](https://user-images.githubusercontent.com/1689801/107596774-afa76280-6c53-11eb-80ab-22e73058c097.png))*~~ [`colorpreview`](plugins/colorpreview.lua?raw=1) | Underlays color values (eg. `#ff00ff` or `rgb(255, 0, 255)`) with their resultant color. *([screenshot](https://user-images.githubusercontent.com/3920290/80743752-731bd780-8b15-11ea-97d3-847db927c5dc.png))* *[`console`](https://github.com/franko/console)* | A console for running external commands and capturing their output *([gif](https://user-images.githubusercontent.com/3920290/81343656-49325a00-90ad-11ea-8647-ff39d8f1d730.gif))* -[`copyfilelocation`](plugins/copyfilelocation.lua?raw=1) | Copy file location to clipboard +*[`copyfilelocation`](plugins/copyfilelocation.lua?raw=1)* | Copy file location to clipboard [`datetimestamps`](plugins/datetimestamps.lua?raw=1) | Insert date-, time- and date-time-stamps ~~[`detectindent`](plugins/detectindent.lua?raw=1)~~ | Included with lite-xl ~~Automatically detects and uses the indentation size and tab type of a loaded file~~ [`dragdropselected`](plugins/dragdropselected.lua?raw=1) | Provides basic drag and drop of selected text (in same document) -*[`drawwhitespace`](plugins/drawwhitespace.lua?raw=1)* | Draws tabs and spaces *([screenshot](https://user-images.githubusercontent.com/3920290/80573013-22ae5800-89f7-11ea-9895-6362a1c0abc7.png))* +~~*[`drawwhitespace`](plugins/drawwhitespace.lua?raw=1)*~~ | Integrated with lite-xl reducing CPU usage ~~Draws tabs and spaces *([screenshot](https://user-images.githubusercontent.com/3920290/80573013-22ae5800-89f7-11ea-9895-6362a1c0abc7.png))*~~ [`eofnewline`](https://github.com/bokunodev/lite_modules/blob/master/plugins/eofnewline.lua?raw=1) | Make sure the file ends with one blank line. [`eval`](plugins/eval.lua?raw=1) | Replaces selected Lua code with its evaluated result [`exec`](plugins/exec.lua?raw=1) | Runs selected text through shell command and replaces with result @@ -72,7 +73,7 @@ Plugin | Description [`language_teal`](plugins/language_teal.lua?raw=1) | Syntax for the [Teal](https://github.com/teal-language/tl) programming language, a typed dialect of Lua. [`language_tex`](plugins/language_tex.lua?raw=1) | Syntax for the [LaTeX](https://www.latex-project.org/) typesetting language [`language_wren`](plugins/language_wren.lua?raw=1) | Syntax for the [Wren](http://wren.io/) programming language -[`lastproject`](plugins/lastproject.lua?raw=1) | Loads the last loaded project if lite is launched without any arguments +~~[`lastproject`](plugins/lastproject.lua?raw=1)~~ | Integrated with lite-xl ~~Loads the last loaded project if lite is launched without any arguments~~ [`lfautoinsert`](plugins/lfautoinsert.lua?raw=1) | Automatically inserts indentation and closing bracket/text after newline [`linecopypaste`](plugins/linecopypaste.lua?raw=1) | Copy, cut and paste the current line when nothing is selected [*`lineguide`*](plugins/lineguide.lua?raw=1) | Displays a line-guide at the line limit offset *([screenshot](https://user-images.githubusercontent.com/3920290/81476159-2cf70000-9208-11ea-928b-9dae3884c477.png))* diff --git a/plugins/autoinsert.lua b/plugins/autoinsert.lua index 243e00b..2bb0753 100644 --- a/plugins/autoinsert.lua +++ b/plugins/autoinsert.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local translate = require "core.doc.translate" local config = require "core.config" diff --git a/plugins/autosave.lua b/plugins/autosave.lua new file mode 100644 index 0000000..51786a1 --- /dev/null +++ b/plugins/autosave.lua @@ -0,0 +1,45 @@ +local core = require "core" +local config = require "core.config" +local Doc = require "core.doc" +local DocView = require "core.docview" +local command = require "core.command" +-- this is used to detect the wait time +local last_keypress = os.time() +-- this exists so that we don't end up with multiple copies of the loop running at once +local looping = false +local on_text_change = Doc.on_text_change +-- the approximate amount of time, in seconds, that it takes to trigger an autosave +config.autosave_timeout = 1 + + +local function loop_for_save() + while looping do + if os.difftime(os.time(), last_keypress) >= config.autosave_timeout then + command.perform "doc:save" + -- stop loop + looping = false + end + -- wait the timeout. may cause timeout to be slightly imprescise + coroutine.yield(config.autosave_timeout) + end +end + + +local function updatepress() + -- set last keypress time to now + last_keypress = os.time() + -- put loop in coroutine so it doesn't lag out this script + if not looping then + looping = true + core.add_thread(loop_for_save) + end +end + + +function Doc:on_text_change(type) + -- check if file is saved + if self.filename then + updatepress() + end + return on_text_change(type) +end diff --git a/plugins/autowrap.lua b/plugins/autowrap.lua index 85d4c24..9df59a5 100644 --- a/plugins/autowrap.lua +++ b/plugins/autowrap.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 require "plugins.reflow" local config = require "core.config" local command = require "core.command" diff --git a/plugins/bigclock.lua b/plugins/bigclock.lua index e35cdbe..1419e00 100644 --- a/plugins/bigclock.lua +++ b/plugins/bigclock.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local style = require "core.style" local command = require "core.command" @@ -29,8 +30,8 @@ end function ClockView:update_fonts() local size = math.floor(self.size.x * 0.15 / 15) * 15 * config.bigclock_scale if self.font_size ~= size then - self.time_font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", size) - self.date_font = renderer.font.load(EXEDIR .. "/data/fonts/font.ttf", size * 0.3) + self.time_font = renderer.font.load(DATADIR .. "/fonts/font.ttf", size) + self.date_font = renderer.font.load(DATADIR .. "/fonts/font.ttf", size * 0.3) self.font_size = size collectgarbage() end diff --git a/plugins/bracketmatch.lua b/plugins/bracketmatch.lua index 4253de7..9566c02 100644 --- a/plugins/bracketmatch.lua +++ b/plugins/bracketmatch.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local style = require "core.style" local command = require "core.command" diff --git a/plugins/centerdoc.lua b/plugins/centerdoc.lua index 1921467..ee4bb2b 100644 --- a/plugins/centerdoc.lua +++ b/plugins/centerdoc.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local config = require "core.config" local DocView = require "core.docview" diff --git a/plugins/closeconfirmx.lua b/plugins/closeconfirmx.lua deleted file mode 100644 index 805fe3b..0000000 --- a/plugins/closeconfirmx.lua +++ /dev/null @@ -1,54 +0,0 @@ --- CloseConfirmX plugin for lite text editor --- implementation by chekoopa - -local core = require "core" -local config = require "core.config" - -config.closeconfirmx_use_legacy = false -config.closeconfirmx_use_short_name = true - -local legacy_confirm = core.confirm_close_all - -local function commandful_confirm() - local dirty_count = 0 - local dirty_name - for _, doc in ipairs(core.docs) do - if doc:is_dirty() then - dirty_count = dirty_count + 1 - dirty_name = doc:get_name() - end - end - if dirty_count > 0 then - local text - if dirty_count == 1 then - if config.closeconfirmx_use_short_name then - dirty_name = dirty_name:match("[^/%\\]*$") - end - text = string.format("Unsaved changes in \"%s\"; Confirm Exit", dirty_name) - else - text = string.format("Unsaved changes in %d docs; Confirm Exit", dirty_count) - end - core.command_view:enter(text, function(_, item) - if item.text:match("^[cC]") then - core.quit(true) - end - end, function(text) - local items = {} - if not text:find("^[^sS]") then table.insert(items, "Stay here") end - if not text:find("^[^cC]") then table.insert(items, "Close Without Saving") end - return items - end) - -- as we delegate a choice inside the callback, - return false - end - return true -end - -function core.confirm_close_all() - if config.closeconfirmx_use_legacy then - return legacy_confirm() - else - return commandful_confirm() - end -end - diff --git a/plugins/colorpreview.lua b/plugins/colorpreview.lua index dca419c..1289357 100644 --- a/plugins/colorpreview.lua +++ b/plugins/colorpreview.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local common = require "core.common" local DocView = require "core.docview" diff --git a/plugins/copyfilelocation.lua b/plugins/copyfilelocation.lua index d365240..48520b8 100644 --- a/plugins/copyfilelocation.lua +++ b/plugins/copyfilelocation.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local command = require "core.command" local config = require "core.config" @@ -6,12 +7,11 @@ local config = require "core.config" command.add("core.docview", { ["copy-file-location:copy-file-location"] = function() local doc = core.active_view.doc - if not doc.filename then + if not doc.abs_filename then core.error "Cannot copy location of unsaved doc" return end - local filename = system.absolute_path(doc.filename) - core.log("Copying to clipboard \"%s\"", filename) - system.set_clipboard(filename) + core.log("Copying to clipboard \"%s\"", doc.abs_filename) + system.set_clipboard(doc.abs_filename) end }) diff --git a/plugins/datetimestamps.lua b/plugins/datetimestamps.lua index 518f0a9..e1d7d3b 100644 --- a/plugins/datetimestamps.lua +++ b/plugins/datetimestamps.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local config = require "core.config" local command = require "core.command" diff --git a/plugins/detectindent.lua b/plugins/detectindent.lua deleted file mode 100644 index 9c473b5..0000000 --- a/plugins/detectindent.lua +++ /dev/null @@ -1,64 +0,0 @@ -local core = require "core" -local command = require "core.command" -local config = require "core.config" -local DocView = require "core.docview" -local Doc = require "core.doc" - -local cache = setmetatable({}, { __mode = "k" }) - - -local function detect_indent(doc) - for _, text in ipairs(doc.lines) do - local str = text:match("^ +") - if str then return "soft", #str end - local str = text:match("^\t+") - if str then return "hard" end - end -end - - -local function update_cache(doc) - local type, size = detect_indent(doc) - if type then - cache[doc] = { type = type, size = size } - end -end - - -local new = Doc.new -function Doc:new(...) - new(self, ...) - update_cache(self) -end - -local clean = Doc.clean -function Doc:clean(...) - clean(self, ...) - update_cache(self) -end - - -local function with_indent_override(doc, fn, ...) - local c = cache[doc] - if not c then - return fn(...) - end - local type, size = config.tab_type, config.indent_size - config.tab_type, config.indent_size = c.type, c.size or config.indent_size - local r1, r2, r3 = fn(...) - config.tab_type, config.indent_size = type, size - return r1, r2, r3 -end - - -local perform = command.perform -function command.perform(...) - return with_indent_override(core.active_view.doc, perform, ...) -end - - -local draw = DocView.draw -function DocView:draw(...) - return with_indent_override(self.doc, draw, self, ...) -end - diff --git a/plugins/dragdropselected.lua b/plugins/dragdropselected.lua index a2ce67f..5364fa4 100644 --- a/plugins/dragdropselected.lua +++ b/plugins/dragdropselected.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 --[[ dragdropselected.lua provides basic drag and drop of selected text (in same document) diff --git a/plugins/drawwhitespace.lua b/plugins/drawwhitespace.lua deleted file mode 100644 index 4e2e109..0000000 --- a/plugins/drawwhitespace.lua +++ /dev/null @@ -1,38 +0,0 @@ -local common = require "core.common" -local config = require "core.config" -local style = require "core.style" -local DocView = require "core.docview" -local command = require "core.command" - --- originally written by luveti - -config.whitespace_map = { [" "] = "·", ["\t"] = "»" } -config.draw_whitespace = true - -local draw_line_text = DocView.draw_line_text - -function DocView:draw_line_text(idx, x, y) - draw_line_text(self, idx, x, y) - if not config.draw_whitespace then return end - - local text = self.doc.lines[idx] - local font = self:get_font() - local ss = font:subpixel_scale() - local tx, ty = ss * x, y + self:get_line_text_y_offset() - local color = style.whitespace or style.syntax.comment - local map = config.whitespace_map - - for chr in common.utf8_chars(text) do - local rep = map[chr] - if rep then - renderer.draw_text_subpixel(font, rep, tx, ty, color) - end - tx = tx + font:get_width_subpixel(chr) - end -end - -command.add("core.docview", { - ["draw-whitespace:toggle"] = function() config.draw_whitespace = not config.draw_whitespace end, - ["draw-whitespace:disable"] = function() config.draw_whitespace = false end, - ["draw-whitespace:enable"] = function() config.draw_whitespace = true end, -}) diff --git a/plugins/eval.lua b/plugins/eval.lua index 54e08ba..2444454 100644 --- a/plugins/eval.lua +++ b/plugins/eval.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local command = require "core.command" diff --git a/plugins/exec.lua b/plugins/exec.lua index fe87afc..82a94c3 100644 --- a/plugins/exec.lua +++ b/plugins/exec.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local command = require "core.command" diff --git a/plugins/ghmarkdown.lua b/plugins/ghmarkdown.lua index 0f49c02..249e459 100644 --- a/plugins/ghmarkdown.lua +++ b/plugins/ghmarkdown.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local command = require "core.command" local keymap = require "core.keymap" diff --git a/plugins/gitstatus.lua b/plugins/gitstatus.lua index a58fd0f..849567d 100644 --- a/plugins/gitstatus.lua +++ b/plugins/gitstatus.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local config = require "core.config" local style = require "core.style" diff --git a/plugins/gofmt.lua b/plugins/gofmt.lua index 11c90b9..b730431 100644 --- a/plugins/gofmt.lua +++ b/plugins/gofmt.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local command = require "core.command" local keymap = require "core.keymap" diff --git a/plugins/hidelinenumbers.lua b/plugins/hidelinenumbers.lua index 206bd23..7eb496d 100644 --- a/plugins/hidelinenumbers.lua +++ b/plugins/hidelinenumbers.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local style = require "core.style" local DocView = require "core.docview" diff --git a/plugins/hidestatus.lua b/plugins/hidestatus.lua index 5c0bb15..9dcc352 100644 --- a/plugins/hidestatus.lua +++ b/plugins/hidestatus.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local command = require "core.command" local StatusView = require "core.statusview" diff --git a/plugins/indentguide.lua b/plugins/indentguide.lua index db57f9e..184c37f 100644 --- a/plugins/indentguide.lua +++ b/plugins/indentguide.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local style = require "core.style" local config = require "core.config" local DocView = require "core.docview" diff --git a/plugins/language_angelscript.lua b/plugins/language_angelscript.lua index 8c39cff..48d68e1 100644 --- a/plugins/language_angelscript.lua +++ b/plugins/language_angelscript.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_batch.lua b/plugins/language_batch.lua index 8caad59..29de0fe 100644 --- a/plugins/language_batch.lua +++ b/plugins/language_batch.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" -- batch syntax for lite <liqube> diff --git a/plugins/language_cmake.lua b/plugins/language_cmake.lua index 78354e1..a70298c 100644 --- a/plugins/language_cmake.lua +++ b/plugins/language_cmake.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_cpp.lua b/plugins/language_cpp.lua index 2b2fce5..4a734e0 100644 --- a/plugins/language_cpp.lua +++ b/plugins/language_cpp.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 pcall(require, "plugins.language_c") local syntax = require "core.syntax" diff --git a/plugins/language_csharp.lua b/plugins/language_csharp.lua index c40009c..2988506 100644 --- a/plugins/language_csharp.lua +++ b/plugins/language_csharp.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_d.lua b/plugins/language_d.lua index 4597943..704fecf 100644 --- a/plugins/language_d.lua +++ b/plugins/language_d.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_dart.lua b/plugins/language_dart.lua index 5083fb2..7aee8e9 100644 --- a/plugins/language_dart.lua +++ b/plugins/language_dart.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_elixir.lua b/plugins/language_elixir.lua index f87fad9..280c2ce 100644 --- a/plugins/language_elixir.lua +++ b/plugins/language_elixir.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_elm.lua b/plugins/language_elm.lua index 4f449a0..09e474f 100644 --- a/plugins/language_elm.lua +++ b/plugins/language_elm.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_fe.lua b/plugins/language_fe.lua index f97e73b..416ec0d 100644 --- a/plugins/language_fe.lua +++ b/plugins/language_fe.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_fennel.lua b/plugins/language_fennel.lua index 7320e91..62c0913 100644 --- a/plugins/language_fennel.lua +++ b/plugins/language_fennel.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 -- Support for the Fennel programming language: https://fennel-lang.org -- Covers all the keywords up to Fennel version 0.4.0 diff --git a/plugins/language_gdscript.lua b/plugins/language_gdscript.lua index e301354..dd40b10 100644 --- a/plugins/language_gdscript.lua +++ b/plugins/language_gdscript.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 -- Support for the GDScript programming language: https://godotengine.org/ -- Covers the most used keywords up to Godot version 3.2.x diff --git a/plugins/language_glsl.lua b/plugins/language_glsl.lua index da69ebd..55f07b1 100644 --- a/plugins/language_glsl.lua +++ b/plugins/language_glsl.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local style = require "core.style" local common = require "core.common" diff --git a/plugins/language_go.lua b/plugins/language_go.lua index dffbaf9..bdc8436 100644 --- a/plugins/language_go.lua +++ b/plugins/language_go.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_hlsl.lua b/plugins/language_hlsl.lua index 1444ef4..428a6f1 100644 --- a/plugins/language_hlsl.lua +++ b/plugins/language_hlsl.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local style = require "core.style" local common = require "core.common" diff --git a/plugins/language_hs.lua b/plugins/language_hs.lua index f0bf378..8d7110e 100644 --- a/plugins/language_hs.lua +++ b/plugins/language_hs.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_java.lua b/plugins/language_java.lua index 1d9e12d..e041fae 100644 --- a/plugins/language_java.lua +++ b/plugins/language_java.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_jiyu.lua b/plugins/language_jiyu.lua index 1cf94dc..788faba 100644 --- a/plugins/language_jiyu.lua +++ b/plugins/language_jiyu.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_make.lua b/plugins/language_make.lua index f586a05..a61f609 100644 --- a/plugins/language_make.lua +++ b/plugins/language_make.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_meson.lua b/plugins/language_meson.lua index 0c91d05..97fde72 100644 --- a/plugins/language_meson.lua +++ b/plugins/language_meson.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_moon.lua b/plugins/language_moon.lua index 4817743..3e81767 100644 --- a/plugins/language_moon.lua +++ b/plugins/language_moon.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_nim.lua b/plugins/language_nim.lua index af230e4..ded8792 100644 --- a/plugins/language_nim.lua +++ b/plugins/language_nim.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" local patterns = {} diff --git a/plugins/language_objc.lua b/plugins/language_objc.lua index 221e5c3..5be940e 100644 --- a/plugins/language_objc.lua +++ b/plugins/language_objc.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_odin.lua b/plugins/language_odin.lua index c3413f2..58f4b39 100644 --- a/plugins/language_odin.lua +++ b/plugins/language_odin.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_php.lua b/plugins/language_php.lua index d6ed516..3bf22a1 100644 --- a/plugins/language_php.lua +++ b/plugins/language_php.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_pico8.lua b/plugins/language_pico8.lua index 8edf92f..a1c41df 100644 --- a/plugins/language_pico8.lua +++ b/plugins/language_pico8.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_powershell.lua b/plugins/language_powershell.lua index 01c00f4..61fecd1 100644 --- a/plugins/language_powershell.lua +++ b/plugins/language_powershell.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax"
syntax.add {
diff --git a/plugins/language_psql.lua b/plugins/language_psql.lua index 7c6c4b7..dc65120 100644 --- a/plugins/language_psql.lua +++ b/plugins/language_psql.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" -- In sql symbols can be lower case and upper case diff --git a/plugins/language_rust.lua b/plugins/language_rust.lua index 37ba81f..466901f 100644 --- a/plugins/language_rust.lua +++ b/plugins/language_rust.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_sass.lua b/plugins/language_sass.lua index 5b043c1..3f9988b 100644 --- a/plugins/language_sass.lua +++ b/plugins/language_sass.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_sh.lua b/plugins/language_sh.lua index 7b9c0d8..9b04008 100644 --- a/plugins/language_sh.lua +++ b/plugins/language_sh.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_teal.lua b/plugins/language_teal.lua index 8ab4c33..8a6c560 100644 --- a/plugins/language_teal.lua +++ b/plugins/language_teal.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_tex.lua b/plugins/language_tex.lua index eced489..3ad607c 100644 --- a/plugins/language_tex.lua +++ b/plugins/language_tex.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/language_wren.lua b/plugins/language_wren.lua index ccd53db..5940b40 100644 --- a/plugins/language_wren.lua +++ b/plugins/language_wren.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local syntax = require "core.syntax" syntax.add { diff --git a/plugins/lastproject.lua b/plugins/lastproject.lua deleted file mode 100644 index 5fb23bd..0000000 --- a/plugins/lastproject.lua +++ /dev/null @@ -1,29 +0,0 @@ -local core = require "core" - -local last_project_filename = EXEDIR .. PATHSEP .. ".lite_last_project" - - --- load last project path -local fp = io.open(last_project_filename) -local project_path -if fp then - project_path = fp:read("*a") - fp:close() -end - - --- save current project path -local fp = io.open(last_project_filename, "w") -if nil ~= fp then - fp:write(system.absolute_path ".") - fp:close() -end - - --- restart using last project path if we had no commandline arguments and could --- find a last-project file -if #ARGS == 1 and project_path then - system.exec(string.format("%s %q", EXEFILE, project_path)) - core.quit(true) -end - diff --git a/plugins/lfautoinsert.lua b/plugins/lfautoinsert.lua index 0ea7b9d..d4792e0 100644 --- a/plugins/lfautoinsert.lua +++ b/plugins/lfautoinsert.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local command = require "core.command" local config = require "core.config" diff --git a/plugins/linecopypaste.lua b/plugins/linecopypaste.lua index eb6f375..39d18f9 100755 --- a/plugins/linecopypaste.lua +++ b/plugins/linecopypaste.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16
local core = require "core"
local command = require "core.command"
diff --git a/plugins/lineguide.lua b/plugins/lineguide.lua index 7669c52..b3828bf 100644 --- a/plugins/lineguide.lua +++ b/plugins/lineguide.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local config = require "core.config" local style = require "core.style" local DocView = require "core.docview" diff --git a/plugins/macmodkeys.lua b/plugins/macmodkeys.lua index 69028ab..3f24128 100644 --- a/plugins/macmodkeys.lua +++ b/plugins/macmodkeys.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local keymap = require "core.keymap" local on_key_pressed = keymap.on_key_pressed diff --git a/plugins/markers.lua b/plugins/markers.lua index 6e397d7..c4ca9a6 100644 --- a/plugins/markers.lua +++ b/plugins/markers.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16
-- Markers plugin for lite text editor
-- original implementation by Petri Häkkinen
diff --git a/plugins/motiontrail.lua b/plugins/motiontrail.lua index e688e1b..8074f58 100644 --- a/plugins/motiontrail.lua +++ b/plugins/motiontrail.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local config = require "core.config" local style = require "core.style" diff --git a/plugins/openfilelocation.lua b/plugins/openfilelocation.lua index 58c3d6f..0cf26f1 100644 --- a/plugins/openfilelocation.lua +++ b/plugins/openfilelocation.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local command = require "core.command" local config = require "core.config" diff --git a/plugins/openselected.lua b/plugins/openselected.lua index 65fdeb8..f7dc917 100644 --- a/plugins/openselected.lua +++ b/plugins/openselected.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local command = require "core.command" local keymap = require "core.keymap" diff --git a/plugins/rainbowparen.lua b/plugins/rainbowparen.lua index b2689f0..6154b34 100644 --- a/plugins/rainbowparen.lua +++ b/plugins/rainbowparen.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local tokenizer = require "core.tokenizer" local style = require "core.style" local common = require "core.common" diff --git a/plugins/scale.lua b/plugins/scale.lua index 9d9ea73..e93c3c0 100644 --- a/plugins/scale.lua +++ b/plugins/scale.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local common = require "core.common" local command = require "core.command" diff --git a/plugins/scalestatus.lua b/plugins/scalestatus.lua index 03216b5..248c8a4 100644 --- a/plugins/scalestatus.lua +++ b/plugins/scalestatus.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 --[[ scalestatus.lua displays current scale (zoom) in status view diff --git a/plugins/selectionhighlight.lua b/plugins/selectionhighlight.lua index 93dfe17..adad725 100644 --- a/plugins/selectionhighlight.lua +++ b/plugins/selectionhighlight.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local style = require "core.style" local DocView = require "core.docview" diff --git a/plugins/sort.lua b/plugins/sort.lua index 2e865ab..6912a5a 100644 --- a/plugins/sort.lua +++ b/plugins/sort.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local command = require "core.command" local translate = require "core.doc.translate" diff --git a/plugins/spellcheck.lua b/plugins/spellcheck.lua index 1f29792..eedf318 100644 --- a/plugins/spellcheck.lua +++ b/plugins/spellcheck.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local style = require "core.style" local config = require "core.config" diff --git a/plugins/tabnumbers.lua b/plugins/tabnumbers.lua index deabbcd..29c3f8c 100644 --- a/plugins/tabnumbers.lua +++ b/plugins/tabnumbers.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local common = require "core.common" local core = require "core" local style = require "core.style" diff --git a/plugins/titleize.lua b/plugins/titleize.lua index 2e4b52a..a9ea7a5 100644 --- a/plugins/titleize.lua +++ b/plugins/titleize.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local command = require "core.command" diff --git a/plugins/togglesnakecamel.lua b/plugins/togglesnakecamel.lua index 236c22e..994ffd0 100644 --- a/plugins/togglesnakecamel.lua +++ b/plugins/togglesnakecamel.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local core = require "core" local command = require "core.command" local keymap = require "core.keymap" diff --git a/plugins/unboundedscroll.lua b/plugins/unboundedscroll.lua index c4cc7bb..4429b61 100644 --- a/plugins/unboundedscroll.lua +++ b/plugins/unboundedscroll.lua @@ -1,3 +1,4 @@ +-- lite-xl 1.16 local DocView = require "core.docview" function DocView.clamp_scroll_position() |