https://github.com/vinicius507/ft_nvim
A Neovim plugin for École 42
https://github.com/vinicius507/ft_nvim
42header 42saopaulo 42school ecole-42 neovim neovim-plugin norminette
Last synced: about 1 month ago
JSON representation
A Neovim plugin for École 42
- Host: GitHub
- URL: https://github.com/vinicius507/ft_nvim
- Owner: vinicius507
- License: mit
- Created: 2024-07-12T16:05:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-04-26T04:24:28.000Z (about 2 months ago)
- Last Synced: 2026-04-26T06:23:14.931Z (about 2 months ago)
- Topics: 42header, 42saopaulo, 42school, ecole-42, neovim, neovim-plugin, norminette
- Language: Lua
- Homepage:
- Size: 67.4 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-42 - ft_nvim - 42 header plugin with Norminette linter. (Tools / Editor Extensions)
README
# 42 Nvim
Neovim plugin for [École 42](https://42.fr).
## Features
- **42 Header**: Utilities to manage the 42 header in your files.
- **Norminette Integration**: Use [norminette](https://github.com/42School/norminette) as a diagnostics source.
## Installation
**Requirements:**
- [Neovim](https://github.com/neovim/neovim) >= 0.6.0
- [nvim-lint](https://github.com/mfussenegger/nvim-lint) (Optional, used for norminette integration)
You can install the plugin using your favorite package manager:
- [lazy.nvim 💤](https://github.com/folke/lazy.nvim)
```lua
---@type LazySpec
return {
"vinicius507/ft_nvim",
cmd = { "FtHeader", "Norme" }, -- Lazy load the commands.
ft = { "c", "cpp" }, -- Lazy load for .c and .h files.
---@type ft_nvim.Config
opts = {},
}
```
- [packer.nvim](https://github.com/wbthomason/packer.nvim)
```lua
use({
"vinicius507/ft_nvim",
cmd = { "FtHeader", "Norme" }, -- Lazy load the commands.
ft = { "c", "cpp" }, -- Lazy load for .c and .h files.
config = function()
require("ft_nvim").setup()
end,
})
```
- Neovim's built-in package manager
```sh
git clone --depth 1 https://github.com/vinicius507/ft_nvim \
${XDG_DATA_HOME:-~/.local/share}/nvim/site/pack/packer/start/ft_nvim
```
## Configuration
The plugin can be configured by calling the `setup` function and passing an optional configuration object.
The following options are available:
```lua
require("ft_nvim").setup({
-- Configures the 42 Header integration
header = {
-- Enable the 42 Header integration (default: true).
enabled = true,
-- Your Intranet username (default: "marvin").
username = "marvin",
-- Your Intranet email (default: "marvin@42.fr").
email = "marvin@42.fr",
},
-- Configures the norminette integration.
norminette = {
-- Enable the norminette integration (default: true).
enabled = true,
-- The command to run norminette (default: "norminette").
cmd = "norminette",
-- A function to conditionally enable the norminette integration (default: nil)
condition = function()
return true
end,
},
})
```