Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdmfernandes/tree-sitter-selinux
Tree-sitter grammar for SELinux
https://github.com/mdmfernandes/tree-sitter-selinux
grammar-parser selinux tree-sitter
Last synced: 13 days ago
JSON representation
Tree-sitter grammar for SELinux
- Host: GitHub
- URL: https://github.com/mdmfernandes/tree-sitter-selinux
- Owner: mdmfernandes
- License: mit
- Created: 2024-04-07T23:29:22.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-28T16:53:02.000Z (6 months ago)
- Last Synced: 2024-10-10T23:22:54.687Z (about 1 month ago)
- Topics: grammar-parser, selinux, tree-sitter
- Language: JavaScript
- Homepage:
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tree-sitter grammar for SELinux
**HEAVILY WIP!!!**
## Set in Neovim for local development
### Install
Add the following content to the tree-sitter Neovim config:
```lua
init = function()
-- Tree-sitter selinux parser
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.selinux = {
install_info = {
url = "~/src/tree-sitter-selinux",
files = { "src/parser.c" },
-- optional entries:
branch = "main",
generate_requires_npm = false,
requires_generate_from_grammar = false,
},
}
end,
```See [nvim-treesitter -> adding
parsers](https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#adding-parsers) for details.### Highlights
The queries must be added to the nvim-treesitter runtime directory:
```bash
cd ~/.local/share/nvim/lazy/nvim-treesitter/queries
ln -s ~/src/tree-sitter-selinux/queries ./selinux
```### Text objects
The queries must be added to the nvim-treesitter-textobjects runtime directory:
```bash
cd ~/.local/share/nvim/lazy/nvim-treesitter-textobjects/queries
ln -s ~/src/tree-sitter-selinux/queries ./selinux
```## References
- [The SELinux Notebook](https://github.com/SELinuxProject/selinux-notebook)