diff --git a/README.md b/README.md index c84a3f4..8789997 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ ![License](https://img.shields.io/github/license/NTBBloodbath/doom-nvim?style=for-the-badge) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge)](http://makeapullrequest.com) ![Latest Release](https://img.shields.io/github/v/release/NTBBloodbath/doom-nvim?include_prereleases&style=for-the-badge&color=red) -![GitHub last commit (branch)](https://img.shields.io/github/last-commit/NTBBloodbath/doom-nvim/develop?style=for-the-badge) -![Neovim version](https://img.shields.io/badge/Neovim-0.5-57A143?style=for-the-badge&logo=neovim) +![GitHub last commit (branch)](https://img.shields.io/github/last-commit/NTBBloodbath/doom-nvim/main?style=for-the-badge) +![Neovim version](https://img.shields.io/badge/Neovim-0.7-57A143?style=for-the-badge&logo=neovim) [![Discord](https://img.shields.io/badge/discord-join-7289da?style=for-the-badge&logo=discord)](https://discord.gg/xhvBM45zBf) diff --git a/docs/README.md b/docs/README.md index a30c337..eb59c93 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,35 +1,17 @@ # Doom Nvim Documentation -Doom Nvim is a port to Neovim of the [Doom Emacs](https://github.com/hlissner/doom-emacs) -configuration framework for [GNU Emacs](https://www.gnu.org/software/emacs/) adapted -for all vimmer who want less framework in their framework and the performance of -a handmade configuration (or better). It can be a base for your own setup or a -resource for Neovim enthusiasts to learn more about our favorite editor and how to -do X things on it by using Lua. - -Doom Nvim is an opinionated collection of reasonable (and optional) defaults with -a focus on performance (both runtime and startup) and on abstraction-light, readable -code design, so that there is less between you and Neovim. - > The documentation is designed to be viewed within Doom Nvim. Access it by pressing > `:h doom_nvim`. ## Documentation -### Getting Started - -- [Install](./getting_started.md#install) -- [Update & Rollback](./getting_started.md#update--rollback) -- [Configuration](./getting_started.md#configuration) - -### Modules - -- [Introduction](./modules.md#introduction) -- [Tweaking Doom Nvim Modules](./modules.md#tweaking-doom-nvim-modules) +- [All Modules](./modules.md#all-modules) +- [Configuring modules](./modules.md#quick-guide) +- [Buidling/contributing your own modules](./modules.md#building-your-own-module) +- [API Reference](./api.md) :warning: Not yet implemented. Refer to comments in [doom_global.lua](../lua/doom/core/doom_global.lua) ### Contributing -- [Where can I help?](./contributing.md#where-can-i-help) - [Reporting issues](./contributing.md#reporting-issues) - [Suggesting features, keybinds and enhancements](./contributing.md#suggesting-features-keybinds-and-enhancements) - [Contributing code](./contributing.md#contributing-code) @@ -39,7 +21,3 @@ code design, so that there is less between you and Neovim. ### Asking for help - [Our issues tracker](https://github.com/NTBBloodbath/doom-nvim/issues) - -### Projects - -- [Projects](https://github.com/NTBBloodbath/doom-nvim/projects) diff --git a/docs/contributing.md b/docs/contributing.md index 3d58852..e3d721d 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -100,9 +100,7 @@ quote_style = "AutoPreferDouble" #### Commits & PRs -- Target `develop` instead of `main`. - The only exception are hotfixes (plugins breaking changes, Doom bugs) - and documentation improvements! +- Target the `main` branch. #### Keybind conventions diff --git a/docs/faq.md b/docs/faq.md deleted file mode 100644 index 17203bc..0000000 --- a/docs/faq.md +++ /dev/null @@ -1,20 +0,0 @@ -# Frequently Asked Questions - -## General - -### What type of vimmer is Doom Nvim intended for? - -Doom Nvim is intended for all types of Vimmers who want a stable and efficient -development environment without spending a lot of time setting everything up. - -### Why does Doom Nvim only support Neovim 0.5+? - -Doom Nvim doesn't support Neovim versions lower than the current stable (0.5) -due big plugin incompatibilities and performance differences, which would make -the experience not worth it. - -### How to version control Doom Nvim? - -Doom Nvim makes use of an internal variable called `doom_configs_root` that points -to `/home/user/.config/doom-nvim` path by default. This allows you to move your -configuration files to this path so you can version control your doom setup too. diff --git a/docs/getting_started.md b/docs/getting_started.md deleted file mode 100644 index fd6ffa8..0000000 --- a/docs/getting_started.md +++ /dev/null @@ -1,375 +0,0 @@ -# Getting Started - -## Install - -This is what you will have installed by the end of this section: - -- Git -- Neovim 0.6.0+ -- GNU Find -- **Optional**: ripgrep 11.0+ (highly recommended) -- **Optional**: fd 7.3.0+ (known as `fd-find` on Debian, Ubuntu & derivates), - improves performance for many file indexing commands -- **Optional**: node & npm, required to use some Language Server Protocols (LSP) and packages using LSP, like the symbols-outline plugin. - -These packages should to be available through the package managers of your OS; -i.e. pacman/aptitude/rpm/etc on the various Linux distributions. - -### Neovim & dependencies - -#### On Linux - -Neovim 0.5.0 was recently released as a stable version. -You can check what version your repository has by looking at [this site.](https://repology.org/project/neovim/versions) -If Neovim 0.5.0 is still not available in your repository, you can install it by doing one of the following: - -1. Using extra repositories according to your distribution (PPA/COPR/AUR/etc). - -2. Using a Neovim version manager like [nvenv](https://github.com/NTBBloodbath/nvenv). - -##### Ubuntu - -You can get nightly builds of git master from the -[Neovim Unstable PPA](https://launchpad.net/~neovim-ppa/+archive/ubuntu/unstable). - -```sh -add-apt-repository ppa:neovim-ppa/unstable -apt-get update -``` - -##### Fedora - -Nightly builds can be installed by using the -[agriffis/neovim-nightly](https://copr.fedorainfracloud.org/coprs/agriffis/neovim-nightly/) -COPR repository. - -```sh -dnf copr enable agriffis/neovim-nightly -dnf update -``` - -##### Arch - -Neovim Nightly builds can be installed using the PKGBUILD -[`neovim-nightly-bin`](https://aur.archlinux.org/packages/neovim-nightly-bin), -available on the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository). - -#### On MacOS - -You can download a prebuilt binary from the [Neovim](https://github.com/neovim/neovim/releases/tag/nightly) releases page. - -1. Download: `curl -LO https://github.com/neovim/neovim/releases/download/v0.5.0/nvim-macos.tar.gz` -2. Extract: `tar xzvf nvim-macos.tar.gz` -3. Run: `./nvim-osx64/bin/nvim` - -You may wish to add it to your PATH using something like: -`export PATH="$HOME/nvim-osx64/bin:$PATH"` - -Neovim nightly can also be downloaded with [homebrew](https://brew.sh/): - -`brew install --HEAD neovim` will download the source and build it locally on your machine. - -If you already have Neovim v0.4 installed you may need to unlink it. - -``` -brew unlink neovim -brew install neovim --HEAD -nvim --version -``` - -MacPorts currently only has Neovim v0.4.4 - -#### On Windows - -> **NOTE**: new module architecture is pending tests on Windows. - -##### [Chocolatey](https://community.chocolatey.org/) - -``` -choco install neovim --pre -``` - -##### [Scoop](https://scoop.sh/) - -``` -scoop bucket add versions -scoop install neovim-nightly -``` - -##### Manual - -1. Download a prebuilt binary from the [Neovim](https://github.com/neovim/neovim/releases) releases page. -2. Unpack the binary -3. Move and symlink to somewhere in your path - -```sh -# unpack the binary -tar xzvf nvim-linux64.tar.gz - -# create a directory to store the unpacked folder -sudo mkdir /opt/nvim - -# move the unpacked binary -sudo mv nvim-linux64 /opt/nvim - -# add the neovim executable to somewhere in your path -# ex: /usr/bin OR $HOME/.local/bin -sudo ln -s /opt/nvim/nvim-linux64/bin/nvim /usr/bin/nvim - -# should print /usr/bin/nvim -which nvim - -# should print NVIM 0.5 -nvim --version -``` - -``` -# unpack the binary -tar xzvf nvim-linux64.tar.gz - -# create a directory to store the unpacked folder -sudo mkdir /opt/nvim - -# move the unpacked binary -sudo mv nvim-linux64 /opt/nvim - -# add the neovim executable to somewhere in your path -# ex: /usr/bin OR $HOME/.local/bin -sudo ln -s /opt/nvim/nvim-linux64/bin/nvim /usr/bin/nvim - -# should print /usr/bin/nvim -which nvim - -# should print NVIM 0.5 -nvim --version -``` -### External dependencies - -#### On Linux - -##### Ubuntu - -```sh -# Required dependencies -apt-get install git ripgrep - -# (Optional) Improves performance for many file indexing commands -apt-get install fd-find - -# (Optional) Required by some Language Server Protocols -apt-get install nodejs npm -``` - -##### Fedora - -```sh -# Required dependencies -dnf install git ripgrep - -# (Optional) Improves performance for many file indexing commands -dnf install fd-find # is 'fd' in Fedora <28 - -# (Optional) Required by some Language Server Protocols -dnf install nodejs -``` - -##### Arch - -```sh -# Required dependencies -pacman -S git ripgrep - -# (Optional) Improves performance for many file indexing commands -pacman -S fd - -# (Optional) Required by some Language Server Protocols -pacman -S nodejs npm -``` - -#### On MacOS - -Dependencies can be installed using [homebrew](https://brew.sh/) - -```sh -# Required dependencies -# git is already installed as part of MacOS -brew install ripgrep ctags - -# (Optional) Required by Language Server Protocols -brew install node -``` - -#### On Windows - -If you use Windows, please help by posting the steps to install the external -dependencies here! - -### Doom Nvim - -With Neovim v0.5.0 and Doom's dependencies installed, next is to install -Doom Nvim itself. - -> **IMPORTANT**: if you don't have a patched nerd font then you will need to -> install one in your system so you will be able to see icons in Neovim. - -First you'll want to backup your current Neovim configuration if you have one. - -> **NOTES**: -> -> 1. Your current configuration will be backed up to `~/.config/nvim.bak` -> or where your `XDG_CONFIG_HOME` environment variable points to. -> -> 2. If you're a cheovim user you can skip this step and go directly to -> [Using cheovim](#using-cheovim). - -```sh -[ -d ${XDG_CONFIG_HOME:-$HOME/.config}/nvim ] && mv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim ${XDG_CONFIG_HOME:-$HOME/.config}/nvim.bak -``` - -Now that you have backed up your current Neovim configuration you can proceed to install -`doom-nvim`. - -```sh -git clone --depth 1 https://github.com/NTBBloodbath/doom-nvim.git ${XDG_CONFIG_HOME:-$HOME/.config}/nvim -``` - -Or if you want to live in the bleeding-edge with the latest features: - -```sh -git clone --depth 1 -b develop https://github.com/NTBBloodbath/doom-nvim.git ${XDG_CONFIG_HOME:-$HOME/.config}/nvim -``` - -## Update & Rollback - -### Update Doom Nvim - -To update Doom Nvim, you have two options, run `:DoomUpdate` or SPC d u -inside Neovim or alternatively run `git pull` in doom-nvim directory (**not recommended, see why below**). - -#### Why use the built-in doom command for updating instead of running git pull manually? - -> **TODO**: These commands are pending testing in the new module architecture. - -> **tl;dr**: The `:DoomUpdate` command creates an additional local database of the doom-nvim -> releases so in case something breaks you can easily rollback to a previous doom-nvim version - -The reason is that `doom-nvim` also brings a functionality for rolling back to a previous version -or a previous state (e.g. a previous commit) and doing it manually can be a bit tedious (looking -for the previous release tag or the previous commit hash if there were too much commits). -Our `:DoomUpdate` command creates a local database into the `doom-nvim` directory depending on -what branch are you using because if you are using the development branch you will not want to -rollback to a previous version, isn't it? - -So, if you are using the main a.k.a stable branch of doom-nvim, the `:DoomUpdate` command will -create a local database of doom-nvim's releases. Otherwise, if you're using the development branch -it will create a local file with the commit hash that you were using before updating. - -### Rollback - -#### Previous Configurations - -To uninstall Doom Nvim and go back to your previous setup, simply remove the `~/.config/nvim` -directory if it's where you have `doom-nvim` installed and move your backup. - -```sh -rm -rf ${XDG_CONFIG_HOME:-$HOME/.config}/nvim \ - && mv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim.bak ${XDG_CONFIG_HOME:-$HOME/.config}/nvim -``` - -#### Rolling Back Doom - -Did the update screw up your setup because of a bug or a breaking change and you want to rollback? -Then you're lucky. Just run `:DoomRollback` in Neovim and Doom will rollback itself to -a previous release (for main branch) or a previous commit (for development branch). - -> **IMPORTANT**: remember to report the issues before just rolling back. In that -> way we can work on fixing them and make doom better! - -## Configuration - -You can configure Doom Nvim by tweaking the `config.lua` and -`modules.lua` files located in your Doom Nvim root directory -(`$HOME/.config/doom-nvim/` by default). - -### modules.lua - -This file handles all the Doom Nvim modules, copy the one in the root of this -repo for a template. - -> **NOTE**: for more information please refer to [modules]. - -### config.lua - -This file handles all the Doom Nvim configurations, including the ability to easily -create new custom mappings and global Neovim variables. - -It has no proper structure, but revolves around the `doom` global variable. -See each module's documentation for options. - -> **NOTE**: all your used-defined configurations here will be live-reloaded, e.g. -> mappings, autocommands, etc. - -### Plugin Management - -Doom Nvim uses a declarative and use-package inspired package manager called -[packer.nvim](https://github.com/wbthomason/packer.nvim). - -Each Doom module has a folder inside `lua/doom/modules/`, with the following -files: - -- `init.lua`: has default options and packer `config` functions. -- `packages.lua`: has packer specs, except for the config key. -- `binds.lua` (optional): has bindings for the module. -- `autocmds.lua` (optional): has autocmds. - -> **WARNING:** Do not change modules directly in Doom source code. Instead, -> use your `modules.lua` and `config.lua` files to modify them. - -### Configuring Doom - -#### Configuring settings - -You can change Doom's default settings by tweaking your `config.lua` file, -please see [modules] to know how. - -## Migrating to 4.0.0 - -As this is a major version, there are many improvements and breaking changes. -This section is made to help you migrate to this version without having to -respawn. - -### Changes for end users - -- Make modules more granular and configurable, allowing everything to be - overriden. -- Completely change the structure of `config.lua` to revolve around a - single settings store. -- Remove the category groupings in modules. -- Remove the need to return the filepath from each config file. -- Fully move all data file to stdpath("data"). -- Fix bugs. - -### Changes for contributors - -- Restructured source code. The Doom Nvim source code is now cleaner and - easier to understand. Many things have been flattened, no module is special - anymore, some things were removed in favor of later implementations - out-of-source. -- Adding modules is simpler, it only requires creating a new module folder - and adding its configuration. -- Care should be taken with order of execution, since you only have config - accesible after the doom global is created. You can't, for instance, - use the global do define defaults in `lua/doom/core/config/init.lua`. - This is rarely a problem, but worth mentioning. - -We recomend doing a fresh install, backing up your current -`~/.config/doom-nvim` for reference. Sadly, it cannot be used as is, and there's -no migration script yet. - -#### New configurations - - -[packer.nvim]: https://github.com/wbthomason/packer.nvim -[vhyrro]: https://github.com/vhyrro -[modules]: ./modules.md -[report them]: https://github.com/NTBBloodbath/doom-nvim/issues/new diff --git a/tools/start_docker.sh b/tools/start_docker.sh index 72e9575..4e77d4d 100755 --- a/tools/start_docker.sh +++ b/tools/start_docker.sh @@ -49,7 +49,7 @@ if [[ ! -d "$SCRIPT_DIR"/doom-nvim-contrib ]]; then if git show-ref --quiet refs/heads/"$BRANCH_NAME"; then git worktree add ./doom-nvim-contrib "$BRANCH_NAME" else - git worktree add ./doom-nvim-contrib origin/develop -b "$BRANCH_NAME" + git worktree add ./doom-nvim-contrib origin/develop -b "$BRANCH_NAME" fi fi @@ -65,10 +65,10 @@ elif git show-ref --quiet refs/heads/"$BRANCH_NAME"; then echo " - Checking out branch $BRANCH_NAME..." git checkout "$BRANCH_NAME" fi -else - # Pull latest version of develop - echo " - Creating new branch off develop..." - git checkout -b "$BRANCH_NAME" develop +else + # Pull latest version of main + echo " - Creating new branch off main..." + git checkout -b "$BRANCH_NAME" main git fetch --quiet # If changes between local and origin, get latest changes if [[ ! $( git rev-list develop...origin/develop --count ) -eq 0 ]]; then @@ -111,6 +111,6 @@ docker run \ -v "$SCRIPT_DIR"/workspace:/home/doom/workspace \ --name doom-nvim-contrib-container \ --user doom \ - doom-nvim-contrib + doom-nvim-contrib