Browse Source

feat: update docs

my-config
NTBBloodbath 3 years ago
parent
commit
b823a7a8ed
No known key found for this signature in database GPG Key ID: 18D6730BC846AAC5
  1. 64
      README.md
  2. 10
      docs/README.md
  3. 15
      docs/contributing.md
  4. 6
      docs/faq.md
  5. 354
      docs/getting_started.md
  6. 23
      docs/modules.md

64
README.md

@ -1,14 +1,17 @@
<div align="center">
# Doom Neovim
# Doom Nvim
![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)
![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)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-11-orange.svg?style=for-the-badge)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[Features](#features) • [Install](#install) • [Documentation] • [Contribute](#contribute)
@ -25,25 +28,22 @@
<img src="https://raw.githubusercontent.com/hlissner/doom-emacs/screenshots/cacochan.png" align="right" />
</a>
> It is a story as old as time. A barely new vimmer that is afraid to configure
> Neovim and make it work out-of-the-box without problems, that gets the
> solution to his configuration problems. This is his configuration.
Doom Nvim is a Neovim port of the [doom-emacs](https://github.com/hlissner/doom-emacs) framework.
As a vimmer, I know that it's difficult to configure Vim/Neovim when you are just starting to use it,
how time consuming it's to customize it to your needs and that's why Doom Nvim exists
_also because I love Doom_.
Doom Nvim is a Neovim port of the [doom-emacs](https://github.com/hlissner/doom-emacs) framework
and adapted to Vim philosophy.
Its goal is to give Neovim an initial configuration to start working in a stable and efficient
development environment without spending a lot of time configuring everything, without forgetting
development environment without spending a lot of time configuring everything and without forgetting
that we don't all need the same environment.
> As a vimmer, I know that it's difficult to configure Vim/Neovim when you are just starting to use it,
> how time consuming it's to customize it to your needs and that's why Doom Nvim exists
> _also because I love Doom_.
Its design is guided by these mantras:
- **Gotta go fast.** Startup and run-time performance are priorities.
That is why Doom Nvim uses Lua instead of Vimscript for its configurations
and lazy-loads all the plugins.
and lazy-loads _all_ the plugins.
- **Your system, your rules.** You know better than a third party what is
convenient for you. At least, Doom hopes so! It won't _automatically_
install system dependencies nor plugins that have external dependencies
@ -51,13 +51,13 @@ Its design is guided by these mantras:
- **What does not serve you, you throw away.** Doom Nvim is made up of a moderate number
of plugins (~40 plugins as of this writing). You more than anyone know what you need in
your environment and that's why Doom Nvim allows you to easily disable plugins and add new ones.
Also, Doom Nvim doesn't come with TreeSitter parsers or LSPs by default,
Also, Doom Nvim doesn't come with TreeSitter parsers or Language Server Protocols configured by default,
so **you can use _only_ what you need**.
## Notices
- **2021-07-03**: The `doomrc` has been fragmented and it is not working anymore,
please see [New configurations](./docs/getting_started.md#new-configurations)
please see [Migrating to 3.0.0](./docs/getting_started.md#migrating-to-300)
for more information.
- **2021-05-01**: The `doomrc` is not using Vimscript anymore, please see the
new [doomrc](./doomrc) file structure for use it with Lua.
@ -65,29 +65,33 @@ Its design is guided by these mantras:
## Features
- Minimalistic good looks inspired by modern code editors.
- Curated and sane defaults for many plugins.
- Works out of the box, just install and start editing.
- A modular organizational structure for separating concerns in your config.
- Extensible and customizable, everything can be easily modified.
- Curated and sane defaults for many plugins.
- A declarative and powerful [plugins management system](https://github.com/wbthomason/packer.nvim)
(powered by `packer.nvim`).
- Opt-in LSP integration for many languages by using the new
built-in LSP included on Neovim 0.5.
- An Emacs which-key like plugin to manage your `keybindings`, centered around leader
prefix key (<kbd>SPC</kbd>).
- Per-file indentation style detection and [editorconfig] integration. Let
someone else argue about tabs vs **_spaces_**.
- Project-management tools.
- Project search (and more) utilities, powered by
- Project search _and more_ utilities, powered by
[telescope.nvim].
## Prerequisites
- Curl 7.x
### Installation
- Curl 7.x (for using the installation script)
- Git 2.23+
- Neovim 0.5.0 onwards
### Runtime
- GNU `find`
- _OPTIONALS:_
- _Optionals:_
- [ripgrep] 11.0+ or [fd] 7.3.0+ (improves file indexing performance for some commands)
- `nodejs` and `npm` (required to use the built-in LSP)
- `nodejs` and `npm` (required to use some Language Server Protocols)
Doom is comprised of [~40 optional plugins][modules], some of which may have
additional dependencies. [Please visit their documentation][modules].
@ -100,6 +104,12 @@ Simply run the following command:
curl -sLf https://raw.githubusercontent.com/NTBBloodbath/doom-nvim/main/install.sh | bash
```
Or if you want to live in the bleeding-edge with the latest features:
```sh
curl -sLf https://raw.githubusercontent.com/NTBBloodbath/doom-nvim/main/install.sh | bash -s -- -d
```
Then [read our Getting Started guide][getting-started] to be walked through
installing, configuring and maintaining Doom Nvim.
@ -141,16 +151,16 @@ Special thanks to these amazing people for helping improve doom (see [emoji key]
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/GustavoPrietoP"><img src="https://avatars.githubusercontent.com/u/70907734?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gustavo Prieto</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/commits?author=GustavoPrietoP" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/vhyrro"><img src="https://avatars.githubusercontent.com/u/76052559?v=4?s=100" width="100px;" alt=""/><br /><sub><b>vhyrro</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/commits?author=vhyrro" title="Code">💻</a></td>
<td align="center"><a href="https://johnirle.com/"><img src="https://avatars.githubusercontent.com/u/11879736?v=4?s=100" width="100px;" alt=""/><br /><sub><b>John Irle</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/commits?author=JohnIrle" title="Documentation">📖</a></td>
<td align="center"><a href="http://www.brianketelsen.com/"><img src="https://avatars.githubusercontent.com/u/37492?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Brian Ketelsen</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/commits?author=bketelsen" title="Code">💻</a> <a href="https://github.com/NTBBloodbath/doom-nvim/issues?q=author%3Abketelsen" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/Samantha-uk"><img src="https://avatars.githubusercontent.com/u/45871296?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Samantha-uk</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/commits?author=Samantha-uk" title="Documentation">📖</a></td>
<td align="center"><a href="https://rscircus.github.io/"><img src="https://avatars.githubusercontent.com/u/1167114?v=4?s=100" width="100px;" alt=""/><br /><sub><b>rscircus</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/commits?author=rscircus" title="Documentation">📖</a></td>
<td align="center"><a href="http://bandithedoge.com/"><img src="https://avatars.githubusercontent.com/u/26331682?v=4?s=100" width="100px;" alt=""/><br /><sub><b>bandithedoge</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/commits?author=bandithedoge" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/vhyrro"><img src="https://avatars.githubusercontent.com/u/76052559?v=4?s=100" width="100px;" alt=""/><br /><sub><b>vhyrro</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/commits?author=vhyrro" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Mremmalex"><img src="https://avatars.githubusercontent.com/u/40169444?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ifeanyichukwu Sampson Ebenezer</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/issues?q=author%3AMremmalex" title="Bug reports">🐛</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/GustavoPrietoP"><img src="https://avatars.githubusercontent.com/u/70907734?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gustavo Prieto</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/commits?author=GustavoPrietoP" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Mremmalex"><img src="https://avatars.githubusercontent.com/u/40169444?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ifeanyichukwu Sampson Ebenezer</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/issues?q=author%3AMremmalex" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/ZeusThundr"><img src="https://avatars.githubusercontent.com/u/76399616?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ZeusThundr</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/issues?q=author%3AZeusThundr" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/leonistor"><img src="https://avatars.githubusercontent.com/u/310468?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Leo Nistor</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/issues?q=author%3Aleonistor" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/notusknot"><img src="https://avatars.githubusercontent.com/u/69602000?v=4?s=100" width="100px;" alt=""/><br /><sub><b>notusknot</b></sub></a><br /><a href="https://github.com/NTBBloodbath/doom-nvim/commits?author=notusknot" title="Documentation">📖</a></td>

10
docs/README.md

@ -14,16 +14,6 @@ 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`.
## Table of Contents
- [Documentation](#documentation)
- [Getting Started](#getting-started)
- [Modules](#modules)
- [Contributing](#contributing)
- [Community Resources](#community-resources)
- [Asking for help](#asking-for-help)
- [Projects](#projects)
## Documentation
### Getting Started

15
docs/contributing.md

@ -11,21 +11,6 @@ and which code style you should use :heart:
> **Working on your first Pull Request?** You can learn how from this _free_ series
> [How to Contribute to an Open Source Project on GitHub](https://kcd.im/pull-request).
## Table of Contents
- [Where can I help?](#where-can-i-help)
- [Reporting issues](#reporting-issues)
- [Acquire a backtrace from errors](#acquire-a-backtrace-from-errors)
- [Create a step-by-setp reproduction guide](#create-a-ste-by-step-reproduction-guide)
- [Include information about your Doom Nvim install](include-information-about-your-doom-nvim-install)
- [Suggesting features, keybinds and enhancements](#suggesting-features-keybinds-and-enhancements)
- [Contributing code](#contributing-code)
- [Conventions](#conventions)
- [Code style](#code-style)
- [Commits & PRs](#commits--prs)
- [Keybind conventions](#keybind-conventions)
- [Submitting pull requests](#submitting-pull-requests)
## Where can I help
- If you’ve encountered a bug, [file a bug report](https://github.com/NTBBloodbath/doom-nvim/issues/new/choose).

6
docs/faq.md

@ -1,11 +1,5 @@
# Frequently Asked Questions
## Table of Contents
- [General](#general)
- [What type of vimmer is Doom Nvim intended for?](#what-type-of-vimmer-is-doom-nvim-intended-for)
- [Why does Doom Nvim only support Neovim nightly?](#why-does-doom-nvim-only-support-neovim-nightly)
## General
### What type of vimmer is Doom Nvim intended for?

354
docs/getting_started.md

@ -1,53 +1,16 @@
# Getting Started
## Table of Contents
- [Install](#install)
- [Neovim & dependencies](#neovim--dependencies)
- [On Linux](#on-linux)
- [Ubuntu](#ubuntu)
- [Fedora](#fedora)
- [Arch Linux](#arch)
- [On MacOS](#on-macos)
- [On Windows](#on-windows)
- [External dependencies](#external-dependencies)
- [On Linux](#on-linux)
- [Ubuntu](#ubuntu)
- [Fedora](#fedora)
- [Arch Linux](#arch)
- [On MacOS](#on-macos)
- [On Windows](#on-windows)
- [Doom Nvim](#doom-nvim)
- [Using cheovim](#using-cheovim)
- [Update & Rollback](#update--rollback)
- [Update Doom Nvim](#update-doom-nvim)
- [Rollback](#rollback)
- [Previous configurations](#previous-configurations)
- [Rolling back doom](#rolling-back-doom)
- [Configuration](#configuration)
- [Modules](#modules)
- [Plugin Management](#plugin-management)
- [Installing plugins](#installing-plugins)
- [Disabling plugins](#disabling-plugins)
- [Configuring Doom](#configuring-doom)
- [Configuring settings](#configuring-settings)
- [Configuring plugins](#configuring-plugins)
- [Configuring LSP](#configuring-lsp)
- [Binding keys](#binding-keys)
- [Migrating to 3.0.0](#migrating-to-300)
- [New configurations](#new-configurations)
## Install
This is what you will have installed by the end of this section:
- Git 2.23+
- Neovim 0.5.0 (Neovim 0.4 not supported, see [faq](https://github.com/NTBBloodbath/doom-nvim/blob/main/docs/faq.md#why-does-doom-nvim-only-support-neovim-nightly) to know why)
- ripgrep 11.0+
- GNU Find
- (Optional) fd 7.3.0+ (known as `fd-find` on Debian, Ubuntu & derivates),
- **Optional**: ripgrep 11.0+
- **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 LanguageServerProtocols (LSP) and the plugins using LSP, like the symbols-outline plugin.
- **Optional**: node & npm, required to use LanguageServerProtocols (LSP) and the plugins using LSP, like the symbols-outline plugin.
These packages ought to be available through the package managers of your OS;
i.e. pacman/aptitude/rpm/etc on the various Linux distributions.
@ -56,7 +19,7 @@ i.e. pacman/aptitude/rpm/etc on the various Linux distributions.
#### On Linux
Neovim 0.5.0 was recently released as a stable version.
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:
@ -96,9 +59,9 @@ 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) nightly releases page.
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/nightly/nvim-macos.tar.gz`
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`
@ -109,7 +72,7 @@ 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 v4 installed you may need to unlink it.
If you already have Neovim v0.4 installed you may need to unlink it.
```
brew unlink neovim
@ -117,7 +80,7 @@ brew install neovim --HEAD
nvim --version
```
MacPorts currently only has Neovim v4.4
MacPorts currently only has Neovim v0.4.4
You can also download a prebuilt binary from the [Neovim](https://github.com/neovim/neovim/releases) releases page.
@ -157,7 +120,7 @@ apt-get install git ripgrep
# (Optional) Improves performance for many file indexing commands
apt-get install fd-find
# (Optional) Required by Language Server Protocols
# (Optional) Required by some Language Server Protocols
apt-get install nodejs npm
```
@ -170,7 +133,7 @@ dnf install git ripgrep
# (Optional) Improves performance for many file indexing commands
dnf install fd-find # is 'fd' in Fedora <28
# (Optional) Required by Language Server Protocols
# (Optional) Required by some Language Server Protocols
dnf install nodejs
```
@ -183,7 +146,7 @@ pacman -S git ripgrep
# (Optional) Improves performance for many file indexing commands
pacman -S fd
# (Optional) Required by Language Server Protocols
# (Optional) Required by some Language Server Protocols
pacman -S nodejs npm
```
@ -199,15 +162,15 @@ dependencies here!
### Doom Nvim
With Neovim Nightly and Doom's dependencies installed, next is to install
With Neovim v0.5.0 and Doom's dependencies installed, next is to install
Doom Nvim itself:
> **NOTES:**
1. If you have not installed Neovim 0.5.0 yet, please run the following command
before installing Doom Nvim, it will install Neovim 0.5.0 and Doom Nvim.
2. If you want to know all the commands of the installer, run the installer with
<kbd>bash -s -- -h</kbd> instead of just <kbd>bash</kbd>.
>
> 1. If you have not installed Neovim 0.5.0 yet, please run the following command
> before installing Doom Nvim, it will install Neovim 0.5.0 and Doom Nvim.
> 2. If you want to know all the commands of the installer, run the installer with
> <kbd>bash -s -- -h</kbd> instead of just <kbd>bash</kbd>.
```sh
# Check if you have all the dependencies listed above
@ -215,12 +178,12 @@ curl -sLf https://raw.githubusercontent.com/NTBBloodbath/doom-nvim/main/install.
```
```sh
# If you do not have Neovim nightly but you have all the dependencies listed above
# If you do not have Neovim 0.5.0 but you have all the dependencies listed above
curl -sLf https://raw.githubusercontent.com/NTBBloodbath/doom-nvim/main/install.sh | bash -s -- -n
```
```sh
# If you already have Neovim nightly and all the dependencies listed above
# If you already have Neovim 0.5.0 and all the dependencies listed above
curl -sLf https://raw.githubusercontent.com/NTBBloodbath/doom-nvim/main/install.sh | bash
```
@ -257,126 +220,219 @@ and restore the backup of your previous setup.
#### Rolling Back Doom
Did the update screwed up your setup because of a bug and you want to rollback?
Then you're lucky. Just run `:DoomRollback` in Neovim and Doom will rollback to
Did the update screwed 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 it and make doom better!
> way we can work on fixing them and make doom better!
## Configuration
You can configure Doom Nvim by tweaking the `doomrc` file in your Doom Nvim root
dir (`$HOME/.config/doom-nvim/` by default), please see
<kbd>:h doom_nvim_options</kbd> for more information.
You can configure Doom Nvim by tweaking the `doomrc.lua`, `doom_config.lua` and
the `plugins.lua` files located in your Doom Nvim root directory
(`$HOME/.config/doom-nvim/` by default).
> **IMPORTANT:** any changes to your Doom Nvim configuration occassionally
> need a run of `:PackerSync` inside Neovim (if you're using the stable branch).
> For instance, when you enable a disabled plugin.
### doomrc.lua
### Modules
This file handles all the Doom Nvim modules, its structure is really simple and
easy to understand.
Doom Nvim consists of around 7 modules. A Doom Nvim Module is a bundle of plugins,
configuration and commands, organized into a unit that can be toggled easily by
tweaking your doomrc (found in `$HOME/.config/doom-nvim`).
This one will look like that:
Please see [Plugin Management](#plugin-management) for more information.
```lua
local doom = {
ui = {
'dashboard', -- Start screen
-- 'doom-themes', -- Additional doom emacs' colorschemes
'statusline', -- Statusline
'tabline', -- Tabline, shows your buffers list at top
-- 'zen', -- Distraction free environment
'which-key', -- Keybindings popup menu like Emacs' guide-key
-- 'indentlines', -- Show indent lines
},
doom = {
-- 'neorg', -- Life Organization Tool
-- 'runner', -- Open a REPL for the current language or run the current file
-- 'compiler', -- Compile (and run) your code with just pressing three keys!
},
editor = {
'auto-session', -- A small automated session manager for Neovim
-- 'terminal', -- Terminal for Neovim (NOTE: needed for runner and compiler)
'explorer', -- Tree explorer
'symbols', -- LSP symbols and tags
-- 'minimap', -- Code minimap, requires github.com/wfxr/code-minimap
'gitsigns', -- Git signs
'telescope', -- Highly extendable fuzzy finderover lists
-- 'restclient', -- A fast Neovim http client
'formatter', -- File formatting
'autopairs', -- Autopairs
-- 'editorconfig', -- EditorConfig support for Neovim
'kommentary', -- Comments plugin
'lsp', -- Language Server Protocols
'snippets', -- LSP snippets
},
langs = {
-- To enable the language server for a language justadd the +lsp flag
-- at the end, e.g. 'rust +lsp'. This will install the rust TreeSitter
-- parser and rust-analyzer
--
-- 'html', -- HTML support
-- 'css', -- CSS support
-- 'javascript', -- JavaScript support
-- 'typescript', -- TypeScript support
-- 'bash', -- The terminal gods language
-- 'python +lsp', -- Python support + lsp
-- 'ruby', -- Look ma, I love the gems!
'lua', -- Support for our gods language
-- 'elixir', -- Build scalable and maintainablesoftware
-- 'haskell', -- Because Functional programming is fun, isn't it?
-- 'rust +lsp', -- Let's get rusty!
-- 'go', -- Hello, gopher
-- 'cpp', -- C++ support
-- 'java', -- Java support
-- 'config', -- Configuration files (JSON, YAML, TOML)
-- 'dockerfile', -- Do you like containers, right?
},
utilities = {
-- 'suda', -- Write and read files without sudo permissions
-- 'lazygit', -- LazyGit integration for Neovim, requires LazyGit
-- 'neogit', -- Magit for Neovim
-- 'colorizer', -- Fastets colorizer for Neovim
'range-highlight', -- hightlights ranges you haveentered in commandline
},
}
> **IMPORTANT:** any changes to your Doom Nvim Modules won't take effect until
> you run `:PackerSync` inside Neovim.
return doom
```
### Plugin Management
And as the `doomrc.lua` file self-documentation says, you will only need to uncomment
or comment the plugins names in order to enable or disable them. e.g. to enable the `terminal`
plugin you will only need to uncomment the `-- 'terminal',` line and restart Neovim.
Doom will automatically handle your changes and install the `terminal` plugin for you.
Doom Nvim uses a declarative and use-package inspired package manager called
[packer.nvim](https://github.com/wbthomason/packer.nvim).
> **NOTE**: for more information please refer to [modules].
Modules and plugins are declared in `lua/doom/modules/init.lua` file, located
in your Doom Nvim root directory. Read on to learn how to use this system to install
your own plugins.
### doom_config.lua
> **WARNING:** Do not install plugins directly in `lua/doom/modules/init.lua`. Instead,
> use your `doomrc` to modify them.
This file handles all the Doom Nvim configurations, including the ability to easily
create new custom mappings and global Neovim variables.
#### Installing plugins
All the options are self-documented on it so you can easily modify them and know
exactly what you are doing.
To install a custom plugin, add it to `custom_plugins` field into the `Doom` table
in your `doomrc`.
This is its structure:
```lua
-- @default = {}
custom_plugins = { 'plugin_author/plugin_repo' }
local doom = {
-- Here lies all the Doom Nvim configurations
}
local nvim = {
-- Here lies all the custom Neovim configurations
}
return {
doom = doom,
nvim = nvim,
}
```
You can also use other method if the plugin depends on other plugins. All the
available options for the plugins can be found on
[packer.nvim](https://github.com/wbthomason/packer.nvim) README.
### plugins.lua
This file handles your custom plugins, in other words, it handles all the extra
plugins you need that are not covered by Doom Nvim.
If you are familiar with [packer.nvim] then you can see this file as a wrapper
for its `use` function.
This one just contains a `return {}` statement. Your plugins should be declared
inside the returned table, e.g. if you want to install `markdown-preview.nvim`:
```lua
custom_plugins = {
'plugin_author/plugin_repo',
return {
{
'plugin_author/second_plugin_repo',
disable = false, -- not required, false by default
requires = { 'foo', 'bar' } -- not required if the plugin does not have dependencies
'iamcco/markdown-preview.nvim',
run = 'cd app && yarn install',
event = 'BufRead',
},
}
```
> **NOTES:**
>
> 1. Do not forget to run `:PackerInstall` to install your new plugins if you're
> using the stable branch of Doom Nvim.
And as with the `doomrc.lua` file, Doom Nvim will automatically handle your changes
and install or uninstall the plugins declared on here.
#### Disabling plugins
> **NOTE**: all the valid options for declaring plugins can be found in
> [specifying plugins](https://github.com/wbthomason/packer.nvim#specifying-plugins).
To disable plugins from Doom Nvim Modules or disable a module itself, just use the
`disabled_plugins` and/or `disabled_modules` fields.
### Modules
```lua
-- @default = {}
disabled_plugins = { 'terminal', 'treesitter' }
Doom Nvim consists of around 5 modules. A Doom Nvim Module is a bundle of plugins,
configuration and commands, organized into a unit that can be toggled easily by
tweaking your `doomrc.lua` (found in `$HOME/.config/doom-nvim`).
-- @default = { 'git', 'lsp', 'web' }
disabled_modules = { 'web' }
```
Please see [Plugin Management](#plugin-management) for more information.
> **NOTES:**
>
> 1. Do not forget to run `:PackerSync` or your changes won't take effect if you're
> using the stable branch of Doom Nvim.
>
> 2. You can see a list of the plugins that you can disable on [Modules](./modules.md#list-of-modules).
>
> 3. You can also see how to enable/disable plugins modules on [Modules](./modules.md).
### Plugin Management
Doom Nvim uses a declarative and use-package inspired package manager called
[packer.nvim](https://github.com/wbthomason/packer.nvim).
Modules and plugins are declared in `lua/doom/modules/init.lua` file, located
in your Doom Nvim root directory. Read on to learn how to use this system to install
your own plugins.
> **WARNING:** Do not install plugins directly in `lua/doom/modules/init.lua`. Instead,
> use your `doomrc.lua` and `plugins.lua` files to modify them.
### Configuring Doom
#### Configuring settings
You can change Doom's default settings by tweaking your `doomrc`, please see
<kbd>:h doom_nvim_options</kbd> to know how to.
You can change Doom's default settings by tweaking your `doom_config.lua` file,
please see <kbd>:h doom_nvim_options</kbd> to know how to.
#### Configuring plugins
Do you want to change some configurations of some modules?
Go to `lua/doom/modules/config` dir and you will find the configurations for the plugins.
Go to `lua/doom/modules/config` directory and you will find the configurations
for the plugins.
Otherwise if you want to configure a plugin declared in your `plugins.lua` you
can use the packer's `config` field, e.g.
```lua
{
'TimUntersberger/neogit',
config = function()
require('neogit').setup()
end,
}
```
##### Configuring LSP
[LSP](https://microsoft.github.io/language-server-protocol/) is installed as a plugin.
Be aware that this plugin is disabled per default. To enable it, remove it from the
`disabled_modules` section in your `doomrc`.
[Language Server Protocols](https://microsoft.github.io/language-server-protocol/) is installed as a plugin.
To easily install language servers and without having to do it system-wide or having to
manually configure servers, Doom Nvim makes use of [kabouzeid/nvim-lspinstall](https://github.com/kabouzeid/nvim-lspinstall).
You can see a list of currently supported languages at [bundled installers](https://github.com/kabouzeid/nvim-lspinstall#bundled-installers).
To enable the language server for a certain programming language and automatically
install it, just append a `+lsp` flag at the end of the language field in your `doomrc.lua`,
e.g. for enabling Rust support in Doom and install `rust-analyzer`:
> Usage example:
```lua
local doom = {
langs = {
'rust +lsp', -- Let's get rusty!
}
}
```
- `:LspInstall python` to install Python LSP
- `:LspUninstall python` to uninstall Python LSP
> **NOTE**: You can see a list of currently supported languages at [bundled installers](https://github.com/kabouzeid/nvim-lspinstall#bundled-installers).
### Binding keys
@ -385,13 +441,10 @@ You can modify the default keybindings by modifying the following files:
- `lua/doom/core/keybindings/init.lua` - General and SPC keybindings
- `lua/doom/modules/config` - lua plugins keybindings
You can also define your own keybindings in your `doomrc` with the `Neovim.mappings` field.
You can also define your own keybindings in your `doom_config.lua` with the `nvim.mappings` field.
## Migrating to 3.0.0
> At the time of writing this (2021-06-30) version 3.0.0 is still in development
> and subject to breaking changes.
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 dying in the
attempt.
@ -401,21 +454,29 @@ But first let's see what's new:
### Changes for end users
- Raw speed, never go slow again.
Reduced average startuptime from 400ms to 40ms, special thanks to [vhyrro]
Reduced average startuptime from 400ms to 40ms (tested with old hardware),
special thanks to [vhyrro]!
- New and better doom-one colorscheme written in pure Lua. Because the
colorscheme matters.
- Easily add new Neovim settings by using your `doomrc`. Extensibility is a
feature that you cannot miss, and what better than being able to extend as
much as you want?
- Fragmented configuration file (`doomrc`) so it will be more easy to customize
Doom. See [New configurations](#new-configurations).
- Easily add new Neovim settings by using your `doom_config.lua` file.
Extensibility is a feature that you cannot miss, and what better than being
able to extend Doom as much as you want?
- New logging system powered by [vlog]. A faster and smaller logging system
because complexity is not always the best choice.
- Better custom plugin manager. Now the custom plugins are being directly
- Easily enable and disable plugins. Now toggling the doom default plugins is easier
than before, just comment or uncomment it in your `doomrc.lua`!
- Better custom plugins management. Now the custom plugins are being directly
handled by packer as it should be, no more nonsense wrappers around it.
- Better updating mechanism. Forget these annoying merging issues and save the
current state of your Doom Nvim installation in case that you need to rollback
your Doom Nvim version because of the demons!
- Added a `DoomRollback` command. Something went wrong after updating? No worries,
just rollback to a previous version (stable branch) or a previous commit
(development branch) and be piece of mind!
- Built-in plugins. Because we should have some utilities to make our lives
easier, isn't this how it should be? See [modules/doom] for more information
(WIP).
- Fragmented configuration file (`doomrc`) so it will be more easy to customize
Doom nvim (**breaking change**).
easier, isn't this how it should be? See [modules/doom] for more information.
- A lot of bug fixes.
### Changes for contributors
@ -425,18 +486,13 @@ But first let's see what's new:
- Restructured source code. Now the doom nvim source code is much cleaner and
easier to understand.
- Added selene linter CI for incoming pull requests and stylua CI for pushes.
Let's get a consistent way to maintain doom nvim source.
> **IMPORTANT:** This what's new section is subject to changes while version
> 3.0.0 is in development. Changes are expected.
>
> You can also see the [Version 3.0.0 roadmap](https://github.com/NTBBloodbath/doom-nvim/projects/5)
> for seeing the current progress.
Let's get a consistent way to maintain Doom Nvim source!
Now that we know what's new we will surely want to update, isn't it?
Due to the new raw speed we highly recommend that you do a fresh installation so
everything will be work as it should. **Make sure to backup your doomrc changes**.
everything will be work as it should. **Make sure to backup your doomrc changes
so you can apply your changes to the new `doom_config.lua` configuration file**.
We don't recommend using the `:DoomUpdate` command for this task because of the
huge changes that doom nvim gotten. This command will only end in a really
@ -485,18 +541,20 @@ And now, how can I start using the new configuration files?
I'm going to explain you in a short way because the new configuration files has
a rich documentation inside them.
- `doomrc.lua`, this file handles the doom nvim modules, in other words, which
- `doomrc.lua`, this file handles the Doom Nvim modules, in other words, which
plugins are being installed and loaded and which plugins are not.
- `doom_config.lua`, this file handles the user configurations for doom nvim,
e.g. if mouse is enabled or not. This one also handles user-defined Neovim
configurations like global variables.
configurations like global variables and mappings.
- `plugins.lua`, this file handles the user-defined plugins, it is the
replacement for the `custom_plugins` field in the old doomrc.
> Are you having issues with the development version? Don't hesitate to [report them]
> Are you having issues with the 3.0.0 version? Don't hesitate to [report them]
> so we can fix them and make doom more stable because that's the way to improve software.
[vlog]: https://github.com/tjdevries/vlog.nvim
[packer.nvim]: https://github.com/wbthomason/packer.nvim
[vhyrro]: https://github.com/vhyrro
[modules]: ./modules.md
[modules/doom]: https://github.com/NTBBloodbath/doom-nvim/tree/develop/lua/doom/modules/doom
[report them]: https://github.com/NTBBloodbath/doom-nvim/issues/new

23
docs/modules.md

@ -2,8 +2,8 @@
## Introduction
Doom Nvim consists of around 5 modules with ~30 plugins and growing.
A dDoom Nvim module is a bundle of plugins, configurations and commands,
Doom Nvim consists of around 5 modules with ~40 plugins and growing.
A Doom Nvim module is a bundle of plugins, configurations and commands,
organized into a unit that can be toggled easily.
> **NOTE**: Doom Nvim uses [packer.nvim] as its plugins manager.
@ -52,6 +52,10 @@ without them. These plugins are the following:
- [neorg]
- Life Organization Tool.
- [runner] (built-in)
- A code runner for your interpreted code.
- [compiler] (built-in)
- Compile _and run_ your projects with only a few keystrokes.
### Editor
@ -171,8 +175,7 @@ The currently available flags are the following:
- TreeSitter based syntax highlighting: yes.
- LSP: yes.
> **NOTE**: this group requires `treesitter` enabled for getting syntax highlighting
> and `lsp` for the `+lsp` flags.
> **NOTE**: this group requires the `lsp` installed for the `+lsp` flags.
### Utilities
@ -189,15 +192,15 @@ The currently available flags are the following:
## Managing modules
Since version 3.0.0 managing the modules plugins is really easy, you don't need
to learn nothing anymore. Just comment the plugins that you don't want to use
and uncomment the ones that you are going to use!
Since version 3.0.0 managing the modules plugins is really easy because you
don't need to learn nothing anymore. Just comment the plugins that you don't
want to use and uncomment the ones that you are going to use!
So by example, if you want to disable the tree explorer you can simply comment it.
```lua
-- Before, the plugin is enabled
'explorer', -- Tree explorer
'explorer', -- Tree explorer
-- After, the plugin is disabled
-- 'explorer', -- Tree explorer
@ -222,6 +225,7 @@ changes for you!
[which-key]: https://github.com/folke/which-key.nvim
[zen]: https://github.com/kdav5758/TrueZen.nvim
[telescope]: https://github.com/nvim-telescope/telescope.nvim
[doom-themes]: https://github.com/GustavoPrietoP/doom-themes.nvim
[gitsigns]: https://github.com/lewis6991/gitsigns.nvim
[lazygit]: https://github.com/kdheepak/lazygit.nvim
@ -245,3 +249,6 @@ changes for you!
[restclient]: https://github.com/NTBBloodbath/rest.nvim
[colorizer]: https://github.com/norcalli/nvim-colorizer.lua
[range-highlight]: https://github.com/winston0410/range-highlight.nvim
[runner]: ../lua/doom/modules/built-in/runner/README.md
[compiler]: ../lua/doom/modules/built-in/compiler/README.md

Loading…
Cancel
Save