Skip to content

j-griffith/atom-clang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atom-clang

LibClang based code completion and linter for Atom Editor

Features

  • Semantic code completion using autocomplete-plus
  • Diagnostics using linter
  • Native C++ v8 Node module using LibClang, no 3rd party dependencies.
    • Fast low-latency completions
    • Easy to setup with your project, no external configuration needed
  • Per project configuration supported with Project Manager

Requirements

Since this is a package uses C++, it will require the package to be compiled. This is automatically done for you by Atom, but it does have some requirements.

  • C++11 compiler, either GCC or Clang
  • LibClang 3.8 or greater

LibClang is detected via llvm-config command. Currently, it must be called llvm-config exactly. Not llvm-config-3.8, etc. I am looking into better ways to handle this, but node-gyp is limited in some sense.

Currently, this only works on Linux and Mac. I do not have a Windows computer. I would welcome any patches / pull requests to add Windows support.

Installing

This package should be installed through the Atom package manager. For the bleeding edge, you can clone this repository and link it into Atom with apm if desired.

Global Configuration

This package can work out-of-the-box, but usually requires some minor configuration. This is because parsing with LibClang, literally runs clang over your source files and usually needs the CFLAGS or CXXFLAGS one would use to compile.

You can set global CFLAGS and CXXFLAGS. This will work for any random projects without any major flags.

Per Project Configuration

Per project configuration with Atom is an ongoing open feature request. Thankfully, Project Manager gives us at least 99% of what we want. It does require you to manually edit the project settings file.

Keymaps

ctrl+alt+r Reparse Current Editor shift+ctrl+alt+r Reparse All Editors

Issues

Please report all issues in the issue tracker.

The more information you can include, the better. CFlags/CXXFlags especially. Having a reproducible test case would also greatly increase the debug time, though I realize that is not always possible.

Roadmap

I would love the roadmap to be largely driven by users, but her is a list I came up to get started.

  • Add support for compile_commands.json
  • Add support for precompiled headers
  • Add support for FixIt
  • Add support for ctrl-click code navigation

About

Native LibClang package for Atom Editor with Code Completion and Linter

Resources

License

Stars

Watchers

Forks

Packages

No packages published