Transition neovide.dev to use mdbook (#1428)

Co-authored-by: Hamothy <sgoudham@gmail.com>
main
Hamothy 2 years ago committed by GitHub
parent 6dba032f6a
commit 80b9f2edd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,6 +5,7 @@
- Feature
- Codestyle
- Refactor
- Documentation
- Other
## Did this PR introduce a breaking change?

@ -0,0 +1,22 @@
name: Lint Website
on:
push:
paths:
- ".github/workflows/lint.yml"
- "website/**/*.md"
jobs:
build:
name: Lint Website
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Lint Markdown
uses: nosborn/github-action-markdown-cli@v3.1.0
with:
files: ./website
config_file: ./website/.markdownlintrc

@ -1,38 +1,132 @@
name: Website
name: Build-Publish-Website
on:
push:
branches:
- main
pull_request:
paths:
- ".github/workflows/website.yml"
- "website/**"
- "!website/README.md"
jobs:
build:
name: Build Website
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
env:
MDBOOK-VERSION: v0.4.21
MDBOOK-PAGETOC-VERSION: v0.1.4
MDBOOK-LINKCHECK-VERSION: v0.7.6
CARGO_TERM_COLOR: always
steps:
- name: 'Checkout'
uses: actions/checkout@master
- name: 'Content update'
- name: Checkout Repository
uses: actions/checkout@v3
- name: Restore mdBook Cache
id: cache-mdbook
uses: actions/cache@v3
with:
path: ./mdbook
key: mdbook-${{ env.MDBOOK-VERSION }}
- name: Install mdbook
if: steps.cache-mdbook.outputs.cache-hit != 'true'
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/${{ env.MDBOOK-VERSION }}/mdbook-${{ env.MDBOOK-VERSION }}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
- name: Restore mdbook-pagetoc Cache
id: cache-mdbook-pagetoc
uses: actions/cache@v3
with:
path: ./mdbook-pagetoc
key: mdbook-pagetoc-${{ env.MDBOOK-PAGETOC-VERSION }}
- name: Install mdbook-pagetoc
if: steps.cache-mdbook-pagetoc.outputs.cache-hit != 'true'
run: |
mkdir mdbook-pagetoc
curl -sSL https://github.com/slowsage/mdbook-pagetoc/releases/download/${{ env.MDBOOK-PAGETOC-VERSION }}/mdbook-pagetoc-${{ env.MDBOOK-PAGETOC-VERSION }}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-pagetoc
- name: Restore mdbook-linkcheck Cache
id: cache-mdbook-linkcheck
uses: actions/cache@v3
with:
path: ./mdbook-linkcheck
key: mdbook-linkcheck-${{ env.MDBOOK-LINKCHECK-VERSION }}
- name: Install mdbook-linkcheck
if: steps.cache-mdbook-linkcheck.outputs.cache-hit != 'true'
run: |
mkdir mdbook-linkcheck && cd "$_"
curl -sSL https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/${{ env.MDBOOK-LINKCHECK-VERSION }}/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -o mdbook-linkcheck.zip
unzip mdbook-linkcheck.zip
chmod +x mdbook-linkcheck
- name: Update PATH
run: |
make -C website content_update
- name: 'Build only'
uses: shalzz/zola-deploy-action@master
env:
BUILD_DIR: website
BUILD_ONLY: true
build_and_deploy:
echo `pwd`/mdbook >> $GITHUB_PATH
echo `pwd`/mdbook-pagetoc >> $GITHUB_PATH
echo `pwd`/mdbook-linkcheck >> $GITHUB_PATH
- name: Build Book
run: mdbook build
working-directory: ./website
- name: Store HTML
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/upload-artifact@v3
with:
name: book
path: ./website/book
sitemap:
if: ${{ github.ref == 'refs/heads/main' }}
name: Generate Sitemap
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
env:
STATIC-SITEMAP-CLI-VERSION: 2.1.2
steps:
- name: 'Checkout'
uses: actions/checkout@master
- name: 'Content update'
- name: Download HTML
uses: actions/download-artifact@v3
with:
name: book
path: ./book
# Unsure how to cache NPM
- name: Install Static Sitemap CLI
run: |
make -C website content_update
- name: 'Build and deploy'
uses: shalzz/zola-deploy-action@master
env:
PAGES_BRANCH: gh-pages
BUILD_DIR: website
# See https://github.com/marketplace/actions/zola-deploy-to-pages#secrets for details
TOKEN: ${{ secrets.TOKEN }}
npm install npx
npm install static-sitemap-cli@${{ env.STATIC-SITEMAP-CLI-VERSION }}
- name: Generate Sitemap
run: |
cd ./book/html
npx sscli --base https://neovide.dev
- name: Store Sitemap
uses: actions/upload-artifact@v3
with:
name: sitemap
path: ./book/html/sitemap.xml
publish:
if: ${{ github.ref == 'refs/heads/main' }}
name: Publish Website
needs: sitemap
runs-on: ubuntu-latest
steps:
- name: Download HTML & Sitemap
uses: actions/download-artifact@v3
- name: Move Sitemap Into HTML
run: mv ./sitemap/sitemap.xml ./book/html
- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/html

1
.gitignore vendored

@ -3,3 +3,4 @@
**/*.rs.bk
*.log
.DS_Store
website/book

3
.gitmodules vendored

@ -1,3 +0,0 @@
[submodule "website/themes/juice"]
path = website/themes/juice
url = https://github.com/huhu/juice

1
.ok

@ -1 +0,0 @@
install: cargo build --release; rm c:/dev/tools/neovide.* -ErrorAction SilentlyContinue; cp ./target/release/neovide.exe c:/dev/tools/neovide.exe

@ -1,244 +1,32 @@
<!-- insert
---
title: Neovide
date: 2021-12-23T22:13:46
---
end_insert -->
<!-- remove -->
# Neovide [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/SjFpZdQys6) [![Chat on Matrix](https://matrix.to/img/matrix-badge.svg)](https://matrix.to/#/#neovide_community:gitter.im) [![Discussions](https://img.shields.io/badge/GitHub-Discussions-green?logo=github)](https://github.com/neovide/neovide/discussions)
<!-- end_remove -->
<!-- Powered by https://cj.rs/riss -->
This is a simple graphical user interface for [Neovim](https://github.com/neovim/neovim) (an aggressively refactored and updated
Vim editor). Where possible there are some graphical improvements, but functionally it should act like the terminal UI.
<img align="left" src="website/docs/assets/neovide-128x128.png">
![Basic Screen Cap](./assets/BasicScreenCap.png)
This is a simple graphical user interface for [Neovim](https://github.com/neovim/neovim) (an
aggressively refactored and updated Vim editor). Where possible there are some graphical
improvements, but functionally it should act like the terminal UI.
I've been using this as my daily driver since November 2019. It should be relatively stable, but I'm still working out some kinks
and ironing out some cross platform issues. In general it should be usable at this point, and if it isn't I consider that a bug and
appreciate a report in the issues! Any help and ideas are also greatly appreciated.
To checkout all the **cool features**, **installation instructions**, **configuration settings** and
much more, head on over to [neovide.dev](https://neovide.dev).
I'm also very interested in suggestions code quality/style wise when it comes to Rust. I'm pretty new to the language and appreciate
any critiques that you might have to offer. I won't take all of them, but I promise to consider anything you might have to offer.
<br>
## Features
<div align="center">
<img src="website/docs/assets/BasicScreenCap.png" alt="Screenshot of Neovide">
<em>Screenshot of Neovide running on Windows</em>
</div>
Should be a standard fully featured Neovim GUI. Beyond that there are some visual niceties:
## Author Notes
### Ligatures
I've been using this as my daily driver since November 2019. It should be relatively stable, but I'm
still working out some kinks and ironing out some cross platform issues. In general it should be
usable at this point, and if it isn't I consider that a bug and appreciate a report in the issues!
Any help and ideas are also greatly appreciated.
Supports ligatures and font shaping.
I'm also very interested in suggestions code quality/style wise when it comes to Rust. I'm pretty
new to the language and appreciate any critiques that you might have to offer. I won't take all of
them, but I promise to consider anything you might have to offer.
![Ligatures](./assets/Ligatures.png)
## License
### Animated Cursor
Cursor animates into position with a smear effect to improve tracking of cursor position.
![Animated Cursor](./assets/AnimatedCursor.gif)
### Smooth Scrolling
Scroll operations on buffers in neovim will be animated smoothly pixel wise rather than line by line at a time. Note, multigrid must be
enabled for this to work.
https://github.com/neovide/neovide/wiki/Configuration#multigrid
![Smooth Scrolling](./assets/SmoothScrolling.gif)
### Animated Windows
Windows animate into position when they are moved making it easier to see how layout changes happen. Note, multigrid must be enabled for
this to work.
https://github.com/neovide/neovide/wiki/Configuration#multigrid
![Animated Windows](./assets/AnimatedWindows.gif)
### Blurred Floating Windows
The backgrounds of floating windows are blurred improving the visual separation between foreground and background from
built in window transparency. Note, multigrid must be enabled for this to work.
https://github.com/neovide/neovide/wiki/Configuration#multigrid
![Blurred Floating Windows](./assets/BlurredFloatingWindows.png)
### Emoji Support
Font fallback supports rendering of emoji not contained in the configured font.
![Emoji](./assets/Emoji.png)
### WSL Support
Neovide supports displaying a full gui window from inside wsl via the `--wsl` command argument. Communication is passed via standard io into the wsl copy of neovim providing identical experience similar to visual studio code's remote editing https://code.visualstudio.com/docs/remote/remote-overview.
### Remote TCP Support
Neovide supports connecting to a remote instance of Neovim over a TCP socket via the `--remote-tcp` command argument. This would allow you to run Neovim on a remote machine and use the GUI on your local machine, connecting over the network.
Launch Neovim as a TCP server (on port 6666) by running:
```sh
nvim --headless --listen localhost:6666
```
And then connect to it using:
```sh
/path/to/neovide --remote-tcp=localhost:6666
```
By specifying to listen on localhost, you only allow connections from your local computer. If you are actually doing this over a network you will want to use SSH port forwarding for security, and then connect as before.
```sh
ssh -L 6666:localhost:6666 ip.of.other.machine nvim --headless --listen localhost:6666
```
Finally, if you would like to leave the neovim server running, close the neovide application window instead of issuing a `:q` command.
### Some Nonsense ;)
```vim
let g:neovide_cursor_vfx_mode = "railgun"
```
![Railgun](./assets/Railgun.gif)
### More to Come
I've got more ideas for simple unobtrusive improvements. More to come.
## Configuration
Configuration is done almost completely via global neovide variables in your vim config and can be manipulated live at runtime. Details can be found [here](https://github.com/neovide/neovide/wiki/Configuration).
Note: Neovide requires that a font be set in `init.vim` otherwise errors might be encountered.
See [#527](https://github.com/neovide/neovide/issues/527)
## Install
**Note**: Building instructions are somewhat limited at the moment. All the libraries I use are cross platform and should have
support for Windows, Mac, and Linux. On Windows this should be enabled by default if you have a relatively recent system.
**Note**: Neovide requires neovim version 0.6 or greater. See previous releases such as `0.5.0` if your distro is too slow with updating.
### From binary
Building instructions are somewhat limited at the moment. All the libraries I use are cross platform and should have support for Windows, Mac, and Linux. The rendering is based on opengl, so a good gpu driver will be
necessary. On Windows this should be enabled by default if you have a relatively recent system.
Installing should be as simple as downloading the binary, making sure `nvim.exe` with version 0.4 or greater is on your path, and running it. Everything should be self contained.
### Windows
#### Package manager
[Scoop](https://scoop.sh/) has Neovide in the `extras` bucket. Ensure you have the `extras` bucket, and install:
```
$ scoop bucket list
main
extras
$ scoop install neovide
```
#### From source
1. Install the latest version of Rust. I recommend <https://rustup.rs/>
2. Install CMake. I use chocolatey: `choco install cmake --installargs '"ADD_CMAKE_TO_PATH=System"' -y`
3. Install LLVM. I use chocolatey: `choco install llvm -y`
4. Ensure graphics libraries are up to date.
5. Build and install Neovide:
```sh
git clone https://github.com/neovide/neovide
cd neovide
cargo build --release
```
6. Copy `./target/release/neovide.exe` to a known location and enjoy.
### Mac
#### Package manager
Neovide is available as Cask in [Homebrew](https://brew.sh). It can be installed from the command line:
```sh
brew install --cask neovide
```
#### From source
1. Install the latest version of Rust. Using homebrew: `brew install rustup-init`
2. Configure rust by running `rustup-init`
3. Install CMake. Using homebrew: `brew install cmake`
4. `git clone https://github.com/neovide/neovide`
5. `cd neovide`
6. `cargo build --release`
7. Copy `./target/release/neovide` to a known location and enjoy.
8. `cargo install cargo-bundle`
9. `cargo bundle --release`
10. Copy `./target/release/bundle/osx/neovide.app` to `~/Applications` and enjoy.
### Linux
#### Arch Linux
Stable releases are [packaged in the community repository](https://archlinux.org/packages/community/x86_64/neovide).
```sh
pacman -S neovide
```
To run a development version you can build from [the VCS package in the AUR](https://aur.archlinux.org/packages/neovide-git).
This can be built and installed using an AUR helper or [by hand in the usual way](https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages).
To build from a non-default branch you can edit the PKGBUILD and add `#branch-name` to the end of the source URL.
#### With Snap
Neovide is also available in the Snap Store. You can install it
using the command below.
```
snap install neovide
```
[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/neovide)
#### From source
1. Install necessary dependencies (adjust for your preferred package manager)
```sh
sudo apt install -y curl \
gnupg ca-certificates git \
gcc-multilib g++-multilib cmake libssl-dev pkg-config \
libfreetype6-dev libasound2-dev libexpat1-dev libxcb-composite0-dev \
libbz2-dev libsndio-dev freeglut3-dev libxmu-dev libxi-dev libfontconfig1-dev
```
2. Install Rust
```sh
curl --proto '=https' --tlsv1.2 -sSf "https://sh.rustup.rs" | sh
```
3. Clone the repository
```sh
git clone "https://github.com/neovide/neovide"
```
4. Build
```sh
cd neovide && ~/.cargo/bin/cargo build --release
```
5. Copy `./target/release/neovide` to a known location and enjoy.
## Troubleshooting
- Neovide requires that a font be set in `init.vim` otherwise errors might be encountered. This can be fixed by adding `set guifont=Your\ Font\ Name:h15` in init.vim file. Reference issue [#527](https://github.com/neovide/neovide/issues/527).
- If you installed `neovim` via Apple Silicon (M1)-based `brew`, you have to add the `brew prefix` to `$PATH` to run `Neovide.app` in GUI. Please see the [homebrew documentation](https://docs.brew.sh/FAQ#my-mac-apps-dont-find-homebrew-utilities). Reference issue [#1242](https://github.com/neovide/neovide/pull/1242)
### Linux-specific
- If you recieve errors complaining about DRI3 settings, please reference issue [#44](https://github.com/neovide/neovide/issues/44#issuecomment-578618052).
Licensed under [MIT](./LICENSE).

@ -1,6 +0,0 @@
# Zola output
public
# Will be copied during the build process
static/assets
# Most md files are created by RISS on the fly, updated during the build process
content/*.md

@ -0,0 +1,12 @@
{
/* Wrap lines at 100 chars */
"MD013": {
"line_length": 100
},
/* Allow inline-html */
"MD033": false,
/* Allow non-headings at the top of files */
"MD041": false
}

