Browse Source

Added .prettierrc and applied style format on markdown files

pipelines/280567345
eidheim 5 years ago
parent
commit
a684e9995e
  1. 5
      .prettierrc
  2. 131
      README.md
  3. 14
      docs/api.md
  4. 2
      docs/custom_styling.md
  5. 52
      docs/install.md
  6. 53
      docs/language_servers.md

5
.prettierrc

@ -0,0 +1,5 @@
{
"printWidth": 100,
"proseWrap": "always",
"singleQuote": true
}

131
README.md

@ -1,56 +1,71 @@
<img alt="juCi++" src="share/juci.png" /> <img alt="juCi++" src="share/juci.png" />
## About ## 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 In 2015, juCi++ was one of the first IDEs to utilize libclang for improved C/C++ tooling. The
can use juCi++ through POSIX compatibility layers such as MSYS2. 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 ## Features
* Platform independent
* Fast, responsive and stable (written extensively using C++11/14 features) - Platform independent
* Syntax highlighting for more than 100 different file types - Fast, responsive and stable (written extensively using C++11/14 features)
* Warnings and errors on the fly - Syntax highlighting for more than 100 different file types
* Fix-its, as well as C/C++ standard header include suggestions - Warnings and errors on the fly
* Integrated Clang-Tidy checks can be enabled in preferences - Fix-its, as well as C/C++ standard header include suggestions
* Debug integration, both local and remote, through lldb - Integrated Clang-Tidy checks can be enabled in preferences
* Supports the following C/C++ build systems directly (other build systems need manually generated compilation databases): - Debug integration, both local and remote, through lldb
* CMake - Supports the following C/C++ build systems directly (other build systems need manually generated
* Meson compilation databases):
* Fast autocompletion - CMake
* Tooltips showing type information and documentation - Meson
* Rename refactoring across files - Fast autocompletion
* Highlighting of similar types - Tooltips showing type information and documentation
* Automated documentation search for C/C++ identifiers - Rename refactoring across files
* Go to declaration, implementation, methods and usages - Highlighting of similar types
* OpenCL and CUDA files are supported and parsed as C++ - Automated documentation search for C/C++ identifiers
* 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. - Go to declaration, implementation, methods and usages
* For additional instructions, see: [setup of tested language servers](docs/language_servers.md) - OpenCL and CUDA files are supported and parsed as C++
* Non-C/C++ projects are also supported, such as Python, JavaScript, and Rust projects - Non-C/C++ files are supported through the Language Server Protocol, which is enabled if an
* Git support through libgit2 `[language identifier]-language-server` executable is found. This executable can be a symbolic
* Find symbol through Ctags ([Universal Ctags](https://github.com/universal-ctags/ctags) is recommended) link to one of your installed language server binaries.
* Spell checking depending on file context - For additional instructions, see: [setup of tested language servers](docs/language_servers.md)
* Run shell commands within juCi++ - Non-C/C++ projects are also supported, such as Python, JavaScript, and Rust projects
* 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`. - Git support through libgit2
* Regex search and replace - Find symbol through Ctags ([Universal Ctags](https://github.com/universal-ctags/ctags) is
* Smart paste, keys and indentation recommended)
* Extend/shrink selection - Spell checking depending on file context
* Multiple cursors - Run shell commands within juCi++
* 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. - ANSI colors are supported. Enable for instance by setting the environment variables
* Auto-indentation through [clang-format](http://clang.llvm.org/docs/ClangFormat.html) or [Prettier](https://github.com/prettier/prettier) if installed `CLICOLOR=1 CLICOLOR_FORCE=1` before starting juCi++. Colored diagnostics from clang is enabled
* Source minimap through the flag `-fcolor-diagnostics`, and gcc uses the flag `-fdiagnostics-color`.
* Split view - Regex search and replace
* Zen mode - Smart paste, keys and indentation
* Full UTF-8 support - Extend/shrink selection
* Wayland supported with GTK+ 3.20 or newer - Multiple cursors
- Snippets can be added in ~/.juci/snippets.json using the
See [enhancements](https://gitlab.com/cppit/jucipp/issues?scope=all&state=opened&label_name[]=enhancement) for planned features. [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 ## Screenshots
<table border="0"> <table border="0">
<tr> <tr>
<td><img src="docs/images/screenshot1c.png" width="380"/></td> <td><img src="docs/images/screenshot1c.png" width="380"/></td>
@ -62,22 +77,28 @@ See [enhancements](https://gitlab.com/cppit/jucipp/issues?scope=all&state=opened
</table> </table>
## Installation ## Installation
See [installation guide](docs/install.md). See [installation guide](docs/install.md).
## Custom styling ## Custom styling
See [custom styling](docs/custom_styling.md). See [custom styling](docs/custom_styling.md).
## Dependencies ## Dependencies
* boost-filesystem
* boost-serialization - boost-filesystem
* gtkmm-3.0 - boost-serialization
* gtksourceviewmm-3.0 - gtkmm-3.0
* aspell - gtksourceviewmm-3.0
* libclang - aspell
* lldb - libclang
* libgit2 - lldb
* [libclangmm](http://gitlab.com/cppit/libclangmm/) (downloaded directly with git --recursive, no need to install) - libgit2
* [tiny-process-library](http://gitlab.com/eidheim/tiny-process-library/) (downloaded directly with git --recursive, no need to install) - [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 ## Documentation
See [how to build the API doc](docs/api.md). See [how to build the API doc](docs/api.md).

14
docs/api.md

@ -1,13 +1,16 @@
# juCi++ API doc # juCi++ API doc
## Prerequisites: ## Prerequisites:
* doxygen
* plantuml - doxygen
* install via apt-get or download from http://plantuml.com/ - plantuml
* see also http://plantuml.com/starting.html - install via apt-get or download from http://plantuml.com/
* 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) - 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: ## How to build the API doc:
```sh ```sh
mkdir jucipp/build mkdir jucipp/build
cd jucipp/build cd jucipp/build
@ -16,4 +19,5 @@ make doc
``` ```
## Where is the generated API documentation ## Where is the generated API documentation
Open jucipp/build/src/html/index.html Open jucipp/build/src/html/index.html

2
docs/custom_styling.md

@ -10,7 +10,7 @@ was made with the following ~/.config/gtk-3.0/gtk.css:
```css ```css
.juci_window { .juci_window {
background: url("/home/eidheim/Pictures/juci_background.png"); background: url('/home/eidheim/Pictures/juci_background.png');
background-size: 100% 100%; background-size: 100% 100%;
} }

52
docs/install.md

@ -1,22 +1,24 @@
# juCi++ Installation Guide # juCi++ Installation Guide
- Installation - Installation
- Linux - Linux
- [Debian/Linux Mint/Ubuntu](#debianlinux-mintubuntu) - [Debian/Linux Mint/Ubuntu](#debianlinux-mintubuntu)
- [Arch Linux/Manjaro Linux](#arch-linuxmanjaro-linux) - [Arch Linux/Manjaro Linux](#arch-linuxmanjaro-linux)
- [Fedora](#fedora) - [Fedora](#fedora)
- [Mageia](#mageia) - [Mageia](#mageia)
- [OpenSUSE Tumbleweed](#opensuse-tumbleweed) - [OpenSUSE Tumbleweed](#opensuse-tumbleweed)
- [GNU Guix/GuixSD](#gnu-guixguixsd) - [GNU Guix/GuixSD](#gnu-guixguixsd)
- [FreeBSD](#freebsd) - [FreeBSD](#freebsd)
- MacOS - MacOS
- [Homebrew](#macos-with-homebrew-httpbrewsh) - [Homebrew](#macos-with-homebrew-httpbrewsh)
- Windows - Windows
- [MSYS2](#windows-with-msys2-httpsmsys2githubio) - [MSYS2](#windows-with-msys2-httpsmsys2githubio)
- [Run](#run) - [Run](#run)
## Debian/Linux Mint/Ubuntu ## Debian/Linux Mint/Ubuntu
Install dependencies: Install dependencies:
```sh ```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 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 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: Get juCi++ source, compile and install:
```sh ```sh
git clone --recursive https://gitlab.com/cppit/jucipp git clone --recursive https://gitlab.com/cppit/jucipp
mkdir jucipp/build mkdir jucipp/build
@ -34,12 +37,15 @@ sudo make install
``` ```
## Arch Linux/Manjaro Linux ## Arch Linux/Manjaro Linux
Install dependencies: Install dependencies:
```sh ```sh
sudo pacman -S git cmake pkg-config make clang lldb gtksourceviewmm boost aspell aspell-en libgit2 ctags sudo pacman -S git cmake pkg-config make clang lldb gtksourceviewmm boost aspell aspell-en libgit2 ctags
``` ```
Get juCi++ source, compile and install: Get juCi++ source, compile and install:
```sh ```sh
git clone --recursive https://gitlab.com/cppit/jucipp git clone --recursive https://gitlab.com/cppit/jucipp
mkdir jucipp/build mkdir jucipp/build
@ -50,12 +56,15 @@ sudo make install
``` ```
## Fedora ## Fedora
Install dependencies: Install dependencies:
```sh ```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 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: Get juCi++ source, compile and install:
```sh ```sh
git clone --recursive https://gitlab.com/cppit/jucipp git clone --recursive https://gitlab.com/cppit/jucipp
mkdir jucipp/build mkdir jucipp/build
@ -66,6 +75,7 @@ sudo make install
``` ```
## Mageia ## Mageia
**Mageia might not yet support LLDB, but you can compile without debug support.** **Mageia might not yet support LLDB, but you can compile without debug support.**
Install dependencies: Install dependencies:
@ -77,11 +87,13 @@ sudo urpmi git cmake make gcc-c++ clang libclang-devel libboost-devel libgtkmm3.
``` ```
64-bit: 64-bit:
```sh ```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 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: Get juCi++ source, compile and install:
```sh ```sh
git clone --recursive https://gitlab.com/cppit/jucipp git clone --recursive https://gitlab.com/cppit/jucipp
mkdir jucipp/build mkdir jucipp/build
@ -92,12 +104,15 @@ sudo make install
``` ```
## OpenSUSE Tumbleweed ## OpenSUSE Tumbleweed
Install dependencies: Install dependencies:
```sh ```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 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: Get juCi++ source, compile and install:
```sh ```sh
git clone --recursive https://gitlab.com/cppit/jucipp git clone --recursive https://gitlab.com/cppit/jucipp
mkdir jucipp/build mkdir jucipp/build
@ -108,27 +123,34 @@ sudo make install
``` ```
## GNU Guix/GuixSD ## GNU Guix/GuixSD
Simply install juCi++ from the official package definition Simply install juCi++ from the official package definition
```sh ```sh
guix install jucipp guix install jucipp
``` ```
## FreeBSD ## FreeBSD
On FreeBSD, latest release of juCi++ is available through the port: jucipp. On FreeBSD, latest release of juCi++ is available through the port: jucipp.
## MacOS with Homebrew (http://brew.sh/) ## MacOS with Homebrew (http://brew.sh/)
Install dependencies: Install dependencies:
```sh ```sh
brew install cmake pkg-config boost gtksourceviewmm3 gnome-icon-theme aspell llvm clang-format libgit2 zlib libxml2 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 brew install --HEAD universal-ctags/universal-ctags/universal-ctags # Recommended Ctags package
``` ```
Mojave users might need to install headers: Mojave users might need to install headers:
```sh ```sh
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
``` ```
Get juCi++ source, compile and install: Get juCi++ source, compile and install:
```sh ```sh
git clone --recursive https://gitlab.com/cppit/jucipp git clone --recursive https://gitlab.com/cppit/jucipp
mkdir jucipp/build mkdir jucipp/build
@ -139,9 +161,11 @@ make install
``` ```
## Windows with MSYS2 (https://msys2.github.io/) ## Windows with MSYS2 (https://msys2.github.io/)
**See https://gitlab.com/cppit/jucipp/issues/190 for details on adding debug support in MSYS2** **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): Install dependencies (replace `x86_64` with `i686` for 32-bit MSYS2 installs):
```sh ```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 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). 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): Get juCi++ source, compile and install (replace `mingw64` with `mingw32` for 32-bit MSYS2 installs):
```sh ```sh
git clone --recursive https://gitlab.com/cppit/jucipp git clone --recursive https://gitlab.com/cppit/jucipp
mkdir jucipp/build mkdir jucipp/build
@ -159,10 +184,13 @@ make install
``` ```
## Run ## Run
```sh ```sh
juci juci
``` ```
Alternatively, you can also include directories and files: Alternatively, you can also include directories and files:
```sh ```sh
juci [directory] [file1 file2 ...] juci [directory] [file1 file2 ...]
``` ```

53
docs/language_servers.md

@ -3,12 +3,14 @@
## JavaScript/TypeScript ## JavaScript/TypeScript
### JavaScript with Flow static type checker ### JavaScript with Flow static type checker
* Prerequisites:
* Node.js - Prerequisites:
* Recommended: - Node.js
* [Prettier](https://github.com/prettier/prettier) - Recommended:
- [Prettier](https://github.com/prettier/prettier) (installed globally: `install i -g prettier`)
Install language server, and create executable to enable server in juCi++: Install language server, and create executable to enable server in juCi++:
```sh ```sh
npm install -g flow-bin 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 chmod 755 /usr/local/bin/javascript-language-server
``` ```
* Additional setup within a JavaScript project: - Additional setup within a JavaScript project:
* Add a `.prettierrc` file to enable style format on save - Add a `.prettierrc` file to enable style format on save
### TypeScript or JavaScript without Flow ### TypeScript or JavaScript without Flow
* Prerequisites:
* Node.js - Prerequisites:
* Recommended: - Node.js
* [Prettier](https://github.com/prettier/prettier) - Recommended:
- [Prettier](https://github.com/prettier/prettier) (installed globally: `install i -g prettier`)
Install language server, and create executable to enable server in juCi++: Install language server, and create executable to enable server in juCi++:
```sh ```sh
npm install -g typescript-language-server typescript 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 cp /usr/local/bin/javascript-language-server /usr/local/bin/typescriptreact-language-server
``` ```
* Additional setup within a JavaScript project: - Additional setup within a JavaScript project:
* Add a `.prettierrc` file to enable style format on save - Add a `.prettierrc` file to enable style format on save
## Python3 ## Python3
* Prerequisites:
* Python3 - Prerequisites:
- Python3
Install language server, and create symbolic link to enable server in juCi++: Install language server, and create symbolic link to enable server in juCi++:
```sh ```sh
pip3 install python-language-server[rope,pycodestyle,yapf] 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 ln -s `which pyls` /usr/local/bin/python-language-server
``` ```
* Additional setup within a Python project: - 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 a setup file, for instance:
* Add an empty `.python-format` file to enable style format on save `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 ## Rust
* Prerequisites:
* Rust - Prerequisites:
- Rust
Install language server, and create symbolic link to enable server in juCi++: Install language server, and create symbolic link to enable server in juCi++:
```sh ```sh
rustup component add rust-src 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 ln -s ~/.cargo/bin/rust-analyzer /usr/local/bin/rust-language-server
``` ```
* Additional setup within a Rust project: - Additional setup within a Rust project:
* Add an empty `.rust-format` file to enable style format on save - Add an empty `.rust-format` file to enable style format on save
## GLSL ## GLSL
Install language server, and create a script to enable server in juCi++: Install language server, and create a script to enable server in juCi++:
```sh ```sh
git clone https://github.com/svenstaro/glsl-language-server --recursive git clone https://github.com/svenstaro/glsl-language-server --recursive
cd glsl-language-server cd glsl-language-server

Loading…
Cancel
Save