Initial commit
This commit is contained in:
commit
7488dd5649
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Антон Аксенов (aka Anthony Axenov)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
29
README.md
Normal file
29
README.md
Normal file
@ -0,0 +1,29 @@
|
||||
# env syntax support plugin for lite-xl
|
||||
|
||||
[Lite-XL](https://lite-xl.com/) is lightweight, fast and customizable open-source code editor.
|
||||
|
||||
This plugin adds extra syntax highlighting for such fyletypes:
|
||||
* `.gitignore`
|
||||
* `.dockerignore`
|
||||
* and any other `.blablablaignore` which has identical simple syntax rules.
|
||||
|
||||
Supported highlighting:
|
||||
* comments;
|
||||
* excluded (ignored) patterns;
|
||||
* included (not-ignored) patterns.
|
||||
|
||||
You can use any of [these files](https://github.com/github/gitignore) to check how plugin works (just rename it to `.gitignore` or `.dockerignore`).
|
||||
|
||||
## How to install
|
||||
|
||||
To install a plugin:
|
||||
|
||||
* Drop `language_env.lua` file in:
|
||||
* Linux: `~/.config/lite-xl/plugins/`
|
||||
* MacOS: `~/.config/lite-xl/plugins/`
|
||||
* Windows: `C:\Users\(username)\.config\lite-xl\plugins\`
|
||||
* If lite-xl is already opened then `Ctrl+Shift+P => rst => <Enter>` to reboot editor's core and load plugin immidiately.
|
||||
|
||||
## License
|
||||
|
||||
[The MIT License](LICENSE)
|
24
language_ignore.lua
Normal file
24
language_ignore.lua
Normal file
@ -0,0 +1,24 @@
|
||||
-- mod-version:2
|
||||
|
||||
-- Anthony Axenov (c) 2022, The MIT License
|
||||
-- https://github.com/anthonyaxenov/lite-xl-env-syntax
|
||||
|
||||
local syntax = require "core.syntax"
|
||||
local style = require "core.style"
|
||||
local common = require "core.common"
|
||||
|
||||
style.syntax["ignore"] = { common.color "#72B886" }
|
||||
style.syntax["exclude"] = { common.color "#F36161" }
|
||||
|
||||
syntax.add {
|
||||
name = ".ignore file",
|
||||
files = { "%..*ignore$" },
|
||||
comment = "#",
|
||||
patterns = {
|
||||
{ regex = "^ *#.*$", type = "comment" },
|
||||
{ regex = { "(?=^ *!.)", "$" }, type = "ignore" },
|
||||
{ regex = { "(?=.)", "$" }, type = "exclude" },
|
||||
},
|
||||
symbols = {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user