@ -1,16 +0,0 @@
.PHONY: md_update
md_update:
@awk -f ./riss.awk < ../README.md >content/_index.md
.PHONY: content_update
content_update: md_update
@mkdir -p static/assets
@cp -r ../assets static/
.PHONY: all
all: content_update
@zola build
.PHONY: serve
serve: content_update
@zola serve

@ -1,18 +1,86 @@
## Build
# Neovide Documentation
To build neovides website, ensure you have [zola](https://getzola.org/) and `awk` installed.
<img src="docs/assets/neovide-128x128.png" alt="Neovide Logo" align="left"> This folder is the
source of documentation for Neovide, a simple no-nonsense, cross-platform, graphical editor for
Neovim, hosted on [neovide.dev](https://neovide.dev)
Then, in this directory, run:
```sh
git submodule update --init
make serve
```
_Note: If you're looking for the Neovide source code, that can be found
[here](https://github.com/neovide/neovide)_
## Edit
<br><br>
To ease maintenance, markdown files in [`content`](./content/) are often sourced from other parts of the repository, thanks to [RISS](https://cj.rs/riss). RISS allows to change the files slightly, see the [transformation reference](https://cj.rs/readme-in-static-site/#transformations-reference) for the syntax.
<div align="center">
<img src="assets/landing-page.png" alt="Neovide Landing Page">
<em>Screenshot of Landing Page</em>
</div>
For instance, `content/_index.md` is sourced from the [`README`](/README.md). Thus to make changes to `content/_index.md`, edit the [`README`](/README.md) and run:
```
make md_update
```
## Description
- **./docs** is the source directory of the book
- **./docs/SUMMARY.md** configures the order of the menu on the left hand side of the book
([more info here](https://rust-lang.github.io/mdBook/format/summary.html)).
- "Without this file, there is no book."
- **./docs/assets** stores all the non-markdown content (screenshots, gifs) to be used.
- **./theme** stores general files to be used by mdbook to configure the look and feel of the book
([more info here](https://rust-lang.github.io/mdBook/format/theme/index.html)).
### Build
1. Install the latest version of rust on your preferred choice of operating system, we recommend
using [rustup](https://rustup.rs/)
2. Install required cargo packages to build successfully
```sh
cargo install mdbook --version 0.4.21
cargo install mdbook-pagetoc --version 0.1.4 # Table of Contents
cargo install mdbook-linkcheck --version 0.7.6 # Check Links Aren't Broken
```
3. Clone the repository
```shell
git clone https://github.com/neovide/neovide
```
4. Navigate to root directory
```shell
cd neovide/website/
```
5. Build the book and open in default browser
```shell
mdbook build --open
```
**Quick Tip!**
To see the website update in real-time while you edit the content, you can use `mdbook serve --open`
instead of the `build` argument
_Note: When making updates to any **.css/.js** files, a full refresh of the browser is needed. This
can be done by pressing <kbd>Ctrl</kbd>-<kbd>F5</kbd>_
## Contributing
First of all, thank you for your interest in wanting to contribute to the website! The documentation
is very much community-driven so your changes are very much appreciated!
A few things to note:
- This repository makes use of [mdbook](https://rust-lang.github.io/mdBook/index.html), it is
_highly_ recommended to read up on mdbook's documentation before contributing. This will save you
a lot of time debugging if you're messing around with the file structure!
- The markdown is linted to ensure that the style stays consistent, while we are _not_ going to
outright reject any contributions if our CI fails, we very much encourage you to lint before
raising a pull request as this will increase of your chances of getting the changes merged. The
linter we use is [markdownlint](https://github.com/DavidAnson/markdownlint) and any custom rules
that we have defined live in a [.markdownlintrc](.markdownlintrc). To save yourself the trouble of
manually line wrapping, we recommend the usage of
[mdformat](https://github.com/executablebooks/mdformat), the command
`mdformat --wrap 100 --number` will ensure that you are in line with our CI.
Always feel free to ask questions by either joining our [discord](https://discord.gg/SjFpZdQys6) or
raising a GitHub issue!

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

@ -0,0 +1,28 @@
[book]
title = "Neovide"
description = "A Simple, No Nonsense, Cross-Platform, Graphical User Interface for Neovim"
authors = ["sgoudham"]
language = "en"
multilingual = false
src = "docs"
[output.html]
additional-css = [
"theme/pagetoc.css",
"theme/custom.css",
"theme/breakpoints.css"
]
additional-js = [
"theme/pagetoc.js",
"theme/custom.js"
]
default-theme = "ayu"
preferred-dark-theme = "ayu"
git-repository-url = "https://github.com/neovide/neovide"
git-repository-icon = "fa-github"
edit-url-template = "https://github.com/neovide/neovide/edit/main/website/{path}"
cname = "neovide.dev"
[output.linkcheck]
[preprocessor.pagetoc]

@ -1,23 +0,0 @@
# The URL the site will be built for
base_url = "https://neovide.dev"
theme = "juice"
# Whether to automatically compile all Sass files in the sass directory
compile_sass = true
# Whether to build a search index to be used later on by a JavaScript library
build_search_index = false
[markdown]
# Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = true
[extra]
# Put all your custom variables here
juice_logo_name = "Neovide"
juice_logo_path = "assets/neovide.svg"
juice_extra_menu = [
{ title = "Github", link = "https://github.com/neovide/neovide"}
]
repository_url = "https://github.com/neovide/neovide"

@ -0,0 +1,13 @@
# Summary
[Neovide](./index.md)
______________________________________________________________________
- [Features](features.md)
- [Installation](installation.md)
- [Configuration](configuration.md)
- [Command Line Reference](command-line-reference.md)
- [Editing w/ External Tools](editing-with-external-tools.md)
- [Troubleshooting](troubleshooting.md)
- [FAQ](faq.md)

Before

Width:  |  Height:  |  Size: 727 KiB

After

Width:  |  Height:  |  Size: 727 KiB

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Before

Width:  |  Height:  |  Size: 346 KiB

After

Width:  |  Height:  |  Size: 346 KiB

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Before

Width:  |  Height:  |  Size: 2.7 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

Before

Width:  |  Height:  |  Size: 672 KiB

After

Width:  |  Height:  |  Size: 672 KiB

Before

Width:  |  Height:  |  Size: 512 KiB

After

Width:  |  Height:  |  Size: 512 KiB

Before

Width:  |  Height:  |  Size: 562 KiB

After

Width:  |  Height:  |  Size: 562 KiB

Before

Width:  |  Height:  |  Size: 3.5 MiB

After

Width:  |  Height:  |  Size: 3.5 MiB

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

Before

Width:  |  Height:  |  Size: 12 MiB

After

Width:  |  Height:  |  Size: 12 MiB

Before

Width:  |  Height:  |  Size: 303 KiB

After

Width:  |  Height:  |  Size: 303 KiB

Before

Width:  |  Height:  |  Size: 724 KiB

After

Width:  |  Height:  |  Size: 724 KiB

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Before

Width:  |  Height:  |  Size: 426 KiB

After

Width:  |  Height:  |  Size: 426 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

@ -0,0 +1,111 @@
# Command Line Reference
Neovide supports a few command line arguments for effecting things which couldn't be set using
normal vim variables.
## Information
### Version
```sh
--version or -V
```
Prints the current version of neovide.
### Help
```sh
--help or -h
```
Prints details about neovide. This will be a help page eventually.
## Functionality
### Multigrid
```sh
--multigrid or an environment variable declared named "NEOVIDE_MULTIGRID"
```
This enables neovim's multigrid functionality which will also enable floating window blurred
backgrounds and window animations. For now this is disabled due to some mouse input bugs upstream
([neovim/neovim/pull/12667](https://github.com/neovim/neovim/pull/12667),
[neovim/neovim/issues/15075](https://github.com/neovim/neovim/issues/15075)) and some
[floating window transparency issues](https://github.com/neovide/neovide/issues/720).
### Frameless
```sh
--frameless or an environment variable named NEOVIDE_FRAMELESS
```
Neovide without decorations. NOTE: Window cannot be moved nor resized after this.
### Geometry
```sh
--geometry=<width>x<height>
```
Sets the initial neovide window size in characters.
### No Fork
```sh
--nofork
```
By default, neovide detaches itself from the terminal. Instead of spawning a child process and
leaking it, be "blocking" and have the shell directly as parent process.
### No Tabs
```sh
--notabs
```
By default, Neovide opens files given directly to Neovide (not NeoVim through `--`!) in multiple
tabs to avoid confusing new users. The option disables that and makes multiple given files to normal
buffers.
Note: Even if files are opened in tabs, they're buffers anyways. It's just about them being visible
or not.
### WSL
```sh
--wsl
```
Runs neovim from inside wsl rather than as a normal executable.
### Neovim Binary
```sh
--neovim-bin
```
Sets where to find neovim's executable. If unset, neovide will try to find `nvim` on the `PATH`
environment variable instead. If you're running a Unix-alike, be sure that binary has the executable
permission bit set.
### Log File
```sh
--log
```
Enables the log file for debugging purposes. This will write a file next to the executable
containing trace events which may help debug an issue.
### Wayland / X11
```sh
--wayland-app-id <wayland_app_id> or an environment variable called NEOVIDE_APP_ID
--x11-wm-class <x11_wm_class> or an environment variable called NEOVIDE_WM_CLASS
```
On Linux/Unix, this alters the identification of the window to either X11 or the more modern
Wayland, depending on what you are running on.

@ -0,0 +1,320 @@
# Configuration
## Global Vim Settings
Neovide supports settings via global variables with a neovide prefix. They enable configuring many
parts of the editor and support dynamically changing them at runtime.
### Functionality
#### Hello, is this Neovide?
Not really a configuration option, but `g:neovide` only exists and is set to `v:true` if this Neovim
is in Neovide. It's not set else. Useful for configuring things only for Neovide in your `init.vim`:
```lua
if exists("g:neovide")
" Put anything you want to happen only in Neovide here
endif
```
#### Refresh Rate
```vim
let g:neovide_refresh_rate=140
```
Setting `g:neovide_refresh_rate` to a positive integer will set the refresh rate of the app. This is
limited by the refresh rate of your physical hardware, but can be lowered to increase battery life.
#### Transparency
```vim
let g:neovide_transparency=0.8
```
![Transparency](assets/Transparency.png)
Setting `g:neovide_transparency` to a value between 0.0 and 1.0 will set the opacity of the window
to that value.
#### Floating Blur Amount
```vim
let g:neovide_floating_blur_amount_x = 2.0
let g:neovide_floating_blur_amount_y = 2.0
```
**Available since 0.9.**
Setting `g:neovide_floating_blur_amount_x` and `g:neovide_floating_blur_amount_y` controls the blur
radius on the respective axis for floating windows.
#### Scroll Animation Length
```vim
let g:neovide_scroll_animation_length = 0.3
```
Sets how long the scroll animation takes to complete, measured in seconds.
#### No Idle
```vim
let g:neovide_no_idle=v:true
```
Setting `g:neovide_no_idle` to a boolean value will force neovide to redraw all the time. This can
be a quick hack if animations appear to stop too early.
#### Fullscreen
```vim
let g:neovide_fullscreen=v:true
```
Setting `g:neovide_fullscreen` to a boolean value will set whether the app should take up the entire
screen. This uses the so called "windowed fullscreen" mode that is sometimes used in games which
want quick window switching.
#### Remember Previous Window Size
```vim
let g:neovide_remember_window_size = v:true
```
Setting `g:neovide_remember_window_size` to a boolean value will determine whether the window size
from the previous session or the default size will be used on startup. The commandline option
`--geometry` will take priority over this value.
#### Profiler
```vim
let g:neovide_profiler = v:false
```
Setting this to `v:true` enables the profiler, which shows a frametime graph in the upper left
corner.
### Input Settings
#### Use Logo Key
```vim
let g:neovide_input_use_logo=v:true
```
Setting `g:neovide_input_use_logo` to a boolean value will change how logo key (also known as
[super key](<https://en.wikipedia.org/wiki/Super_key_(keyboard_button)>),
[command key](https://en.wikipedia.org/wiki/Command_key) or
[windows key](https://en.wikipedia.org/wiki/Windows_key)) is handled, allowing all key combinations
containing logo to be forwarded to neovim.
#### macOS Alt is Meta
```vim
let g:neovide_input_macos_alt_is_meta=v:false
```
**Unreleased yet.**
Interprets <kbd>Alt</kbd> + <kbd>whatever</kbd> actually as `<M-whatever>`, instead of sending the
actual special character to Neovim.
#### Touch Deadzone
```vim
let g:neovide_touch_deadzone=6.0
```
Setting `g:neovide_touch_deadzone` to a value equal or higher than 0.0 will set how many pixels the
finger must move away from the start position when tapping on the screen for the touch to be
interpreted as a scroll gesture.
If the finger stayed in that area once lifted or the drag timeout happened, however, the touch will
be interpreted as tap gesture and the cursor will move there.
A value lower than 0.0 will cause this feature to be disabled and _all_ touch events will be
interpreted as scroll gesture.
#### Touch Drag Timeout
```vim
let g:neovide_touch_drag_timeout=0.17
```
Setting `g:neovide_touch_drag_timeout` will affect how many seconds the cursor has to stay inside
`g:neovide_touch_deadzone` in order to begin "dragging"
Once started, the finger can be moved to another position in order to form a visual selection. If
this happens too often accidentally to you, set this to a higher value like `0.3` or `0.7`.
### Cursor Settings
#### Animation Length
<p align="center">
<img alt="Short Cursor Animation Length", src="./assets/ShortCursorAnimationLength.gif" width="47%">
&nbsp; &nbsp;
<img alt="Long Cursor Animation Length", src="./assets/LongCursorAnimationLength.gif" width="47%">
</p>
```vim
let g:neovide_cursor_animation_length=0.13
```
Setting `g:neovide_cursor_animation_length` determines the time it takes for the cursor to complete
it's animation in seconds. Set to `0` to disable.
#### Animation Trail Length
<p align="center">
<img alt="Short Cursor Trail Length", src="./assets/ShortCursorTrailLength.gif" width="47%">
&nbsp; &nbsp;
<img alt="Long Cursor Trail Length", src="./assets/LongCursorTrailLength.gif" width="47%">
</p>
```vim
let g:neovide_cursor_trail_length=0.8
```
Setting `g:neovide_cursor_trail_length` determines how much the trail of the cursor lags behind the
front edge.
#### Antialiasing
```vim
let g:neovide_cursor_antialiasing=v:true
```
Enables or disables antialiasing of the cursor quad. Disabling may fix some cursor visual issues.
#### Unfocused Outline Width
```vim
let g:neovide_cursor_unfocused_outline_width=0.125
```
Specify cursor outline width in `em`s. You probably want this to be a positive value less than 0.5.
If the value is \<=0 then the cursor will be invisible. This setting takes effect when the editor
window is unfocused, at which time a block cursor will be rendered as an outline instead of as a
full rectangle.
### Cursor Particles
There are a number of vfx modes you can enable which produce particles behind the cursor. These are
enabled by setting `g:neovide_cursor_vfx_mode` to one of the following constants.
#### None at all
```vim
let g:neovide_cursor_vfx_mode = ""
```
The default, no particles at all.
#### Railgun
<img src="./assets/Railgun.gif" alt="Railgun" width=550>
```vim
let g:neovide_cursor_vfx_mode = "railgun"
```
#### Torpedo
<img src="./assets/Torpedo.gif" alt="Torpedo" width=550>
```vim
let g:neovide_cursor_vfx_mode = "torpedo"
```
#### Pixiedust
<img src="./assets/Pixiedust.gif" alt="Pixiedust" width=550>
```vim
let g:neovide_cursor_vfx_mode = "pixiedust"
```
#### Sonic Boom
<img src="./assets/Sonicboom.gif" alt="Sonicboom" width=550>
```vim
let g:neovide_cursor_vfx_mode = "sonicboom"
```
#### Ripple
<img src="./assets/Ripple.gif" alt="Ripple" width=550>
```vim
let g:neovide_cursor_vfx_mode = "ripple"
```
#### Wireframe
<img src="./assets/Wireframe.gif" alt="Wireframe" width=550>
```vim
let g:neovide_cursor_vfx_mode = "wireframe"
```
### Particle Settings
Options for configuring the particle generation and behavior.
#### Particle Opacity
```vim
let g:neovide_cursor_vfx_opacity=200.0
```
Sets the transparency of the generated particles.
#### Particle Lifetime
```vim
let g:neovide_cursor_vfx_particle_lifetime=1.2
```
Sets the amount of time the generated particles should survive.
#### Particle Density
```vim
let g:neovide_cursor_vfx_particle_density=7.0
```
Sets the number of generated particles.
#### Particle Speed
```vim
let g:neovide_cursor_vfx_particle_speed=10.0
```
Sets the speed of particle movement.
#### Particle Phase
```vim
let g:neovide_cursor_vfx_particle_phase=1.5
```
Only for the `railgun` vfx mode.
Sets the mass movement of particles, or how individual each one acts. The higher the value, the less
particles rotate in accordance to each other, the lower, the more line-wise all particles become.
#### Particle Curl
```vim
let g:neovide_cursor_vfx_particle_curl=1.0
```
Only for the `railgun` vfx mode.
Sets the velocity rotation speed of particles. The higher, the less particles actually move and look
more "nervous", the lower, the more it looks like a collapsing sine wave.

@ -0,0 +1,18 @@
# Editing w/ External Tools
You can use Neovide in other programs as editor, this page aims to document some quirks. Support for
that, however, is only possible as far as reasonably debuggable.
_Note: We do not endorse nor disrecommend usage of all programs listed here. All usage happens on
your own responsibility._
## [jrnl](https://github.com/jrnl-org/jrnl)
In your configuration file:
```yaml
editor: "neovide --nofork"
```
...as `jrnl` saves & removes the temporary file as soon as the main process exits, which happens
before startup by [forking](<https://en.wikipedia.org/wiki/Fork_(system_call)>).

@ -0,0 +1,61 @@
# Frequently Asked Questions
Commonly asked questions, or just explanations/elaborations on stuff.
## How Can I Set The Font/Scale The UI Size?
This is handled through the `guifont` option, settable through Neovim. It's technically documented
in `:h guifont` (type this in Neovim), though some things are misleading there, so here we do what's
discouraged and try to document it ourselves:
- The basic format is `IBM_Plex_Mono,Hack,Noto_Color_Emoji:option1:option2`. You can use arbitrarily
many "font fallbacks" (`Hack` and `Noto_Color_Emoji` "help out" if `IBM_Plex_Mono` doesn't define
a character), and arbitrarily many options. Though please note that _first_ all fonts are defined,
_then_ all options, the options apply "globally".
- Use `:set guifont=*` to open up a window showing what fonts are accessible by Neovide, hit `Enter`
on one to apply it **temporarily**.
- Spaces in the font name are a bit difficult to write, either use underscores (`_`) or escape them
(`\`).
- The font options Neovide supports at the moment are:
- `hXX` — Set the font size to `XX`, can be any (even non-two-digit) number or even a floating
point number.
- `b` — Sets the font **bold**.
- `i` — Sets the font _italic_.
By the way, the default font used is Fira Code at size 14.
## How Can I Dynamically Change The Font Size At Runtime?
Not directly in Neovide, but configurable if you want so. A way to accomplish that in Lua would be:
```lua
vim.g.gui_font_default_size = 12
vim.g.gui_font_size = vim.g.gui_font_default_size
vim.g.gui_font_face = "Fira Code Retina"
RefreshGuiFont = function()
vim.opt.guifont = string.format("%s:h%s",vim.g.gui_font_face, vim.g.gui_font_size)
end
ResizeGuiFont = function(delta)
vim.g.gui_font_size = vim.g.gui_font_size + delta
RefreshGuiFont()
end
ResetGuiFont = function()
vim.g.gui_font_size = vim.g.gui_font_default_size
RefreshGuiFont()
end
-- Call function on startup to set default value
ResetGuiFont()
-- Keymaps
local opts = { noremap = true, silent = true }
vim.keymap.set({'n', 'i'}, "<C-+>", function() ResizeGuiFont(1) end, opts)
vim.keymap.set({'n', 'i'}, "<C-->", function() ResizeGuiFont(-1) end, opts)
```
Credits to [0x0013 here](https://github.com/neovide/neovide/issues/1301#issuecomment-1119370546).

@ -0,0 +1,113 @@
# Features
This should be a standard, fully-featured Neovim GUI. Beyond that there are some visual niceties
listed below :)
## Ligatures
Supports ligatures and font shaping.
<img src="./assets/Ligatures.png" alt="Ligatures" width=550>
## Animated Cursor
Cursor animates into position with a smear effect to improve tracking of cursor position.
<img src="./assets/AnimatedCursor.gif" alt="Animated Cursor" width=550>
## Smooth Scrolling
Scroll operations on buffers in neovim will be animated smoothly pixel wise rather than line by line
at a time.
Note: [multigrid](command-line-reference.md#multigrid) must be enabled for this to work.
<img src="./assets/SmoothScrolling.gif" alt="Smooth Scrolling" width=550>
## Animated Windows
Windows animate into position when they are moved making it easier to see how layout changes happen.
Note: [multigrid](command-line-reference.md#multigrid) must be enabled for this to work.
<img src="./assets/AnimatedWindows.gif" alt="Animated Windows" width=550>
## Blurred Floating Windows
The backgrounds of floating windows are blurred improving the visual separation between foreground
and background from built in window transparency.
Note: [multigrid](command-line-reference.md#multigrid) must be enabled for this to work.
<img src="./assets/BlurredFloatingWindows.png" alt="Blurred Floating Windows" width=550>
## Emoji Support
Font fallback supports rendering of emoji not contained in the configured font.
<img src="./assets/Emoji.png" alt="Emojis" width=550>
## WSL Support
Neovide supports displaying a full gui window from inside wsl via the `--wsl` command argument.
Communication is passed via standard io into the wsl copy of neovim providing identical experience
similar to Visual Studio Code's
[Remote Editing](https://code.visualstudio.com/docs/remote/remote-overview).
## Remote TCP Support
Neovide supports connecting to a remote instance of Neovim over a TCP socket via the `--remote-tcp`
command argument. This would allow you to run Neovim on a remote machine and use the GUI on your
local machine, connecting over the network.
Launch Neovim as a TCP server (on port 6666) by running:
```sh
nvim --headless --listen localhost:6666
```
And then connect to it using:
```sh
/path/to/neovide --remote-tcp=localhost:6666
```
By specifying to listen on localhost, you only allow connections from your local computer. If you
are actually doing this over a network you will want to use SSH port forwarding for security, and
then connect as before.
```sh
ssh -L 6666:localhost:6666 ip.of.other.machine nvim --headless --listen localhost:6666
```
Finally, if you would like to leave the neovim server running, close the neovide application window
instead of issuing a `:q` command.
## Some Nonsense ;)
To learn how to configure the following, head on over to the
[configuration](./configuration.md#cursor-particles) section!
### Railgun
<img src="./assets/Railgun.gif" alt="Railgun" width=550>
### Torpedo
<img src="./assets/Torpedo.gif" alt="Torpedo" width=550>
### Pixiedust
<img src="./assets/Pixiedust.gif" alt="Pixiedust" width=550>
### Sonic Boom
<img src="./assets/Sonicboom.gif" alt="Sonicboom" width=550>
### Ripple
<img src="./assets/Ripple.gif" alt="Ripple" width=550>
### Wireframe
<img src="./assets/Wireframe.gif" alt="Wireframe" width=550>

@ -0,0 +1,65 @@
<div class="show-mobile">
<h1>
<img class="logo" src="assets/neovide-128x128.png" alt="Neovide Logo">
Neovide
</h1>
<a href="https://discord.gg/SjFpZdQys6">
<img src="https://badgen.net/badge/icon/discord?icon=discord&label" alt="Discord">
</a>
<a href="https://matrix.to/#/#neovide_community:gitter.im">
<img src="https://matrix.to/img/matrix-badge.svg" alt="Chat On Matrix">
</a>
<a href="https://github.com/neovide/neovide/discussions">
<img src="https://img.shields.io/badge/GitHub-Discussions-green?logo=github" alt="Discussions">
</a>
</div>
<div class="hide-mobile">
<h1>Neovide
<a href="https://discord.gg/SjFpZdQys6">
<img src="https://badgen.net/badge/icon/discord?icon=discord&label" alt="Discord">
</a>
<a href="https://matrix.to/#/#neovide_community:gitter.im">
<img src="https://matrix.to/img/matrix-badge.svg" alt="Chat On Matrix">
</a>
<a href="https://github.com/neovide/neovide/discussions">
<img src="https://img.shields.io/badge/GitHub-Discussions-green?logo=github" alt="Discussions">
</a>
</h1>
</div>
<div class="hide-mobile">
<img class="logo" src="assets/neovide-128x128.png" alt="Neovide Logo">
</div>
This is a simple, no-nonsense, cross-platform graphical user interface for
[Neovim](https://github.com/neovim/neovim) (an aggressively refactored and updated Vim editor).
Where possible there are some graphical improvements, but functionally it should act like the
terminal UI.
<div class="hide-mobile">
<a href="https://github.com/neovide/neovide/releases/latest/download/Neovide.dmg.zip">
<button class="button-hover color">Download for macOS</button>
</a>
<a href="https://github.com/neovide/neovide/releases/latest/download/neovide-windows.zip">
<button class="button-hover color">Download for Windows</button>
</a>
<a href="https://github.com/neovide/neovide/releases/latest/download/neovide.tar.gz">
<button class="button-hover color">Download for Linux</button>
</a>
</div>
If you're looking for the Neovide source code, that can be found
[here](https://github.com/neovide/neovide). To search within the docs, you can simply press `s` or
click the magnifying glass icon in the top left to bring up the search bar.
Installing through a package manager or building from source? [no problem!](installation.md)
Want to see a list of all the available features? [here you go!](features.md)
Looking to configure your neovide? [we've got you covered!](configuration.md)
<div class="center">
<img class="screenshot" src="assets/BasicScreenCap.png" alt="Screenshot of Neovide">
<p class="text" ><em>Screenshot of Neovide running on Windows<em></p>
</div>

@ -0,0 +1,142 @@
# Installation
**Note**: Neovide requires neovim version `0.6` _or greater_. See previous releases such as `0.5.0`
if your distro is too slow with updating or you need to rely on older neovim versions.
Building instructions are somewhat limited at the moment. All the libraries Neovide uses are cross
platform and should have support for Windows, Mac, and Linux. The rendering is based on OpenGL, so a
good GPU driver will be necessary, the default drivers provided by virtual machines might not be
enough. On Windows this should be enabled by default if you have a relatively recent system.
## Binaries
Installing should be as simple as downloading the binary, making sure the `nvim` executable with
version 0.6 or greater is on your `PATH` environment variable, and running it. Everything should be
self contained.
The binaries are to be found on
[the release page](https://github.com/neovide/neovide/releases/latest).
## Windows
### Scoop
[Scoop](https://scoop.sh/) has Neovide in the `extras` bucket. Ensure you have the `extras` bucket,
and install:
```sh
$ scoop bucket list
main
extras
$ scoop install neovide
```
### Windows Source
1. Install the latest version of Rust. I recommend <https://rustup.rs/>
2. Install CMake. I use chocolatey:
`choco install cmake --installargs '"ADD_CMAKE_TO_PATH=System"' -y`
3. Install LLVM. I use chocolatey: `choco install llvm -y`
4. Ensure graphics libraries are up to date.
5. Build and install Neovide:
```sh
cargo install --git https://github.com/neovide/neovide.git
```
The resulting binary can be found inside of `~/.cargo/bin` afterwards (99% of the time).
## Mac
### Homebrew
Neovide is available as Cask in [Homebrew](https://brew.sh). It can be installed from the command
line:
```sh
brew install --cask neovide
```
### Mac Source
1. Install the latest version of Rust. Using homebrew: `brew install rustup-init`
2. Configure rust by running `rustup-init`
3. Install CMake. Using homebrew: `brew install cmake`
4. `git clone https://github.com/neovide/neovide`
5. `cd neovide`
6. `cargo install --path .`
The resulting binary is to be found under `~/.cargo/bin`. In case you want a nice application
bundle:
7. `cargo install cargo-bundle`
8. `cargo bundle --release`
9. Copy `./target/release/bundle/osx/neovide.app` to `~/Applications` and enjoy.
## Linux
### Arch Linux
Stable releases are
[packaged in the community repository](https://archlinux.org/packages/community/x86_64/neovide).
```sh
pacman -S neovide
```
To run a development version you can build from
[the VCS package in the AUR](https://aur.archlinux.org/packages/neovide-git). This can be built and
installed using an AUR helper or
[by hand in the usual way](https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages).
To build from a non-default branch you can edit the PKGBUILD and add `#branch-name` to the end of
the source URL.
### Snap
Neovide is also available in the Snap Store. You can install it using the command below.
```sh
snap install neovide
```
[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/neovide)
### Linux Source
1. Install necessary dependencies (adjust for your preferred package manager, probably most of this
stuff is already installed, just try building and see)
```sh
sudo apt install -y curl \
gnupg ca-certificates git \
gcc-multilib g++-multilib cmake libssl-dev pkg-config \
libfreetype6-dev libasound2-dev libexpat1-dev libxcb-composite0-dev \
libbz2-dev libsndio-dev freeglut3-dev libxmu-dev libxi-dev libfontconfig1-dev
```
2. Install Rust
```sh
curl --proto '=https' --tlsv1.2 -sSf "https://sh.rustup.rs" | sh
```
3. Fetch and build
```sh
cargo install --git https://github.com/neovide/neovide
```
The resulting binary can be found inside of `~/.cargo/bin` afterwards, you might want to add this
to your `PATH` environment variable.

@ -0,0 +1,14 @@
# Troubleshooting
- Neovide requires that a font be set in `init.vim` otherwise errors might be encountered. This can
be fixed by adding `set guifont=Your\ Font\ Name:h15` in init.vim file. Reference issue
[#527](https://github.com/neovide/neovide/issues/527).
- If you installed `neovim` via Apple Silicon (M1)-based `brew`, you have to add the `brew prefix`
to `$PATH` to run `Neovide.app` in GUI. Please see the
[homebrew documentation](https://docs.brew.sh/FAQ#my-mac-apps-dont-find-homebrew-utilities).
Reference issue [#1242](https://github.com/neovide/neovide/pull/1242)
## Linux
- If you recieve errors complaining about DRI3 settings, please reference issue
[#44](https://github.com/neovide/neovide/issues/44#issuecomment-578618052).

@ -1,41 +0,0 @@
#!/usr/bin/awk -f
#
# Copyright 2021 Clément Joly
# https://cj.rs/riss
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Divide the input file into these types of sections:
# * inserting: the current line is copied to the output, verbatim
# * removing: the line is not copied to the output
# To distinguish between these sections, the script interprets special
# comments. These comments are removed from the output.
BEGIN {
# Section identifier
removing = 0
}
/^<!--+ remove -+->$/ {
removing = 1
next
}
/^<!--+ end_remove -+->$|^<!--+ insert$|^end_insert -+->$/ {
removing = 0
next
}
! removing {
print $0
}

@ -1 +0,0 @@
neovide.dev

@ -1,15 +0,0 @@
<style>
:root {
/* Primary theme color */
--primary-color: #FED43F;
/* Primary theme text color */
--primary-text-color: #543631;
/* Primary theme link color */
--primary-link-color: #F9BB2D;
/* Secondary color: the background body color */
--secondary-color: #fcfaf6;
--secondary-text-color: #303030;
/* Highlight text color of table of content */
--toc-highlight-text-color: #d46e13;
}
</style>

@ -1,32 +0,0 @@
{% extends "juice/templates/index.html" %}
{% block hero %}
<section class="text-center">
<h1 class="heading-text" style="font-size: 50px">
No Nonsense Neovim Client in Rust
</h1>
<div>
<img src="https://badgen.net/badge/icon/discord?icon=discord&amp;label" alt="Discord"></a> <a href="https://matrix.to/#/#neovide_community:gitter.im"><img src="https://matrix.to/img/matrix-badge.svg" alt="Chat on Matrix"></a> <a href="https://github.com/neovide/neovide/discussions"><img src="https://img.shields.io/badge/GitHub-Discussions-green?logo=github" alt="Discussions"></a>
</div>
</section>
<img class="hero-image" style="width: 50%" src="{{ get_url(path="assets/neovide.svg") }}">
<div class="explore-more text"
onclick="document.getElementById('features').scrollIntoView({behavior: 'smooth'})">
Explore More ⇩
</div>
<style>
.hero section {
padding: 0 5rem;
}
@media screen and (max-width: 768px) {
.hero section {
padding: 0 2rem;
}
.hero-image {
display: none
}
}
</style>
{% endblock hero %}

@ -0,0 +1,67 @@
/* Mobile Devices: Extremely Small Screen Devices (480px & Below) */
@media only screen and (max-width: 480px) {
.show-mobile {
display: block;
}
.show-mobile .logo {
width: 23px;
}
.hide-mobile {
display: none;
}
}
/* iPads, Tablets: Small Screen Devices (Between 481px & 768px) */
@media only screen and (min-width: 480px) and (max-width: 768px) {
.show-mobile {
display: block;
}
.show-mobile .logo {
width: 23px;
}
.hide-mobile {
display: none;
}
}
/* Laptops: Medium Screens (Between 769px & 1024px) */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
.show-mobile {
display: none;
}
.hide-mobile {
display: block;
}
.hide-mobile .logo {
float: left;
padding-right: 15px
}
}
/* Desktops: Large Screens (Between 1025px & 1200px) */
@media only screen and (min-width: 1025px) and (max-width: 1200px) {
.show-mobile {
display: none;
}
.hide-mobile {
display: block;
}
.hide-mobile .logo {
float: left;
padding-right: 15px
}
}
/* Extra big screen devices (1201px & Above) */
@media only screen and (min-width: 1201px) {
.show-mobile {
display: none;
}
.hide-mobile {
display: block;
}
.hide-mobile .logo {
float: left;
padding-right: 15px
}
}

@ -0,0 +1,58 @@
/* Center Elements */
div.center .screenshot {
display: block;
margin-top: 5px;
margin-left: auto;
margin-right: auto;
margin-bottom: 5px;
width: 90%;
border-radius: 10px;
}
div.center .text {
text-align: center
}
/* https://codepen.io/JavaScriptJunkie/pen/pPRooV */
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.button-hover {
width: 190px;
font-size: 13px;
font-family: inherit;
font-weight: 650;
color: #fff;
cursor: pointer;
margin: 2px 2px;
height: 30px;
text-align:center;
border: none;
background-size: 300% 100%;
border-radius: 20px;
moz-transition: all .4s ease-in-out;
-o-transition: all .4s ease-in-out;
-webkit-transition: all .4s ease-in-out;
transition: all .4s ease-in-out;
}
.button-hover:hover {
background-position: 100% 0;
moz-transition: all .4s ease-in-out;
-o-transition: all .4s ease-in-out;
-webkit-transition: all .4s ease-in-out;
transition: all .4s ease-in-out;
text-decoration: underline;
}
.button-hover:focus {
outline: none;
}
.button-hover.color {
background-image: linear-gradient(to right, #fc6076, #ff9a44, #ef9d43, #e75516);
}

@ -0,0 +1,7 @@
// Open all external links in new tabs
Array.prototype.forEach.call(document.links, function(link) {
if (link.hostname != window.location.hostname) {
link.target = '_blank';
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
x="0px"
y="0px"
width="256"
height="256"
viewBox="0 0 256 256.00001"
version="1.1"
id="svg436">
<metadata
id="metadata442">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs440">
<linearGradient
x1="49.021549"
y1="-0.079835393"
x2="49.021549"
y2="97.845657"
id="linearGradient-1"
gradientTransform="matrix(0.49500848,0,0,2.3234666,34.367657,9.4880553)"
gradientUnits="userSpaceOnUse">
<stop
stop-color="#16B0ED"
stop-opacity="0.800235524"
offset="0%"
id="stop197" />
<stop
stop-color="#0F59B2"
stop-opacity="0.83700023"
offset="100%"
id="stop199" />
</linearGradient>
<linearGradient
x1="326.17365"
y1="-0.069164939"
x2="326.17365"
y2="98.851547"
id="linearGradient-2"
gradientTransform="matrix(-0.50009738,0,0,2.2998234,360.41234,9.4880553)"
gradientUnits="userSpaceOnUse">
<stop
stop-color="#7DB643"
offset="0%"
id="stop202" />
<stop
stop-color="#367533"
offset="100%"
id="stop204" />
</linearGradient>
<linearGradient
x1="103.88479"
y1="-0.11508822"
x2="103.88479"
y2="178.55785"
id="linearGradient-3"
gradientTransform="matrix(0.90309898,0,0,1.2735433,34.367657,9.4880553)"
gradientUnits="userSpaceOnUse">
<stop
stop-color="#88C649"
stop-opacity="0.8"
offset="0%"
id="stop207" />
<stop
stop-color="#439240"
stop-opacity="0.84"
offset="100%"
id="stop209" />
</linearGradient>
</defs>
<path
id="path434"
style="opacity:1;fill:#1a1a1a;fill-opacity:1;stroke-width:2.44834"
d="m 128.00953,0 c -1.23772,0 -2.47582,0.5458718 -3.14671,1.6353058 l -6.66166,10.7585922 -3.13714,0.306022 -8.62716,-9.2523891 C 104.68863,1.5771234 101.15915,2.2721764 100.263,4.6811826 L 95.844214,16.501288 92.79793,17.424136 82.5496,10.050915 C 80.468371,8.5477344 77.140969,9.9343306 76.72962,12.46084 l -2.032449,12.465622 -2.797608,1.501421 -11.491712,-5.240629 c -2.335875,-1.067406 -5.334488,0.939333 -5.236548,3.500127 L 55.61127,37.334704 53.181894,39.328629 40.867638,36.4262 c -2.502369,-0.582666 -5.044685,1.954419 -4.457042,4.456449 l 2.902817,12.317392 -1.994191,2.424268 -12.649013,-0.439908 c -2.551342,-0.07344 -4.563244,2.895391 -3.500596,5.235848 l 5.241331,11.494959 -1.501624,2.797234 -12.462504,2.027396 c -2.5317515,0.411294 -3.9038394,3.738252 -2.410247,5.819203 l 7.374206,10.237398 -0.927753,3.050659 -11.8216851,4.422972 c -2.3995342,0.89604 -3.0998065,4.42015 -1.2242521,6.17304 l 9.2488422,8.626 -0.306063,3.13195 -10.7600286,6.66076 c -1.43423441,0.88621 -1.90746247,2.74036 -1.45379942,4.29388 H 34.320759 c -0.08286,-4.01467 0.09103,-8.03393 0.526046,-12.04006 l 16.388721,-7.28237 c 3.501359,-1.5546 5.084092,-5.65809 3.529289,-9.16632 l -1.133391,-2.562941 h 0.01445 L 46.199935,81.349296 c 3.674449,-6.542835 8.114221,-12.639009 13.256354,-18.136594 l 0.06694,0.06216 C 73.117902,48.700827 91.008237,38.81379 110.62619,35.106478 l 11.71648,12.293483 c 2.64928,2.773785 7.03665,2.876089 9.80836,0.224743 l 13.11289,-12.537346 c 27.05125,5.066539 50.5064,21.769043 64.13934,45.673807 L 200.427,101.03035 c -1.5499,3.50824 0.0304,7.61173 3.52929,9.16632 l 17.283,7.67446 c 0.30792,3.09848 0.46112,6.21038 0.45909,9.32412 h 0.0956 c 2e-5,0.65521 -0.0294,1.30658 -0.043,1.96045 h 34.08298 c 0.45368,-1.55351 -0.0196,-3.40767 -1.4538,-4.29387 l -10.75523,-6.66077 -0.30606,-3.13194 9.24406,-8.626 c 1.88045,-1.7529 1.17538,-5.27701 -1.22905,-6.17304 l -11.8121,-4.422977 -0.93254,-3.050659 7.37419,-10.237398 c 1.50338,-2.080951 0.12144,-5.403013 -2.41024,-5.819203 l -12.45772,-2.027397 -1.50163,-2.797233 5.23655,-11.494959 c 1.07245,-2.340457 -0.9152,-5.333773 -3.49103,-5.235848 l -12.6538,0.439908 -1.99419,-2.424268 2.9076,-12.317392 c 0.58764,-2.502035 -1.95467,-5.044012 -4.45704,-4.456449 l -12.31904,2.902429 -2.42937,-1.993925 0.44474,-12.647323 c 0.0979,-2.560794 -2.90067,-4.562636 -5.23654,-3.500127 l -11.49171,5.240629 -2.79761,-1.501421 -2.03245,-12.465622 C 178.8686,9.9343208 175.5412,8.552643 173.45997,10.05092 l -10.24363,7.373216 -3.04628,-0.922848 -4.41879,-11.8201054 C 154.85512,2.2721764 151.32086,1.5771234 149.57262,3.4475309 L 140.95025,12.69992 137.81789,12.393898 131.15624,1.6353058 C 130.4829,0.54586691 129.24724,0 128.00953,0 Z m -0.38258,22.554791 c 4.19241,0.01395 7.58386,3.41564 7.58462,7.607517 0,10.146542 -15.22185,10.146542 -15.22185,0 7.6e-4,-4.212419 3.42427,-7.622615 7.63723,-7.607517 z M 36.840997,91.443246 c 4.196149,0.01126 7.591277,3.416698 7.589408,7.612301 0,10.146543 -15.221854,10.146543 -15.221854,0 -0.0019,-4.212412 3.419488,-7.624752 7.632446,-7.612301 z m 181.567113,0.358621 c 4.19243,0.01395 7.58387,3.415641 7.58463,7.60752 0,10.146553 -15.22185,10.146553 -15.22185,0 7.5e-4,-4.212419 3.42428,-7.622618 7.63722,-7.60752 z" />
<path
d="M 34.39677,58.236531 82.870719,9.302562 V 236.88696 L 34.39677,188.51815 Z"
id="Left---green"
fill="url(#linearGradient-1)"
sketch:type="MSShapeGroup"
style="fill:url(#linearGradient-1);stroke-width:1.07244" />
<path
d="M 221.69673,58.610128 172.55877,9.2405879 173.5548,236.82916 222.02875,188.46037 Z"
id="Right---blue"
fill="url(#linearGradient-2)"
sketch:type="MSShapeGroup"
style="fill:url(#linearGradient-2);stroke-width:1.07244" />
<path
d="M 82.838401,9.3414878 208.86559,201.62861 173.59939,236.88922 47.506234,45.027731 Z"
id="Cross---blue"
fill="url(#linearGradient-3)"
sketch:type="MSShapeGroup"
style="fill:url(#linearGradient-3);stroke-width:1.07244" />
<path
d="m 82.881769,98.529378 -0.06706,7.573632 -38.911476,-57.438942 3.602976,-3.669847 z"
id="Shadow"
fill-opacity="0.13"
fill="#000000"
sketch:type="MSShapeGroup"
style="stroke-width:1.07244" />
<path
id="path849"
style="opacity:1;fill:#1a1a1a;fill-opacity:1;stroke-width:2.44834"
d="m 0.00822228,128.23763 c 0.06381047,1.15772 0.5900871,2.28788 1.61161312,2.91677 l 10.7600286,6.66077 0.306063,3.13194 -9.2488422,8.626 c -1.8755544,1.748 -1.1752821,5.27211 1.2242521,6.17304 l 11.8216851,4.4182 0.927753,3.05066 -7.374206,10.24218 c -1.4984845,2.08584 -0.1215167,5.40802 2.410247,5.81442 l 12.462504,2.02739 1.501624,2.80202 -5.241331,11.49018 c -1.067543,2.33556 0.949256,5.33867 3.500596,5.23584 l 12.644231,-0.4399 1.998973,2.42905 -2.902817,12.32217 c -0.587641,2.49714 1.954671,5.02967 4.457042,4.4421 l 12.314256,-2.89764 2.429376,1.98914 -0.439967,12.6521 c -0.09794,2.56082 2.900675,4.56277 5.236548,3.49535 l 11.491712,-5.23585 2.797608,1.50142 2.032449,12.45606 c 0.411349,2.5363 3.738751,3.90809 5.81998,2.4147 l 10.243548,-7.37799 3.051066,0.92764 4.418786,11.81531 c 0.89615,2.39921 4.42563,3.10429 6.17386,1.22409 l 8.62716,-9.24282 3.13714,0.3108 6.65687,10.75858 c 1.34179,2.16908 4.95153,2.17398 6.29821,0 l 6.65687,-10.75858 3.13714,-0.3108 8.62237,9.24282 c 1.74824,1.8802 5.27772,1.17512 6.17387,-1.22409 l 4.41878,-11.81531 3.05107,-0.92764 10.24355,7.37799 c 2.08122,1.49339 5.40384,0.11678 5.81519,-2.4147 l 2.03245,-12.45606 2.8024,-1.50142 11.49171,5.23585 c 2.33587,1.06742 5.32959,-0.92958 5.23654,-3.49535 l -0.44475,-12.6521 2.42938,-1.98914 12.31904,2.89764 c 2.50237,0.58757 5.03988,-1.94496 4.45226,-4.4421 l -2.90282,-12.32217 1.99419,-2.42905 12.64902,0.4399 c 2.55134,0.10283 4.56826,-2.90028 3.49581,-5.23584 l -5.23655,-11.49018 1.49684,-2.80202 12.45773,-2.02739 c 2.53666,-0.4064 3.9184,-3.72858 2.41502,-5.81442 l -7.37419,-10.24218 0.92296,-3.05066 11.82168,-4.4182 c 2.40443,-0.90093 3.10471,-4.42504 1.22426,-6.17304 l -9.23927,-8.626 0.30606,-3.13194 10.75524,-6.66077 c 1.02154,-0.62889 1.54782,-1.75905 1.61163,-2.91677 h -34.22169 c -0.23905,21.49027 -7.84793,42.2603 -21.60136,58.81364 l -0.0335,-0.0287 c -1.69183,2.01195 -3.46762,3.95181 -5.32263,5.81442 l -16.097,-3.46187 c -3.74866,-0.80301 -7.43669,1.58076 -8.2398,5.33626 l -3.81622,17.82579 c -24.85712,11.25919 -53.38847,11.12301 -78.136936,-0.37296 l -3.816225,-17.8258 c -0.803109,-3.7506 -4.488796,-6.13693 -8.235008,-5.33147 l -15.738304,3.3758 c -2.418569,-2.49028 -4.696831,-5.11304 -6.824254,-7.85616 l -0.07652,0.0574 C 45.774957,174.19336 39.995633,162.22571 36.869691,149.45836 l 0.09564,-0.024 c -1.696247,-6.95139 -2.567307,-14.06598 -2.644577,-21.19682 z M 71.244395,198.66576 h 0.0049 c 4.194281,0.014 7.586507,3.41855 7.584624,7.6123 0,10.14655 -15.221854,10.14655 -15.221854,0 -0.0019,-4.21241 3.419483,-7.62475 7.632446,-7.6123 z m 112.760325,0.35862 c 4.19241,0.0147 7.58386,3.41566 7.58462,7.60752 0,10.14655 -15.22185,10.14655 -15.22185,0 7.5e-4,-4.21241 3.42427,-7.62262 7.63723,-7.60752 z" />
</svg>

After

Width:  |  Height:  |  Size: 9.2 KiB

@ -0,0 +1,314 @@
<!DOCTYPE HTML>
<html lang="{{ language }}" class="sidebar-visible no-js {{ default_theme }}">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>{{ title }}</title>
{{#if is_print }}
<meta name="robots" content="noindex" />
{{/if}}
{{#if base_url}}
<base href="{{ base_url }}">
{{/if}}
<!-- Custom HTML head -->
{{> head}}
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="{{ description }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
{{#if favicon_svg}}
<link rel="icon" href="{{ path_to_root }}favicon.svg">
{{/if}}
{{#if favicon_png}}
<link rel="shortcut icon" href="{{ path_to_root }}favicon.png">
{{/if}}
<link rel="stylesheet" href="{{ path_to_root }}css/variables.css">
<link rel="stylesheet" href="{{ path_to_root }}css/general.css">
<link rel="stylesheet" href="{{ path_to_root }}css/chrome.css">
{{#if print_enable}}
<link rel="stylesheet" href="{{ path_to_root }}css/print.css" media="print">
{{/if}}
<!-- Fonts -->
<link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css">
{{#if copy_fonts}}
<link rel="stylesheet" href="{{ path_to_root }}fonts/fonts.css">
{{/if}}
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="{{ path_to_root }}highlight.css">
<link rel="stylesheet" href="{{ path_to_root }}tomorrow-night.css">
<link rel="stylesheet" href="{{ path_to_root }}ayu-highlight.css">
<!-- Custom theme stylesheets -->
{{#each additional_css}}
<link rel="stylesheet" href="{{ ../path_to_root }}{{ this }}">
{{/each}}
{{#if mathjax_support}}
<!-- MathJax -->
<script async type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
{{/if}}
</head>
<body>
<!-- Provide site root to javascript -->
<script type="text/javascript">
var path_to_root = "{{ path_to_root }}";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('no-js')
html.classList.remove('{{ default_theme }}')
html.classList.add(theme);
html.classList.add('js');
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
{{#toc}}{{/toc}}
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
{{> header}}
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">{{ theme_option "Light" }}</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">{{ theme_option "Rust" }}</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">{{ theme_option "Coal" }}</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">{{ theme_option "Navy" }}</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">{{ theme_option "Ayu" }}</button></li>
</ul>
{{#if search_enabled}}
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
{{/if}}
</div>
<h1 class="menu-title">{{ book_title }}</h1>
<div class="right-buttons">
{{#if print_enable}}
<a href="{{ path_to_root }}print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
{{/if}}
{{#if git_repository_url}}
<a href="{{git_repository_url}}" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa {{git_repository_icon}}"></i>
</a>
{{/if}}
{{#if git_repository_edit_url}}
<a href="{{git_repository_edit_url}}" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
{{/if}}
</div>
</div>
{{#if search_enabled}}
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
{{/if}}
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main><div class="sidetoc"><nav class="pagetoc"></nav></div>
{{{ content }}}
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
{{#previous}}
<a rel="prev" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
{{/previous}}
{{#next}}
<a rel="next" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
{{/next}}
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
{{#previous}}
<a rel="prev" href="{{ path_to_root }}{{link}}" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
{{/previous}}
{{#next}}
<a rel="next" href="{{ path_to_root }}{{link}}" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
{{/next}}
</nav>
</div>
{{#if live_reload_endpoint}}
<!-- Livereload script (if served using the cli tool) -->
<script type="text/javascript">
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
const wsAddress = wsProtocol + "//" + location.host + "/" + "{{{live_reload_endpoint}}}";
const socket = new WebSocket(wsAddress);
socket.onmessage = function (event) {
if (event.data === "reload") {
socket.close();
location.reload();
}
};
window.onbeforeunload = function() {
socket.close();
}
</script>
{{/if}}
{{#if google_analytics}}
<!-- Google Analytics Tag -->
<script type="text/javascript">
var localAddrs = ["localhost", "127.0.0.1", ""];
// make sure we don't activate google analytics if the developer is
// inspecting the book locally...
if (localAddrs.indexOf(document.location.hostname) === -1) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{google_analytics}}', 'auto');
ga('send', 'pageview');
}
</script>
{{/if}}
{{#if playground_line_numbers}}
<script type="text/javascript">
window.playground_line_numbers = true;
</script>
{{/if}}
{{#if playground_copyable}}
<script type="text/javascript">
window.playground_copyable = true;
</script>
{{/if}}
{{#if playground_js}}
<script src="{{ path_to_root }}ace.js" type="text/javascript" charset="utf-8"></script>
<script src="{{ path_to_root }}editor.js" type="text/javascript" charset="utf-8"></script>
<script src="{{ path_to_root }}mode-rust.js" type="text/javascript" charset="utf-8"></script>
<script src="{{ path_to_root }}theme-dawn.js" type="text/javascript" charset="utf-8"></script>
<script src="{{ path_to_root }}theme-tomorrow_night.js" type="text/javascript" charset="utf-8"></script>
{{/if}}
{{#if search_js}}
<script src="{{ path_to_root }}elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="{{ path_to_root }}mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="{{ path_to_root }}searcher.js" type="text/javascript" charset="utf-8"></script>
{{/if}}
<script src="{{ path_to_root }}clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="{{ path_to_root }}highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="{{ path_to_root }}book.js" type="text/javascript" charset="utf-8"></script>
<!-- Custom JS scripts -->
{{#each additional_js}}
<script type="text/javascript" src="{{ ../path_to_root }}{{this}}"></script>
{{/each}}
{{#if is_print}}
{{#if mathjax_support}}
<script type="text/javascript">
window.addEventListener('load', function() {
MathJax.Hub.Register.StartupHook('End', function() {
window.setTimeout(window.print, 100);
});
});
</script>
{{else}}
<script type="text/javascript">
window.addEventListener('load', function() {
window.setTimeout(window.print, 100);
});
</script>
{{/if}}
{{/if}}
</body>
</html>

@ -0,0 +1,62 @@
@media only screen and (max-width:1439px) {
.sidetoc {
display: none;
}
}
@media only screen and (min-width:1440px) {
main {
position: relative;
}
.sidetoc {
margin-left: auto;
margin-right: auto;
left: calc(100% + (var(--content-max-width))/4 - 140px);
position: absolute;
}
.pagetoc {
position: fixed;
width: 200px;
height: calc(100vh - var(--menu-bar-height) - 0.67em * 4);
overflow: auto;
}
.pagetoc a {
border-left: 1px solid var(--sidebar-bg);
color: var(--fg) !important;
display: block;
padding-bottom: 5px;
padding-top: 5px;
padding-left: 10px;
text-align: left;
text-decoration: none;
}
.pagetoc a:hover,
.pagetoc a.active {
background: var(--sidebar-bg);
color: var(--sidebar-fg) !important;
}
.pagetoc .active {
background: var(--sidebar-bg);
color: var(--sidebar-fg);
}
.pagetoc .pagetoc-H2 {
padding-left: 20px;
}
.pagetoc .pagetoc-H3 {
padding-left: 40px;
}
.pagetoc .pagetoc-H4 {
padding-left: 60px;
}
.pagetoc .pagetoc-H5 {
display: none;
}
.pagetoc .pagetoc-H6 {
display: none;
}
}
/* Hide TOC where there is only one heading */
a[class^='pagetoc-H']:only-child {
display: none;
}

@ -0,0 +1,50 @@
// Un-active everything when you click it
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el) {
el.addEventHandler("click", function() {
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el) {
el.classList.remove("active");
});
el.classList.add("active");
});
});
var updateFunction = function() {
var id;
var elements = document.getElementsByClassName("header");
Array.prototype.forEach.call(elements, function(el) {
if (window.pageYOffset >= el.offsetTop) {
id = el;
}
});
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el) {
el.classList.remove("active");
});
if (!id) return;
Array.prototype.forEach.call(document.getElementsByClassName("pagetoc")[0].children, function(el) {
if (id.href.localeCompare(el.href) == 0) {
el.classList.add("active");
}
});
};
// Populate sidebar on load
window.addEventListener('load', function() {
var pagetoc = document.getElementsByClassName("pagetoc")[0];
var elements = document.getElementsByClassName("header");
Array.prototype.forEach.call(elements, function (el) {
var link = document.createElement("a");
link.appendChild(document.createTextNode(el.parentElement.innerText));
link.href = el.href;
link.classList.add("pagetoc-" + el.parentElement.tagName);
pagetoc.appendChild(link);
});
updateFunction.call();
});
// Handle active elements on scroll
window.addEventListener("scroll", updateFunction);

@ -1 +0,0 @@
Subproject commit a5eb57d2781eed43301215e27679c0bb7b4cbedf
Loading…
Cancel
Save