A quality of life plugin for the Lite XL text editor. Offering improvements such as highlighted comments and autocomplete for brackets, quotes and more.
Highlight comments with special properties using the @Todo(...) and @Fixme(...) keywords for an enhanced coding experience. Basic auto-complete features like brackets, parentheses and quotation marks for an EU keyboard layout. Autocomplete can be disabled to enable compatibility with other plugins with autocomplete and other keyboard layouts.
Navigate to the data/plugins
folder and run the following command:
git clone https://github.com/chqs-git/code-plus.git
Alternatively you can download and rename the init.lua
file to code+.lua
and drop it into the data/plugins
folder.
Using the settings plugin for Lite Xl you can easily configure your experience by changing the highlight colors for the @todo and @fixme operators.
If you wish to add more highlights you can simply update the following code:
function DocView:draw_line_text(line, x, y)
local lh = draw_line_text(self, line, x, y)
if config.plugins.code_plus.enabled then
highlight_comment(self, line, x, y, "@todo", config.plugins.code_plus.todo)
highlight_comment(self, line, x, y, "@fixme", config.plugins.code_plus.fixme)
-- add a new highlight! the color is just an example
highlight_comment(self, line, x, y, "@new_tag", {common.color "#ffffff"})
end
return lh
end
To extend the already auto-completing utilities to other keywords, you can simply use the complete
function. Create a new command for the new auto-complete utility (required) and map a key to the command.