Skip to content

Neovim plugin for OpenFGA modeling language support

License

Notifications You must be signed in to change notification settings

hedengran/fga.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fga.nvim

Neovim plugin for OpenFGA modeling language support.

Features

  • 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

Installation

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,
}

Tree-sitter Setup

If installation of tree-sitter grammar, just run TSInstall fga, once the plugin has been loaded.

LSP Server Setup

To setup the LSP server:

  1. Clone the OpenFGA VSCode extension:
git clone https://github.com/openfga/vscode-ext
cd vscode-ext
  1. Install dependencies and build:
npm install
npm run compile
  1. The LSP server will be available at vscode-ext/server/out/server.node.js

Requirements

  • nvim-lspconfig (optional) for LSP support
  • nvim-treesitter (optional) for enhanced syntax highlighting

Credits

License

MIT License

About

Neovim plugin for OpenFGA modeling language support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages