diff --git a/.github/PULL_REQUEST_TEMPLATE.yml b/.github/PULL_REQUEST_TEMPLATE.yml index 0b9658e..44c2865 100644 --- a/.github/PULL_REQUEST_TEMPLATE.yml +++ b/.github/PULL_REQUEST_TEMPLATE.yml @@ -5,6 +5,7 @@ - Feature - Codestyle - Refactor +- Documentation - Other ## Did this PR introduce a breaking change? diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..acc6174 --- /dev/null +++ b/.github/workflows/lint.yml @@ -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 diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 7795493..352d92f 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -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 diff --git a/.gitignore b/.gitignore index e24e352..a9c5c83 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ **/*.rs.bk *.log .DS_Store +website/book diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 4c5850e..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "website/themes/juice"] - path = website/themes/juice - url = https://github.com/huhu/juice diff --git a/.ok b/.ok deleted file mode 100644 index 91c34e8..0000000 --- a/.ok +++ /dev/null @@ -1 +0,0 @@ -install: cargo build --release; rm c:/dev/tools/neovide.* -ErrorAction SilentlyContinue; cp ./target/release/neovide.exe c:/dev/tools/neovide.exe diff --git a/README.md b/README.md index 84cfff0..874c86c 100644 --- a/README.md +++ b/README.md @@ -1,244 +1,32 @@ - - # 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) - - -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. + -![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. +
-## Features +
+ Screenshot of Neovide + Screenshot of Neovide running on Windows +
-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 -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). diff --git a/website/.gitignore b/website/.gitignore deleted file mode 100644 index bcb80c0..0000000 --- a/website/.gitignore +++ /dev/null @@ -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 diff --git a/website/.markdownlintrc b/website/.markdownlintrc new file mode 100644 index 0000000..9c872cb --- /dev/null +++ b/website/.markdownlintrc @@ -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 +} diff --git a/website/Makefile b/website/Makefile deleted file mode 100644 index defdd31..0000000 --- a/website/Makefile +++ /dev/null @@ -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 diff --git a/website/README.md b/website/README.md index d26c2c1..6f907cb 100644 --- a/website/README.md +++ b/website/README.md @@ -1,18 +1,86 @@ -## Build +# Neovide Documentation -To build neovide’s website, ensure you have [zola](https://getzola.org/) and `awk` installed. +Neovide Logo 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 +

