diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..2c34d5c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "printWidth": 100, + "proseWrap": "always", + "singleQuote": true +} diff --git a/README.md b/README.md index 3e33f87..88e5fa4 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,71 @@ juCi++ ## About -In 2015, juCi++ was one of the first IDEs to utilize libclang for improved C/C++ tooling. -The integrated C/C++ support has since then improved steadily, and support for other -languages has been made possible through the language server protocol. The main goals of juCi++ is -effective resource usage, stability, and ease of use. Instead of relying on 3rd party addons, -features expected in an IDE is instead integrated directly into juCi++. -For effective development, juCi++ is primarily written for Unix/Linux systems. However, Windows users -can use juCi++ through POSIX compatibility layers such as MSYS2. +In 2015, juCi++ was one of the first IDEs to utilize libclang for improved C/C++ tooling. The +integrated C/C++ support has since then improved steadily, and support for other languages has been +made possible through the language server protocol. The main goals of juCi++ is effective resource +usage, stability, and ease of use. Instead of relying on 3rd party addons, features expected in an +IDE is instead integrated directly into juCi++. + +For effective development, juCi++ is primarily written for Unix/Linux systems. However, Windows +users can use juCi++ through POSIX compatibility layers such as MSYS2. ## Features -* Platform independent -* Fast, responsive and stable (written extensively using C++11/14 features) -* Syntax highlighting for more than 100 different file types -* Warnings and errors on the fly -* Fix-its, as well as C/C++ standard header include suggestions -* Integrated Clang-Tidy checks can be enabled in preferences -* Debug integration, both local and remote, through lldb -* Supports the following C/C++ build systems directly (other build systems need manually generated compilation databases): - * CMake - * Meson -* Fast autocompletion -* Tooltips showing type information and documentation -* Rename refactoring across files -* Highlighting of similar types -* Automated documentation search for C/C++ identifiers -* Go to declaration, implementation, methods and usages -* OpenCL and CUDA files are supported and parsed as C++ -* Non-C/C++ files are supported through the Language Server Protocol, which is enabled if an `[language identifier]-language-server` executable is found. This executable can be a symbolic link to one of your installed language server binaries. - * For additional instructions, see: [setup of tested language servers](docs/language_servers.md) -* Non-C/C++ projects are also supported, such as Python, JavaScript, and Rust projects -* Git support through libgit2 -* Find symbol through Ctags ([Universal Ctags](https://github.com/universal-ctags/ctags) is recommended) -* Spell checking depending on file context -* Run shell commands within juCi++ -* ANSI colors are supported. Enable for instance by setting the environment variables `CLICOLOR=1 CLICOLOR_FORCE=1` before starting juCi++. Colored diagnostics from clang is enabled through the flag `-fcolor-diagnostics`, and gcc uses the flag `-fdiagnostics-color`. -* Regex search and replace -* Smart paste, keys and indentation -* Extend/shrink selection -* Multiple cursors -* Snippets can be added in ~/.juci/snippets.json using the [TextMate snippet syntax](https://macromates.com/manual/en/snippets). The language ids used in the regexes can be found here: https://gitlab.gnome.org/GNOME/gtksourceview/tree/master/data/language-specs. -* Auto-indentation through [clang-format](http://clang.llvm.org/docs/ClangFormat.html) or [Prettier](https://github.com/prettier/prettier) if installed -* Source minimap -* Split view -* Zen mode -* Full UTF-8 support -* Wayland supported with GTK+ 3.20 or newer - -See [enhancements](https://gitlab.com/cppit/jucipp/issues?scope=all&state=opened&label_name[]=enhancement) for planned features. + +- Platform independent +- Fast, responsive and stable (written extensively using C++11/14 features) +- Syntax highlighting for more than 100 different file types +- Warnings and errors on the fly +- Fix-its, as well as C/C++ standard header include suggestions +- Integrated Clang-Tidy checks can be enabled in preferences +- Debug integration, both local and remote, through lldb +- Supports the following C/C++ build systems directly (other build systems need manually generated + compilation databases): + - CMake + - Meson +- Fast autocompletion +- Tooltips showing type information and documentation +- Rename refactoring across files +- Highlighting of similar types +- Automated documentation search for C/C++ identifiers +- Go to declaration, implementation, methods and usages +- OpenCL and CUDA files are supported and parsed as C++ +- Non-C/C++ files are supported through the Language Server Protocol, which is enabled if an + `[language identifier]-language-server` executable is found. This executable can be a symbolic + link to one of your installed language server binaries. + - For additional instructions, see: [setup of tested language servers](docs/language_servers.md) +- Non-C/C++ projects are also supported, such as Python, JavaScript, and Rust projects +- Git support through libgit2 +- Find symbol through Ctags ([Universal Ctags](https://github.com/universal-ctags/ctags) is + recommended) +- Spell checking depending on file context +- Run shell commands within juCi++ +- ANSI colors are supported. Enable for instance by setting the environment variables + `CLICOLOR=1 CLICOLOR_FORCE=1` before starting juCi++. Colored diagnostics from clang is enabled + through the flag `-fcolor-diagnostics`, and gcc uses the flag `-fdiagnostics-color`. +- Regex search and replace +- Smart paste, keys and indentation +- Extend/shrink selection +- Multiple cursors +- Snippets can be added in ~/.juci/snippets.json using the + [TextMate snippet syntax](https://macromates.com/manual/en/snippets). The language ids used in the + regexes can be found here: + https://gitlab.gnome.org/GNOME/gtksourceview/tree/master/data/language-specs. +- Auto-indentation through [clang-format](http://clang.llvm.org/docs/ClangFormat.html) or + [Prettier](https://github.com/prettier/prettier) if installed +- Source minimap +- Split view +- Zen mode +- Full UTF-8 support +- Wayland supported with GTK+ 3.20 or newer + +See +[enhancements](https://gitlab.com/cppit/jucipp/issues?scope=all&state=opened&label_name[]=enhancement) +for planned features. ## Screenshots + @@ -62,22 +77,28 @@ See [enhancements](https://gitlab.com/cppit/jucipp/issues?scope=all&state=opened
## Installation + See [installation guide](docs/install.md). ## Custom styling + See [custom styling](docs/custom_styling.md). ## Dependencies -* boost-filesystem -* boost-serialization -* gtkmm-3.0 -* gtksourceviewmm-3.0 -* aspell -* libclang -* lldb -* libgit2 -* [libclangmm](http://gitlab.com/cppit/libclangmm/) (downloaded directly with git --recursive, no need to install) -* [tiny-process-library](http://gitlab.com/eidheim/tiny-process-library/) (downloaded directly with git --recursive, no need to install) + +- boost-filesystem +- boost-serialization +- gtkmm-3.0 +- gtksourceviewmm-3.0 +- aspell +- libclang +- lldb +- libgit2 +- [libclangmm](http://gitlab.com/cppit/libclangmm/) (downloaded directly with git --recursive, no + need to install) +- [tiny-process-library](http://gitlab.com/eidheim/tiny-process-library/) (downloaded directly with + git --recursive, no need to install) ## Documentation + See [how to build the API doc](docs/api.md). diff --git a/docs/api.md b/docs/api.md index 329e970..5d3c23b 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1,13 +1,16 @@ # juCi++ API doc ## Prerequisites: - * doxygen - * plantuml - * install via apt-get or download from http://plantuml.com/ - * see also http://plantuml.com/starting.html - * if downloaded either copy the jar file to /usr/bin or set the environment variable PLANTUML_PATH to point to the path containing the jar file) + +- doxygen +- plantuml + - install via apt-get or download from http://plantuml.com/ + - see also http://plantuml.com/starting.html + - if downloaded either copy the jar file to /usr/bin or set the environment variable PLANTUML_PATH + to point to the path containing the jar file) ## How to build the API doc: + ```sh mkdir jucipp/build cd jucipp/build @@ -16,4 +19,5 @@ make doc ``` ## Where is the generated API documentation + Open jucipp/build/src/html/index.html diff --git a/docs/custom_styling.md b/docs/custom_styling.md index 2dbee89..bf61a8c 100644 --- a/docs/custom_styling.md +++ b/docs/custom_styling.md @@ -10,7 +10,7 @@ was made with the following ~/.config/gtk-3.0/gtk.css: ```css .juci_window { - background: url("/home/eidheim/Pictures/juci_background.png"); + background: url('/home/eidheim/Pictures/juci_background.png'); background-size: 100% 100%; } diff --git a/docs/install.md b/docs/install.md index 45a2239..1141164 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,22 +1,24 @@ # juCi++ Installation Guide - Installation - - Linux - - [Debian/Linux Mint/Ubuntu](#debianlinux-mintubuntu) - - [Arch Linux/Manjaro Linux](#arch-linuxmanjaro-linux) - - [Fedora](#fedora) - - [Mageia](#mageia) - - [OpenSUSE Tumbleweed](#opensuse-tumbleweed) - - [GNU Guix/GuixSD](#gnu-guixguixsd) - - [FreeBSD](#freebsd) - - MacOS - - [Homebrew](#macos-with-homebrew-httpbrewsh) - - Windows - - [MSYS2](#windows-with-msys2-httpsmsys2githubio) + - Linux + - [Debian/Linux Mint/Ubuntu](#debianlinux-mintubuntu) + - [Arch Linux/Manjaro Linux](#arch-linuxmanjaro-linux) + - [Fedora](#fedora) + - [Mageia](#mageia) + - [OpenSUSE Tumbleweed](#opensuse-tumbleweed) + - [GNU Guix/GuixSD](#gnu-guixguixsd) + - [FreeBSD](#freebsd) + - MacOS + - [Homebrew](#macos-with-homebrew-httpbrewsh) + - Windows + - [MSYS2](#windows-with-msys2-httpsmsys2githubio) - [Run](#run) ## Debian/Linux Mint/Ubuntu + Install dependencies: + ```sh sudo apt-get install libclang-dev liblldb-dev || sudo apt-get install libclang-6.0-dev liblldb-6.0-dev || sudo apt-get install libclang-4.0-dev liblldb-4.0-dev || sudo apt-get install libclang-3.8-dev liblldb-3.8-dev sudo apt-get install universal-ctags || sudo apt-get install exuberant-ctags @@ -24,6 +26,7 @@ sudo apt-get install git cmake make g++ clang-format pkg-config libboost-filesys ``` Get juCi++ source, compile and install: + ```sh git clone --recursive https://gitlab.com/cppit/jucipp mkdir jucipp/build @@ -34,12 +37,15 @@ sudo make install ``` ## Arch Linux/Manjaro Linux + Install dependencies: + ```sh sudo pacman -S git cmake pkg-config make clang lldb gtksourceviewmm boost aspell aspell-en libgit2 ctags ``` Get juCi++ source, compile and install: + ```sh git clone --recursive https://gitlab.com/cppit/jucipp mkdir jucipp/build @@ -50,12 +56,15 @@ sudo make install ``` ## Fedora + Install dependencies: + ```sh sudo dnf install git cmake make gcc-c++ clang-devel clang lldb-devel boost-devel gtksourceviewmm3-devel gtkmm30-devel aspell-devel aspell-en libgit2-devel ctags ``` Get juCi++ source, compile and install: + ```sh git clone --recursive https://gitlab.com/cppit/jucipp mkdir jucipp/build @@ -66,6 +75,7 @@ sudo make install ``` ## Mageia + **Mageia might not yet support LLDB, but you can compile without debug support.** Install dependencies: @@ -77,11 +87,13 @@ sudo urpmi git cmake make gcc-c++ clang libclang-devel libboost-devel libgtkmm3. ``` 64-bit: + ```sh sudo urpmi git cmake make gcc-c++ clang lib64clang-devel lib64boost-devel lib64gtkmm3.0-devel lib64gtksourceviewmm3.0-devel lib64aspell-devel aspell-en libgit2-devel ``` Get juCi++ source, compile and install: + ```sh git clone --recursive https://gitlab.com/cppit/jucipp mkdir jucipp/build @@ -92,12 +104,15 @@ sudo make install ``` ## OpenSUSE Tumbleweed + Install dependencies: + ```sh sudo zypper install git-core cmake gcc-c++ boost-devel libboost_filesystem-devel libboost_serialization-devel clang-devel lldb-devel lldb gtksourceviewmm3_0-devel aspell-devel aspell-en libgit2-devel ctags ``` Get juCi++ source, compile and install: + ```sh git clone --recursive https://gitlab.com/cppit/jucipp mkdir jucipp/build @@ -108,27 +123,34 @@ sudo make install ``` ## GNU Guix/GuixSD + Simply install juCi++ from the official package definition + ```sh guix install jucipp ``` ## FreeBSD + On FreeBSD, latest release of juCi++ is available through the port: jucipp. ## MacOS with Homebrew (http://brew.sh/) + Install dependencies: + ```sh brew install cmake pkg-config boost gtksourceviewmm3 gnome-icon-theme aspell llvm clang-format libgit2 zlib libxml2 brew install --HEAD universal-ctags/universal-ctags/universal-ctags # Recommended Ctags package ``` Mojave users might need to install headers: + ```sh open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg ``` Get juCi++ source, compile and install: + ```sh git clone --recursive https://gitlab.com/cppit/jucipp mkdir jucipp/build @@ -139,9 +161,11 @@ make install ``` ## Windows with MSYS2 (https://msys2.github.io/) + **See https://gitlab.com/cppit/jucipp/issues/190 for details on adding debug support in MSYS2** Install dependencies (replace `x86_64` with `i686` for 32-bit MSYS2 installs): + ```sh pacman -S git mingw-w64-x86_64-cmake make mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-gtksourceviewmm3 mingw-w64-x86_64-boost mingw-w64-x86_64-aspell mingw-w64-x86_64-aspell-en mingw-w64-x86_64-libgit2 mingw-w64-x86_64-universal-ctags-git ``` @@ -149,6 +173,7 @@ pacman -S git mingw-w64-x86_64-cmake make mingw-w64-x86_64-toolchain mingw-w64-x Note that juCi++ must be built and run in a MinGW Shell (for instance MinGW-w64 Win64 Shell). Get juCi++ source, compile and install (replace `mingw64` with `mingw32` for 32-bit MSYS2 installs): + ```sh git clone --recursive https://gitlab.com/cppit/jucipp mkdir jucipp/build @@ -159,10 +184,13 @@ make install ``` ## Run + ```sh juci ``` + Alternatively, you can also include directories and files: + ```sh juci [directory] [file1 file2 ...] ``` diff --git a/docs/language_servers.md b/docs/language_servers.md index 12cd3e8..2ce6596 100644 --- a/docs/language_servers.md +++ b/docs/language_servers.md @@ -3,12 +3,14 @@ ## JavaScript/TypeScript ### JavaScript with Flow static type checker -* Prerequisites: - * Node.js -* Recommended: - * [Prettier](https://github.com/prettier/prettier) + +- Prerequisites: + - Node.js +- Recommended: + - [Prettier](https://github.com/prettier/prettier) (installed globally: `install i -g prettier`) Install language server, and create executable to enable server in juCi++: + ```sh npm install -g flow-bin @@ -18,16 +20,18 @@ flow lsp' > /usr/local/bin/javascript-language-server chmod 755 /usr/local/bin/javascript-language-server ``` -* Additional setup within a JavaScript project: - * Add a `.prettierrc` file to enable style format on save +- Additional setup within a JavaScript project: + - Add a `.prettierrc` file to enable style format on save ### TypeScript or JavaScript without Flow -* Prerequisites: - * Node.js -* Recommended: - * [Prettier](https://github.com/prettier/prettier) + +- Prerequisites: + - Node.js +- Recommended: + - [Prettier](https://github.com/prettier/prettier) (installed globally: `install i -g prettier`) Install language server, and create executable to enable server in juCi++: + ```sh npm install -g typescript-language-server typescript @@ -40,14 +44,16 @@ cp /usr/local/bin/javascript-language-server /usr/local/bin/typescript-language- cp /usr/local/bin/javascript-language-server /usr/local/bin/typescriptreact-language-server ``` -* Additional setup within a JavaScript project: - * Add a `.prettierrc` file to enable style format on save +- Additional setup within a JavaScript project: + - Add a `.prettierrc` file to enable style format on save ## Python3 -* Prerequisites: - * Python3 + +- Prerequisites: + - Python3 Install language server, and create symbolic link to enable server in juCi++: + ```sh pip3 install python-language-server[rope,pycodestyle,yapf] @@ -55,15 +61,18 @@ pip3 install python-language-server[rope,pycodestyle,yapf] ln -s `which pyls` /usr/local/bin/python-language-server ``` -* Additional setup within a Python project: - * Add a setup file, for instance: `printf '[pycodestyle]\nmax-line-length = 120\n\n[yapf]\nCOLUMN_LIMIT = 120\n' > setup.cfg` - * Add an empty `.python-format` file to enable style format on save +- Additional setup within a Python project: + - Add a setup file, for instance: + `printf '[pycodestyle]\nmax-line-length = 120\n\n[yapf]\nCOLUMN_LIMIT = 120\n' > setup.cfg` + - Add an empty `.python-format` file to enable style format on save ## Rust -* Prerequisites: - * Rust - + +- Prerequisites: + - Rust + Install language server, and create symbolic link to enable server in juCi++: + ```sh rustup component add rust-src @@ -75,11 +84,13 @@ cargo xtask install --server ln -s ~/.cargo/bin/rust-analyzer /usr/local/bin/rust-language-server ``` -* Additional setup within a Rust project: - * Add an empty `.rust-format` file to enable style format on save +- Additional setup within a Rust project: + - Add an empty `.rust-format` file to enable style format on save ## GLSL + Install language server, and create a script to enable server in juCi++: + ```sh git clone https://github.com/svenstaro/glsl-language-server --recursive cd glsl-language-server