aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--plugins/language_rivet.lua3
-rw-r--r--plugins/selectionhighlight.lua13
3 files changed, 14 insertions, 6 deletions
diff --git a/README.md b/README.md
index c3867ef..8630399 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
# Lite XL plugins
+
Plugins for the [Lite XL text editor](https://github.com/lite-xl/lite-xl), originally forked from the [lite plugins repository](https://github.com/rxi/lite-plugins).
If you can't find a plugin that suits your needs,
@@ -6,6 +7,7 @@ check if someone has already created an issue about it,
otherwise feel free to create one yourself.
## How to install
+
To install a plugin:
* If the plugin links to a repository, follow its `README`.
@@ -64,6 +66,7 @@ to something other than a raw file it should be marked with an asterisk.*
| [`language_batch`](plugins/language_batch.lua?raw=1) | Syntax for Windows [Batch Files](https://en.wikipedia.org/wiki/Batch_file) |
| [`language_bib`](plugins/language_bib.lua?raw=1) | Syntax for [BibTex](https://en.wikipedia.org/wiki/BibTeX) files |
| [`language_cmake`](plugins/language_cmake.lua?raw=1) | Syntax for the CMake build system language |
+| [`language_containerfile`](https://github.com/FilBot3/lite-xl-language-containerfile)\* | Syntax for [Containerfile](https://github.com/containers/common/blob/main/docs/Containerfile.5.md)/[Dockerfile](https://docs.docker.com/engine/reference/builder/) |
| [`language_cpp`](plugins/language_cpp.lua?raw=1) | Syntax for the [C++](https://isocpp.org/) programming language |
| [`language_crystal`](https://github.com/Tamnac/lite-xl-plugins) | Syntax for the [Crystal](https://crystal-lang.org) programming language |
| [`language_csharp`](plugins/language_csharp.lua?raw=1) | Syntax for the [C#](http://csharp.net) programming language |
@@ -130,6 +133,7 @@ to something other than a raw file it should be marked with an asterisk.*
| [`lint+`](https://github.com/liquid600pgm/lintplus)\* | Advanced linter with ErrorLens-like error reporting. Compatible with linters made for `linter` *([screenshot](https://raw.githubusercontent.com/liquid600pgm/lintplus/master/screenshots/1.png))* |
| [`linter`](https://github.com/drmargarido/linters)\* | Linters for multiple languages |
| [`litepresence`](https://github.com/TorchedSammy/Litepresence)\* | Discord rich presence for Lite XL (display file editing in Discord) |
+| [`lorem`](https://github.com/sheetcoder/lorem)\* | Generates Lorem Ipsum placeholder dummy text |
| [`lsp`](https://github.com/lite-xl/lite-xl-lsp)\* | Provides code completion (also known as IntelliSense) using the Language Server Protocol |
| [`lspkind`](https://github.com/TorchedSammy/lite-xl-lspkind)\* | Completion menu kind/type icons for Lite XL LSP |
| [`macmodkeys`](plugins/macmodkeys.lua?raw=1) | Remaps mac modkeys `command/option` to `ctrl/alt` |
diff --git a/plugins/language_rivet.lua b/plugins/language_rivet.lua
index b291749..9aa3462 100644
--- a/plugins/language_rivet.lua
+++ b/plugins/language_rivet.lua
@@ -68,6 +68,7 @@ syntax.add {
["mut"] = "keyword",
["unsafe"] = "keyword",
["goto"] = "keyword",
+ ["go"] = "keyword",
["try"] = "keyword",
["orelse"] = "keyword",
["catch"] = "keyword",
@@ -78,6 +79,7 @@ syntax.add {
["and"] = "keyword",
-- types
+ ["ptr"] = "keyword2",
["bool"] = "keyword2",
["i8"] = "keyword2",
["i16"] = "keyword2",
@@ -93,7 +95,6 @@ syntax.add {
["isize"] = "keyword2",
["usize"] = "keyword2",
["str"] = "keyword2",
- ["rawptr"] = "keyword2",
["Self"] = "keyword2",
-- literals
diff --git a/plugins/selectionhighlight.lua b/plugins/selectionhighlight.lua
index 76e0617..19bc475 100644
--- a/plugins/selectionhighlight.lua
+++ b/plugins/selectionhighlight.lua
@@ -17,6 +17,7 @@ end
local draw_line_body = DocView.draw_line_body
function DocView:draw_line_body(idx, x, y)
+ draw_line_body(self, idx, x, y)
local line1, col1, line2, col2 = self.doc:get_selection(true)
if line1 == line2 and col1 ~= col2 then
local selection = self.doc:get_text(line1, col1, line2, col2)
@@ -30,14 +31,16 @@ function DocView:draw_line_body(idx, x, y)
selected_text, last_col, true
)
if start_col == nil then break end
- local x1 = x + self:get_col_x_offset(idx, start_col)
- local x2 = x + self:get_col_x_offset(idx, end_col + 1)
- local color = style.selectionhighlight or style.syntax.comment
- draw_box(x1, y, x2 - x1, lh, color)
+ -- don't draw box around the selection
+ if idx ~= line1 or start_col ~= col1 then
+ local x1 = x + self:get_col_x_offset(idx, start_col)
+ local x2 = x + self:get_col_x_offset(idx, end_col + 1)
+ local color = style.selectionhighlight or style.syntax.comment
+ draw_box(x1, y, x2 - x1, lh, color)
+ end
last_col = end_col + 1
end
end
end
- draw_line_body(self, idx, x, y)
end