-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. +
+ Neovide Landing Page + Screenshot of Landing Page +
-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 Ctrl-F5_ + +## 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! diff --git a/website/assets/landing-page.png b/website/assets/landing-page.png new file mode 100644 index 0000000..85a3bbf Binary files /dev/null and b/website/assets/landing-page.png differ diff --git a/website/book.toml b/website/book.toml new file mode 100644 index 0000000..2377bc3 --- /dev/null +++ b/website/book.toml @@ -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] diff --git a/website/config.toml b/website/config.toml deleted file mode 100644 index 04b1096..0000000 --- a/website/config.toml +++ /dev/null @@ -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" diff --git a/website/content/.gitkeep b/website/content/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/website/docs/SUMMARY.md b/website/docs/SUMMARY.md new file mode 100644 index 0000000..c452e6d --- /dev/null +++ b/website/docs/SUMMARY.md @@ -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) diff --git a/assets/AnimatedCursor.gif b/website/docs/assets/AnimatedCursor.gif similarity index 100% rename from assets/AnimatedCursor.gif rename to website/docs/assets/AnimatedCursor.gif diff --git a/assets/AnimatedWindows.gif b/website/docs/assets/AnimatedWindows.gif similarity index 100% rename from assets/AnimatedWindows.gif rename to website/docs/assets/AnimatedWindows.gif diff --git a/assets/BasicScreenCap.png b/website/docs/assets/BasicScreenCap.png similarity index 100% rename from assets/BasicScreenCap.png rename to website/docs/assets/BasicScreenCap.png diff --git a/assets/BlurredFloatingWindows.png b/website/docs/assets/BlurredFloatingWindows.png similarity index 100% rename from assets/BlurredFloatingWindows.png rename to website/docs/assets/BlurredFloatingWindows.png diff --git a/assets/Emoji.png b/website/docs/assets/Emoji.png similarity index 100% rename from assets/Emoji.png rename to website/docs/assets/Emoji.png diff --git a/assets/Ligatures.png b/website/docs/assets/Ligatures.png similarity index 100% rename from assets/Ligatures.png rename to website/docs/assets/Ligatures.png diff --git a/assets/LongCursorAnimationLength.gif b/website/docs/assets/LongCursorAnimationLength.gif similarity index 100% rename from assets/LongCursorAnimationLength.gif rename to website/docs/assets/LongCursorAnimationLength.gif diff --git a/assets/LongCursorTrailLength.gif b/website/docs/assets/LongCursorTrailLength.gif similarity index 100% rename from assets/LongCursorTrailLength.gif rename to website/docs/assets/LongCursorTrailLength.gif diff --git a/assets/Pixiedust.gif b/website/docs/assets/Pixiedust.gif similarity index 100% rename from assets/Pixiedust.gif rename to website/docs/assets/Pixiedust.gif diff --git a/assets/Railgun.gif b/website/docs/assets/Railgun.gif similarity index 100% rename from assets/Railgun.gif rename to website/docs/assets/Railgun.gif diff --git a/assets/Ripple.gif b/website/docs/assets/Ripple.gif similarity index 100% rename from assets/Ripple.gif rename to website/docs/assets/Ripple.gif diff --git a/assets/ShortCursorAnimationLength.gif b/website/docs/assets/ShortCursorAnimationLength.gif similarity index 100% rename from assets/ShortCursorAnimationLength.gif rename to website/docs/assets/ShortCursorAnimationLength.gif diff --git a/assets/ShortCursorTrailLength.gif b/website/docs/assets/ShortCursorTrailLength.gif similarity index 100% rename from assets/ShortCursorTrailLength.gif rename to website/docs/assets/ShortCursorTrailLength.gif diff --git a/assets/SmoothScrolling.gif b/website/docs/assets/SmoothScrolling.gif similarity index 100% rename from assets/SmoothScrolling.gif rename to website/docs/assets/SmoothScrolling.gif diff --git a/assets/Sonicboom.gif b/website/docs/assets/Sonicboom.gif similarity index 100% rename from assets/Sonicboom.gif rename to website/docs/assets/Sonicboom.gif diff --git a/assets/Torpedo.gif b/website/docs/assets/Torpedo.gif similarity index 100% rename from assets/Torpedo.gif rename to website/docs/assets/Torpedo.gif diff --git a/assets/Transparency.png b/website/docs/assets/Transparency.png similarity index 100% rename from assets/Transparency.png rename to website/docs/assets/Transparency.png diff --git a/assets/Wireframe.gif b/website/docs/assets/Wireframe.gif similarity index 100% rename from assets/Wireframe.gif rename to website/docs/assets/Wireframe.gif diff --git a/website/docs/assets/neovide-128x128.png b/website/docs/assets/neovide-128x128.png new file mode 100644 index 0000000..8eb1ba6 Binary files /dev/null and b/website/docs/assets/neovide-128x128.png differ diff --git a/website/docs/command-line-reference.md b/website/docs/command-line-reference.md new file mode 100644 index 0000000..058a9d0 --- /dev/null +++ b/website/docs/command-line-reference.md @@ -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=x +``` + +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 or an environment variable called NEOVIDE_APP_ID +--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. diff --git a/website/docs/configuration.md b/website/docs/configuration.md new file mode 100644 index 0000000..566b2ae --- /dev/null +++ b/website/docs/configuration.md @@ -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](), +[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 Alt + whatever actually as ``, 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 + +

+ Short Cursor Animation Length +    + Long Cursor Animation Length +

+ +```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 + +

+ Short Cursor Trail Length +    + Long Cursor Trail Length +

+ +```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 + +Railgun + +```vim +let g:neovide_cursor_vfx_mode = "railgun" +``` + +#### Torpedo + +Torpedo + +```vim +let g:neovide_cursor_vfx_mode = "torpedo" +``` + +#### Pixiedust + +Pixiedust + +```vim +let g:neovide_cursor_vfx_mode = "pixiedust" +``` + +#### Sonic Boom + +Sonicboom + +```vim +let g:neovide_cursor_vfx_mode = "sonicboom" +``` + +#### Ripple + +Ripple + +```vim +let g:neovide_cursor_vfx_mode = "ripple" +``` + +#### Wireframe + +Wireframe + +```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. diff --git a/website/docs/editing-with-external-tools.md b/website/docs/editing-with-external-tools.md new file mode 100644 index 0000000..f5d513f --- /dev/null +++ b/website/docs/editing-with-external-tools.md @@ -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](). diff --git a/website/docs/faq.md b/website/docs/faq.md new file mode 100644 index 0000000..d68cebc --- /dev/null +++ b/website/docs/faq.md @@ -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'}, "", function() ResizeGuiFont(1) end, opts) +vim.keymap.set({'n', 'i'}, "", function() ResizeGuiFont(-1) end, opts) +``` + +Credits to [0x0013 here](https://github.com/neovide/neovide/issues/1301#issuecomment-1119370546). diff --git a/website/docs/features.md b/website/docs/features.md new file mode 100644 index 0000000..9bf5e11 --- /dev/null +++ b/website/docs/features.md @@ -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. + +Ligatures + +## Animated Cursor + +Cursor animates into position with a smear effect to improve tracking of cursor position. + +Animated Cursor + +## 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. + +Smooth Scrolling + +## 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. + +Animated Windows + +## 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. + +Blurred Floating Windows + +## Emoji Support + +Font fallback supports rendering of emoji not contained in the configured font. + +Emojis + +## 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 + +Railgun + +### Torpedo + +Torpedo + +### Pixiedust + +Pixiedust + +### Sonic Boom + +Sonicboom + +### Ripple + +Ripple + +### Wireframe + +Wireframe diff --git a/website/docs/index.md b/website/docs/index.md new file mode 100644 index 0000000..f538574 --- /dev/null +++ b/website/docs/index.md @@ -0,0 +1,65 @@ +
+

+ + Neovide +

+ + Discord + + + Chat On Matrix + + + Discussions + +
+ +
+

Neovide + + Discord + + + Chat On Matrix + + + Discussions + +

+
+ +
+ +
+ +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. + + + +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) + +
+ Screenshot of Neovide +

Screenshot of Neovide running on Windows

+
diff --git a/website/docs/installation.md b/website/docs/installation.md new file mode 100644 index 0000000..b7d6592 --- /dev/null +++ b/website/docs/installation.md @@ -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 + +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. diff --git a/website/docs/troubleshooting.md b/website/docs/troubleshooting.md new file mode 100644 index 0000000..2c6f08c --- /dev/null +++ b/website/docs/troubleshooting.md @@ -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). diff --git a/website/riss.awk b/website/riss.awk deleted file mode 100644 index 956a9bb..0000000 --- a/website/riss.awk +++ /dev/null @@ -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 -} - -/^ + + {{ title }} + {{#if is_print }} + + {{/if}} + {{#if base_url}} + + {{/if}} + + + + {{> head}} + + + + + + + {{#if favicon_svg}} + + {{/if}} + {{#if favicon_png}} + + {{/if}} + + + + {{#if print_enable}} + + {{/if}} + + + + {{#if copy_fonts}} + + {{/if}} + + + + + + + + {{#each additional_css}} + + {{/each}} + + {{#if mathjax_support}} + + + {{/if}} + + + + + + + + + + + + + + + + +
+ +
+ {{> header}} + + + + {{#if search_enabled}} + + {{/if}} + + + + +
+
+ {{{ content }}} +
+ + +
+
+ + + +
+ + {{#if live_reload_endpoint}} + + + {{/if}} + + {{#if google_analytics}} + + + {{/if}} + + {{#if playground_line_numbers}} + + {{/if}} + + {{#if playground_copyable}} + + {{/if}} + + {{#if playground_js}} + + + + + + {{/if}} + + {{#if search_js}} + + + + {{/if}} + + + + + + + {{#each additional_js}} + + {{/each}} + + {{#if is_print}} + {{#if mathjax_support}} + + {{else}} + + {{/if}} + {{/if}} + + + diff --git a/website/theme/pagetoc.css b/website/theme/pagetoc.css new file mode 100644 index 0000000..79ee5a7 --- /dev/null +++ b/website/theme/pagetoc.css @@ -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; +} diff --git a/website/theme/pagetoc.js b/website/theme/pagetoc.js new file mode 100644 index 0000000..8f3b8e5 --- /dev/null +++ b/website/theme/pagetoc.js @@ -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); diff --git a/website/themes/juice b/website/themes/juice deleted file mode 160000 index a5eb57d..0000000 --- a/website/themes/juice +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a5eb57d2781eed43301215e27679c0bb7b4cbedf