Skip to content

Commit

Permalink
fix: recover README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aswa2ds committed Nov 9, 2023
1 parent ea19a7a commit 5a016bf
Showing 1 changed file with 60 additions and 61 deletions.
121 changes: 60 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,76 +81,78 @@ For neovim beginners who don't want to tinker with the configurations:
4. Paste the sample init.lua below to `~/.config/nvim/init.lua`
5. Start taking notes by `nvim test.norg`


<details>
<summary>sample init.lua</summary>

```lua
-- adapted from https://github.com/folke/lazy.nvim#-installation

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
print(vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
}))
end
vim.opt.rtp:prepend(lazypath)

vim.g.mapleader = " "

require("lazy").setup({
"rebelot/kanagawa.nvim", -- neorg needs a colorscheme with treesitter support
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
opts = {
highlight = { enable = true },
```lua
-- adapted from https://github.com/folke/lazy.nvim#-installation

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
print(vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
}))
end
vim.opt.rtp:prepend(lazypath)

vim.g.mapleader = " "

require("lazy").setup({
"rebelot/kanagawa.nvim", -- neorg needs a colorscheme with treesitter support
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
opts = {
highlight = { enable = true },
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
end,
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
end,
},
{
"nvim-neorg/neorg",
build = ":Neorg sync-parsers",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("neorg").setup {
load = {
["core.defaults"] = {},
["core.concealer"] = {},
["core.dirman"] = {
config = {
workspaces = {
notes = "~/notes",
{
"nvim-neorg/neorg",
build = ":Neorg sync-parsers",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("neorg").setup {
load = {
["core.defaults"] = {},
["core.concealer"] = {},
["core.dirman"] = {
config = {
workspaces = {
notes = "~/notes",
},
default_workspace = "notes",
},
default_workspace = "notes",
},
},
},
}

vim.wo.foldlevel = 99
vim.wo.conceallevel = 2
end,
}
})

vim.cmd.colorscheme('kanagawa')
```
}

vim.wo.foldlevel = 99
vim.wo.conceallevel = 2
end,
}
})

vim.cmd.colorscheme('kanagawa')
```

</details>

### Installation

You can install it through your favorite plugin manager:

- <details>
<summary><a href="https://github.com/wbthomason/packer.nvim">packer.nvim</a></summary>
-
<details>
<summary><a href="https://github.com/wbthomason/packer.nvim">packer.nvim</a></summary>

```lua
use {
Expand Down Expand Up @@ -180,7 +182,7 @@ You can install it through your favorite plugin manager:

You can also pin Neorg to one specific version through e.g. `tag = "2.0.0"`.

***
---

Want to lazy load? You can use the `ft` key to load Neorg only upon entering a `.norg` file:

Expand Down Expand Up @@ -212,7 +214,7 @@ You can install it through your favorite plugin manager:
additional steps depending on how your lazyloading system and/or Neovim
config is set up.

</details>
</details>

- <details>
<summary><a href="https://github.com/junegunn/vim-plug">vim-plug</a></summary>
Expand Down Expand Up @@ -242,7 +244,6 @@ You can install it through your favorite plugin manager:
```

</details>

- <details>
<summary><a href="https://github.com/folke/lazy.nvim">lazy.nvim</a></summary>

Expand Down Expand Up @@ -276,14 +277,12 @@ You can install it through your favorite plugin manager:
### Treesitter

###### _Be sure to have [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) installed on your system for this step!_

Neorg will automatically attempt to install the parsers for you upon entering a `.norg` file if you have `core.defaults` loaded.
A command is also exposed to reinstall and/or update these parsers: `:Neorg sync-parsers`.

It is important to note that installation via this command isn't reproducible.
There are a few ways to make it reproducible, but the recommended way is to set up an **update flag** for your plugin
manager of choice. In packer, your configuration may look something like this:

```lua
use {
"nvim-neorg/neorg",
Expand Down

0 comments on commit 5a016bf

Please sign in to comment.