Giter VIP home page Giter VIP logo

Comments (3)

benekastah avatar benekastah commented on May 12, 2024

I'm more than willing to support any language at all. The reason there is no support for c at this moment is that nobody who regularly uses it has added support for it yet. I will happily merge a pull request that adds c support. To do this, you will need to add a file at autoload/neomake/makers/c.vim. A good minimal example of what this file should look like can be found at autoload/neomake/makers/ruby.vim. It might look roughly like this:

" vim: ts=4 sw=4 et

function! neomake#makers#c#EnabledMakers()
    return ['gcc']
endfunction

function! neomake#makers#c#gcc()
    return {
        \ 'args': ['-Wall', '{OTHER_ARGS_HERE}'],
        \ 'errorformat': '{REASONABLE_ERROR_FORMAT_HERE}'
        \ }
endfunction

Then you just fill in the blanks.

from neomake.

benekastah avatar benekastah commented on May 12, 2024

I should also mention that if you want to get up and running quickly for yourself, you have a couple of options apart from modifying the plugin source code.

  1. Set your makeprg and errorformat to whatever you use for c coding. If your makeprg can take a filename as an argument, then running :Neomake will just work. If it doesn't take an argument like that, you can run the command with no arguments in vim's current directory by running :Neomake! (note the exclamation point).
  2. Set up a linter like this:
let g:neomake_c_enabled_makers = ['gcc']
let g:neomake_c_gcc_maker = {
    \ 'exe': 'gcc',
    \ 'errorformat': '{WHATEVER_YOU_USE}',
    \ 'args': ['{WHATEVER_YOU_USE}']
    \ }

And run it on a c file using :Neomake!. As long as the executable takes a single file as input and your errorformat is accurate, it should just work.

from neomake.

benekastah avatar benekastah commented on May 12, 2024

#36 and #37 add c++ and c support respectively with clang.

from neomake.

Related Issues (20)

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.