Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Feature: restructure modules and config #277

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# My temp files
plugin/
sessions/
undodir/
time_cost.txt
tags
# Backup files
Expand All @@ -16,3 +13,5 @@ tags
contribute/doom-nvim-contrib
contribute/local-share-nvim
contribute/workspace
# Editor files
.luarc.json
10 changes: 5 additions & 5 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
stds.nvim = {
globals = {
vim = { fields = { "g" } },
vim = { fields = { "g", "opt" } },
table = { fields = { "unpack" } },
package = { fields = { "searchers" } },
doom = { fields = { "packages", "binds", "autocmds" } },
_doom = { fields = { "cmp_enable" } }
},
read_globals = {
"vim",
"jit",
"packer_plugins",
"doom",
"_doom"
},
}
std = "lua51+nvim"
Expand All @@ -22,8 +26,4 @@ ignore = {
"631", -- Line is too long.
}

exclude_files = {
"plugin/packer_compiled.lua",
}

-- vim: ft=lua sw=2 ts=2
35 changes: 5 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Its design is guided by these mantras:
- `nodejs` and `npm` (optional, required to use some Language Server Protocols)
- `wget`, `unzip` (optional, required for auto installing LSPs)

Doom is comprised of [~40 optional plugins][modules], some of which may have
Doom is comprised of [~40 optional modules][modules], some of which may have
additional dependencies. [Please visit their documentation][modules].

## Install
Expand All @@ -111,9 +111,6 @@ First you'll want to backup your current Neovim configuration if you have one.
>
> 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
> [installing with cheovim](#installing-with-cheovim).

```sh
[ -d ${XDG_CONFIG_HOME:-$HOME/.config}/nvim ] && mv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim ${XDG_CONFIG_HOME:-$HOME/.config}/nvim.bak
Expand All @@ -132,35 +129,14 @@ Or if you want to live in the bleeding-edge with the latest features:
git clone --depth 1 -b develop https://github.com/NTBBloodbath/doom-nvim.git ${XDG_CONFIG_HOME:-$HOME/.config}/nvim
```

### Installing with cheovim

If you're using cheovim as your Neovim configurations manager you can install `doom-nvim` and then
use the recipe listed in cheovim documentation:

```sh
# Clone doom-nvim under a specific directory under our '~/.config' directory
git clone --depth 1 https://github.com/NTBBloodbath/doom-nvim.git ${XDG_CONFIG_HOME:-$HOME/.config}/doom-nvim

# Change the doom-nvim internal path
sed -i "37s/nvim/doom-nvim/" ${XDG_CONFIG_HOME:-$HOME/.config}/doom-nvim/lua/doom/core/system/init.lua
```

```lua
-- In your '~/.config/nvim/profiles.lua'
doom_nvim = { "~/.config/doom-nvim", {
plugins = "packer",
preconfigure = "doom-nvim"
}
}
```
---

Then [read our Getting Started guide][getting-started] to be walked through
installing, configuring and maintaining Doom Nvim.

## Getting help

Neovim is not very difficult. Although you will occasionally run into problems
Although Neovim is not very difficult, you will occasionally run into problems
if you are not an advanced vimmer. When you do, here are some places you can look help:

- [Our documentation][documentation] covers many use cases.
Expand All @@ -175,15 +151,14 @@ if you are not an advanced vimmer. When you do, here are some places you can loo

## Acknowledgements

- [hlissner](https://github.com/hlissner) per doing Doom Emacs :heart:.
- [romgrk](https://github.com/romgrk) per doing a port to Vim of Doom One
colorscheme from Doom Emacs (and everyone who improves the colorscheme!).
- [hlissner](https://github.com/hlissner) for making Doom Emacs :heart:.
- [romgrk](https://github.com/romgrk) for making a port of Doom One to Vim :heart:.
- [All our contributors](#contributors) per helping improve Doom :heart:

## Contribute

- I really :heart: pull requests and bug reports (please see the [Contributing Guidelines][contribute] before contributing)!
- Don't hesitate to [tell me my Lua coding style sucks](https://github.com/NTBBloodbath/doom-nvim/issues/new),
- Don't hesitate to [tell me my Lua sucks](https://github.com/NTBBloodbath/doom-nvim/issues/new),
but please tell me why.

## Contributors
Expand Down
7 changes: 7 additions & 0 deletions config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- doom_config - Doom Nvim user configurations file
--
-- This file contains the user-defined configurations for Doom nvim.
-- Just override stuff in the `doom` global table (it's injected into scope
-- automatically).

-- vim: sw=2 sts=2 ts=2 expandtab
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ thus reach a solution more quickly.
Some important data would be:

- Your custom configuration if you have one
(`doom_modules.lua`, `doom_config.lua` and `doom_userplugins.lua`)
(`modules.lua` and `config.lua`)
- Which branch of Doom Nvim are you using
- Which plugins are you using

Expand Down
33 changes: 4 additions & 29 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,17 @@

### What type of vimmer is Doom Nvim intended for?

Doom Nvim is intended for all types of Vimmer who want a stable and efficient
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 to:

- some features would be lost
- Not all Lua plugins have good alternatives in Vimscript, so the experience
would not be the same
- performance would not be the same as Lua cannot be used
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.

> **NOTE**: In case that you're using cheovim (with `/home/user/.config/doom-nvim`
> as your Doom Nvim path) then you will need to change this variable value manually
> by tweaking [this](../lua/doom/core/system/init.lua) file.

After changing your configurations path you will surely want to remove your
`~/.config/nvim/plugin/packer_compiled.lua` and running `:PackerCompile` again.

Also you will need to create a symlink from your new path to the old one for
avoiding issues when updating Doom Nvim. Here is a snippet for this task.

```sh
# Change this variable path if you have installed Doom Nvim in other place
DOOM_ROOT="${XDG_CONFIG_HOME:-$HOME/.config}/nvim"
# Change this variable path if you have changed the Doom Nvim doom_configs_root variable
DOOM_CONFIG_ROOT="${XDG_CONFIG_HOME:-$HOME/.config}/doom-nvim"

# Let's iterate over the configurations path directory files and create a symlink for them
for _config_file in $(ls "$DOOM_CONFIG_ROOT"); do
ln -s "${DOOM_CONFIG_ROOT}/$_config_file" "${DOOM_ROOT}/$_config_file"
done
```
Loading