A Neovim Linter for the École 42 Norme.
- NeoVim
v0.5+
(nightly release). - mfussenegger/nvim-lint.
- Executable
norminette
in your PATH (version 3 specifically).
Use the package manager of your choice.
Packer.nvim
:
use { 'vinicius507/norme.nvim', requires = { 'mfussenegger/nvim-lint' } }
vim-plug
Plug 'mfussenegger/nvim-lint'
Plug 'vinicius507/norme.nvim'
In your nvim-lint
configuration you just have to add:
local lint = require('lint')
local norme = require('norme').linter
lint.linters.norme = norme
require('lint').linters_by_ft = {
c = { 'norme', },
cpp = { 'norme', }, -- for header and C++ files
}
To add it to your init.vim
, create a lua file and add the code above. Then source it to your init.vim
using:
luafile ~/path/to/luafile.lua
If you use init.lua
, just place your plugin configuration file in the folder in $HOME/.config/nvim/lua
and source it in your init.lua
using:
require('filename') -- without the .lua extension
Add the following autocmd
's:
autocmd BufEnter *.c,*.h lua require('norme').lint()
autocmd BufWritePost *.c,*.h lua require('norme').lint()
autocmd InsertLeave *.c,*.h lua require('norme').lint()
autocmd TextChanged *.c,*.h lua require('norme').lint()
Norme.nvim will only run if the 42 École header is in the file.
Vinícius Gonçalves de Oliveira(vgoncalv)
Cadet at 42 São Paulo