Skip to content

Latest commit

 

History

History
84 lines (66 loc) · 2.1 KB

README.md

File metadata and controls

84 lines (66 loc) · 2.1 KB

42 Nvim

Neovim plugin for École 42.

Note

This plugin is still in early development. Breaking changes are expected.

Features

  • 42 Header: Utilities to manage the 42 header in your files.
  • Norminette Integration: Use norminette as a diagnostics source.

Installation

Requirements:

You can install the plugin using your favorite package manager:

---@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 = {},
}
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
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:

require("ft_nvim").setup({
	-- Configures the 42 Header integration
	header = {
		-- Enable the 42 Header integration (default: true).
		enable = 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).
		enable = 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,
	},
})