- State of Development
- Quick Feature Overview
- Quick Start
- Contributing
- Working With The Code Base
- Dependencies
Code Awarenes is currently in an active state of development. Feel free to submit feedback, PRs, etc. Other components of the Code Awareness ecosystem are also in active state of development, so please follow us on github or our website.
Please see the README-Development.md for more details.
Code Awareness highlights the code intersections between your working copy and other team member’s. This provides an early warning system for merge conflicts, as well as instant traveling between working copies of multiple developers without needing to commit and push.
## License
This package is licensed under the GPLv3. It requires the Code Awareness binary (proprietary, licensed separately) to function fully.
First please download and install Code Awareness from Code Awareness website.
Clone this repository, and then in your emacs config, add the following lines, and replace the home/username/ca.emacs with the path of your choice.
“` ;; Code Awareness Configuration (let ((code-awareness-path ”home/username/ca.emacs”)) (when (file-exists-p code-awareness-path) (add-to-list ‘load-path code-awareness-path) (require ‘code-awareness) (message “Code Awareness loaded successfully”))) “`
## Spacemacs Configuration
If you’re using Spacemacs, you can add the Code Awareness configuration to your `~/.spacemacs` file in the `dotspacemacs/user-config` section:
“`elisp (defun dotspacemacs/user-config () ;; Code Awareness Configuration (let ((code-awareness-path ”home/username/ca.emacs”)) (when (file-exists-p code-awareness-path) (add-to-list ‘load-path code-awareness-path) (require ‘code-awareness) (message “Code Awareness loaded successfully”))))
### Loading Compiled Version (.elc files)
To load the compiled version instead of the source files for better performance:
- **Compile the package first:** “`bash cd /path/to/ca.emacs make compile “`
- **Automatic loading (no action needed):** Emacs automatically loads `.elc` files when they exist alongside `.el` files. The compiled version will be loaded automatically.
- **Force loading of compiled version (optional):** If you want to ensure only compiled files are loaded and prevent any fallback to source files, you can modify your config to explicitly load the `.elc` files: “`elisp (defun dotspacemacs/user-config () ;; Code Awareness Configuration (compiled version) (let ((code-awareness-path ”home/username/ca.emacs”)) (when (file-exists-p code-awareness-path) (add-to-list ‘load-path code-awareness-path) ;; Force loading of compiled version if available (let ((compiled-file (expand-file-name “code-awareness.elc” code-awareness-path))) (if (file-exists-p compiled-file) (load compiled-file) ;; Fallback to source if no compiled version (require ‘code-awareness))) (message “Code Awareness loaded successfully”)))) “`
**Note:** The compiled version loads faster and includes all the compilation fixes we’ve implemented. Always run `make compile` after making changes to ensure your `.elc` files are up to date.
**Summary for users:**
- **Required**: Run `make compile` to create `.elc` files
- **Automatic**: Emacs will use the compiled version by default
- **Optional**: Use step 3 only if you want to force compiled-only loading
- First download and run the https://code-awareness.com[Code Awareness] application.
- Login to Code Awareness through the application.
- In emacs, run the `code-awareness-mode` command to enter Code Awareness minor mode.
- The Code Awareness application is used side by side with emacs, VSCode, etc, i.e. on a wide-screen monitor, or on a second monitor.
Contributions are very much welcome, but should fit the general scope and style of Code Awareness. The following is a list of guidelines that should be met (exceptions confirm the rule):
- There should be one commit per feature.
- Commit messages should start with a note in brackets that roughly describes the area the commit relates to, for
example
[Icons]if you add an icon. - New features must be documented in the readme.
- There must not be any compiler warnings.
- The test suite must pass.
Code Awareness uses cask to setup a local testing environment and a Makefile that simplifies compiling and testing the codebase. First run cask install to locally pull code-awareness’ dependencies. Then you can use the following Makefile targets:
- make prepare
- Downloads and updates Cask’s dependencies. Is a dependency of the
testandcompiletargets. - make compile
- Compiles the code base (and treats compiler warnings as errors).
- make clean
- Removes the generated .elc files.
- make lint
- Runs first
compilethenclean, even if the former fails. - make test
- Runs the testsuite, once in a graphical environment and once in the terminal.
If you want to delve into the code-awareness’ code base, check out the wiki for some general pointers.
- emacs >= 26.1 (>= 27.1 for tab-bar)
- dex
- shasht
We’re also embedding the process-sockets package which should be published to MELPA soon, at which point CodeAwareness package will also be updated to depend on it.
