Neovim plugin for OpenFGA modeling language support.
- Adds
.fga
as a file type - Comment/uncomment lines with "gcc"
- Basic syntax highlighting for
.fga
files - Optional automatic installation of TreeSitter grammar for OpenFGA (matoous/tree-sitter-fga)
- Optional LSP integration
Using lazy.nvim:
{
"hedengran/fga.nvim",
dependencies = {
"neovim/nvim-lspconfig", -- Optional, for LSP integration
"nvim-treesitter/nvim-treesitter", -- Optional, for enhanced syntax highlighting
},
config = function()
require("fga").setup({
install_treesitter_grammar = true,
lsp_server = "/path/to/vscode-ext/server/out/server.node.js",
})
end,
}
If installation of tree-sitter grammar, just run TSInstall fga
, once the plugin has been loaded.
To setup the LSP server:
- Clone the OpenFGA VSCode extension:
git clone https://github.com/openfga/vscode-ext
cd vscode-ext
- Install dependencies and build:
npm install
npm run compile
- The LSP server will be available at
vscode-ext/server/out/server.node.js
nvim-lspconfig
(optional) for LSP supportnvim-treesitter
(optional) for enhanced syntax highlighting
- TreeSitter grammar by matoous
- LSP server from OpenFGA VSCode Extension
MIT License