GithubHelp home page GithubHelp logo

paulo-santana / norme.nvim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vinicius507/norme.nvim

0.0 1.0 0.0 46 KB

A Neovim Linter for the École 42 Norme.

License: MIT License

Lua 85.98% Shell 14.02%

norme.nvim's Introduction

Norme.nvim

A Neovim Linter for the École 42 Norme.

Requirements

Installation

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'

Configuration

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

Usage

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.

Author

Vinícius Gonçalves de Oliveira(vgoncalv)

Cadet at 42 São Paulo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.