Skip to content

Commit

Permalink
feat(recipes): add overview to every recipe page
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Nov 1, 2023
1 parent bfc3c0c commit 886408b
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 16 deletions.
4 changes: 3 additions & 1 deletion src/content/docs/recipes/alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ id: alpha
title: Dashboard Customizations
---

AstroNvim comes with [alpha-nvim](https://github.com/goolord/alpha-nvim) by default for providing a dashboard/home screen. This page provides a few common customization options.

### Customize Alpha Header

If you want to customize your header on the dashboard/home screen you can do this easily by overriding the `alpha` options in your plugins:
If you want to customize your header on the dashboard you can do this easily by overriding the `alpha` options in your plugins:

```lua
{
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/recipes/autopairs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: autopairs
title: Customize Autopairs
---

AstroNvim comes with [nvim-autopairs](https://github.com/windwp/nvim-autopairs) for automatically inserting pair characters such as closing quotes or parentheses. This page documents common configuration options.

### Add Custom Rules to `nvim-autopairs`

You can easily add rules and further configure `nvim-autopairs` in your user configuration by overriding the configuration function of the `nvim-autopairs` plugin. Here is a example `lazy.nvim` plugin spec:
Expand Down
13 changes: 0 additions & 13 deletions src/content/docs/recipes/black_belt.md

This file was deleted.

2 changes: 2 additions & 0 deletions src/content/docs/recipes/cmp.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: cmp
title: Customize cmp Completion
---

AstroNvim comes with [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) for powering completion out of the box. This page documents common configuration options such as custom keybindings or adding more sources.

### Customize Keybindings

Some overrides require access to the plugin itself that you are overriding. This comes up a lot in things adding custom mappings to `cmp`. This can be achieved with the following plugin spec:
Expand Down
4 changes: 3 additions & 1 deletion src/content/docs/recipes/detached_git_worktrees.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ AstroNvim provides an easy way to enable git integration when editing files with

This functionality is opt-in. To enable it, configure AstroCore and set the `git_worktrees` option to an array-like table, where each entry represents a separate worktree with entries `toplevel` and `gitdir` specifying paths on your system.

For example, if you have a bare git repo located at `~/.dotfiles` with its working tree set to the home directory, you can enable git integration for it by adding the following plugin specification to your configuration:
## Example

If you have a bare git repo located at `~/.dotfiles` with its working tree set to the home directory, you can enable git integration for it by adding the following plugin specification to your configuration:

```lua
{
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/recipes/disable_tabline.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ By default AstroNvim uses Heirline for generating the tabline for displaying buf
vim.opt.showtabline = 0
```

## Fully disable `tabline`

If you want to fully remove the `tabline` definition from Heirline as well as the `<Leader>b` functionality as well and not allow you to ever toggle the tabline on, you will also want to include the following in your plugins:

```lua
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/recipes/icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: icons
title: Customize Icons
---

AstroNvim aims to provide a unified and cohesive user experience which includes utilizing a common core set of icons which power the user interface. Here are some approaches to customize the user interface to fit your needs.

### Disable Icons

Some users may want to disable icons across the entire user interface because they don't like icons or simply because they are using a machine that is unable to install a nerd font for whatever reason. To assist with this use case we have added a new option variable `vim.g.icons_enabled` (default: `true`) that lets you disable the icons entirely and just have a text based user interface. To opt into this text based UI, it does require a user configuration setting the appropriate option. You want to add this to your vim options:
Expand Down
4 changes: 3 additions & 1 deletion src/content/docs/recipes/mappings.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ id: mappings
title: Customize Mappings
---

Mappings can be customized through [AstroCore](https://github.com/AstroNvim/astrocore) and [AstroLSP](https://github.com/AstroNvim/astrolsp). AstroCore handles the general mappings that are applied to the editor where AstroLSP handles mappings that are set when a language server attaches. This page goes over how to customize these mappings to fit your needs.

### Add Custom Mappings

Mappings can be customized through [AstroCore](https://github.com/AstroNvim/astrocore) and [AstroLSP](https://github.com/AstroNvim/astrolsp). AstroCore handles the general mappings that are applied to the editor where AstroLSP handles mappings that are set when a language server attaches. These tables are a direct conversion to the `vim.keymap.set({mode}, {lhs}, {rhs}, {opts})` Lua API. The first key into the table is the `{mode}`, the second key into the table is the `{lhs}`, and the element there is the `{opts}` table with the `{rhs}` in the first key. Also AstroLSP supports adding a `cond` key which can dictate when the mapping should be attached (this is described in detail in the [AstroLSP plugin configuration documentation](https://github.com/AstroNvim/astrolsp#%EF%B8%8F-configuration)) Here is a simple plugin specification example of setting both core and LSP mappings:
These tables are a direct conversion to the `vim.keymap.set({mode}, {lhs}, {rhs}, {opts})` Lua API. The first key into the table is the `{mode}`, the second key into the table is the `{lhs}`, and the element there is the `{opts}` table with the `{rhs}` in the first key. Also AstroLSP supports adding a `cond` key which can dictate when the mapping should be attached (this is described in detail in the [AstroLSP plugin configuration documentation](https://github.com/AstroNvim/astrolsp#%EF%B8%8F-configuration)) Here is a simple plugin specification example of setting both core and LSP mappings:

```lua
{
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/recipes/telescope_theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ This plugin specification makes the default theme telescope look like the defaul

![Screenshot of telescope theme](../../../assets/recipes/telescope_theme.png)

## Plugin Specification

```lua
{
"AstroNvim/astroui",
Expand Down

0 comments on commit 886408b

Please sign in to comment.