Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: new version for 1.4/0.9 release #455

Merged
merged 5 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
3 changes: 3 additions & 0 deletions versioned_docs/version-1.4/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"position": 6
}
3 changes: 3 additions & 0 deletions versioned_docs/version-1.4/beginners-guide/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"position": 2
}
22 changes: 22 additions & 0 deletions versioned_docs/version-1.4/beginners-guide/beginners-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Beginner's guide

## Vim motions

If you don't know them already, it's a great time to learn the vim motions,
here are some resources to help you:

- [ThePrimeagen's "Vim As Your Editor" YouTube series](https://www.youtube.com/playlist?list=PLm323Lc7iSW_wuxqmKx_xxNtJC_hJbQ7R)
- Neovim tutor under the `:Tutor` command

## Lua

You'll need some basic lua knowledge to configure LunarVim.

- [`:help lua-guide`](https://neovim.io/doc/user/lua-guide.html)

## Next steps

- [learn about the default keybinds](./keybinds-overview.md)
- Learn about the [most important default plugins](./plugins-overview.md)
- Learn how to [configure LunarVim](/configuration/README.md)
- Check out [starter.lvim](https://github.com/LunarVim/starter.lvim) (a collection of language specific lunarvim configurations)
97 changes: 97 additions & 0 deletions versioned_docs/version-1.4/beginners-guide/keybinds-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
sidebar_position: 3
---

# Keybinds overview

Here's an overview of the most commonly used mappings.
It is not a complete list, you can find more by pressing `<leader>sk` to search through them,
or `<leader>` to show whichkey (keybinds popup)

Also see:
[vim mappings](https://devhints.io/vim)

**TIP:** `<leader>` is space by default, read [`:help keycodes`](https://neovim.io/doc/user/intro.html#keycodes) for more key names

**TIP:** `<M>` is `alt` on Windows/Linux and `option` on macOS

**TIP:** For macOS users: For the `option` key (`⌥`) to work as `<M>` you may need to adjust some settings:
- For iTerm2: Select `Esc+` as the Option key setting in [ Preferences - Profiles - Keys ](https://github.com/LunarVim/lunarvim.org/pull/377#discussion_r1140747022)
- For Alacritty: Make sure you're on Alacritty version >= 0.12.0. In your `alacritty.yml` config file, set `window.option_as_alt` to `Both` or `OnlyLeft` \ `OnlyRight` per your preference (https://github.com/alacritty/alacritty/issues/62).

**TIP:** Non-leader keybindings (for e.g. `<C-\>`, mentioned below and others) can be viewed
by pressing `<backspace>` in the which-key main menu (first popup after pressing `<leader>`)

## Plugins

| key | description | mode |
| ----------------------------- | ----------------------------------------------------------------------------------------------- | ------ |
| `<leader>` | [whichkey](https://github.com/folke/which-key.nvim) (keybinds popup (shows up after 1s)) | normal |
| `<leader>e` | [nvimtree](https://github.com/nvim-tree/nvim-tree.lua) (side file explorer) | normal |
| `<leader>f` `<leader>s`(menu) | [telescope](https://github.com/nvim-telescope/telescope.nvim) (find files, grep text, and more) | normal |
| `<leader>;` | [alpha](https://github.com/goolord/alpha-nvim) (dashboard) | normal |
| `<C-\>` `<M-1/2/3>` | [toggleterm](https://github.com/akinsho/toggleterm.nvim) (terminal) | normal |

## LSP

| key | description | mode |
| ------ | -------------------------------------------- | ------ |
| `K` | hover information (double tap to get inside) | normal |
| `KK` | move cursor inside `K` window | normal |
| `gd` | go to definition | normal |
| `gD` | go to declaration | normal |
| `gr` | go to references | normal |
| `gI` | go to implementation | normal |
| `gs` | show signature help | normal |
| `gl` | show line diagnostics | normal |
| `glgl` | move cursor inside `gl` diagnostics window | normal |

## Editing

| key | description | mode |
| ----------- | ----------------- | -------------- |
| `<leader>/` | comment | normal, visual |
| `gb` | block comment | visual |
| `<M-k>` | move line(s) up | normal, visual |
| `<M-j>` | move line(s) down | normal, visual |

## Completion

| key | description | mode |
| -------------------------- | -------------------------------------- | ------ |
| `<C-space>` | show completion menu | insert |
| `<CR>` `<C-y>` | confirm | insert |
| `<C-e>` | abort | insert |
| `<C-k>` `<Up>` `<Tab>` | select previous item | insert |
| `<C-j>` `<Down>` `<S-Tab>` | select next item | insert |
| `<C-d>` | scroll docs up | insert |
| `<C-f>` | scroll docs down | insert |
| `<CR>` `<Tab>` | jump to next jumpable in a snippet | insert |
| `<S-Tab>` | jump to previous jumpable in a snippet | insert |

## Windows

| key | description | mode |
| ----------- | ---------------------- | ------ |
| `<C-h>` | go to left window | normal |
| `<C-j>` | go to lower window | normal |
| `<C-k>` | go to upper window | normal |
| `<C-l>` | go to right window | normal |
| `<C-Up>` | decrease window height | normal |
| `<C-Down>` | increase window height | normal |
| `<C-Left>` | decrease window width | normal |
| `<C-Right>` | increase window width | normal |

## Miscellaneous

| key | description | mode |
| ------------ | ------------------------- | ------ |
| `<leader>Lc` | edit config.lua | normal |
| `<leader>h` | clear search highlighting | normal |
| `<leader>sh` | search through `:help` | normal |
| `<leader>sr` | open recent files | normal |
| `<leader>pS` | list of installed plugins | normal |

## [nvimtree](https://github.com/nvim-tree/nvim-tree.lua) (side file explorer)

`g?` show keybindings
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 2
---

# Plugins overview

This page is not written yet, [you can help us write it](https://github.com/LunarVim/lunarvim.org/issues/352)
25 changes: 25 additions & 0 deletions versioned_docs/version-1.4/beginners-guide/terminology.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
sidebar_position: 1
---

# Terminology

## Language features

### [LSP (Language Server Protocol)](https://microsoft.github.io/language-server-protocol/)

- **LSP** - protocol for use between source code editors and LSP servers. The goal of the protocol is to allow
programming language support to be implemented and distributed independently of any given editor
or IDE.

- **LSP server** - provides programming language-specific features like code completion, syntax
highlighting and marking of warnings and errors, as well as refactoring routines.

### [DAP (Debug Adapter Protocol)](https://microsoft.github.io/debug-adapter-protocol/)

Protocol used for debugging support

### [Treesitter](https://tree-sitter.github.io/tree-sitter/)

Tree-sitter can build a syntax tree for a source file and update the syntax tree as the source file
is edited. In neovim it's used for syntax highlighting and indentation.
11 changes: 11 additions & 0 deletions versioned_docs/version-1.4/community/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Links

- 🔌 Ask questions and get support on [Discord](https://discord.gg/Xb9B4Ny)
- 📹 Follow me on [YouTube](https://www.youtube.com/channel/UCS97tchJDq17Qms3cux8wcA)
- 📺 I'd rather you join me on [Odysee](https://odysee.com/@chrisatmachine:f)
- 🐦 Connect on [Twitter](https://twitter.com/chrisatmachine)
- 🎙️ You can also find us on [Matrix](https://matrix.to/#/+atmachine:matrix.org)
- 💳 Support on [Patreon](https://www.patreon.com/chrisatmachine)
- 🪙 Stake DEV token with LunarVim on [stakes.social](https://stakes.social/0xe014A52354136B678ff5030397224179bD0F9657)
- ❤️ Sponsor me [sponsor page](https://github.com/sponsors/ChristianChiarulli)
- 🌑 Share your LunarVim config [here](https://github.com/LunarVim/LunarVimCommunity)
4 changes: 4 additions & 0 deletions versioned_docs/version-1.4/community/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Community",
"position": 7
}
17 changes: 17 additions & 0 deletions versioned_docs/version-1.4/community/meet-the-team.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
sidebar_position: 1
---

# Meet the team

Christian Chiarulli

[Abouzar Parvan](https://github.com/abzcoding/)

[Nelson Jovel](https://github.com/rebuilt)

[Sngmin Chae](https://github.com/chaeing)

[Luc Sinet](https://github.com/Tastyep)

(other devs pls make pr and add your name and a link to whatever you want)
30 changes: 30 additions & 0 deletions versioned_docs/version-1.4/configuration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Configuration

You can configure LunarVim by using the configuration file located in `~/.config/lvim/config.lua`.

To get started quickly, copy the sample configuration file

```bash
cp ~/.local/share/lunarvim/lvim/utils/installer/config.example.lua ~/.config/lvim/config.lua
```

Many LunarVim internal settings are exposed through the `lvim` global object.
To see a list of all available settings, run this command from either `~/.config/lvim/` or `~/.local/share/lunarvim/lvim` to generate an `lv-settings.lua` file.

```bash
lvim --headless +'lua require("lvim.utils").generate_settings()' +qa && sort -o lv-settings.lua{,}
```

Here is a sample of the output.

```lua
lvim.builtin.telescope.defaults.initial_mode = "insert"
lvim.builtin.telescope.defaults.layout_config.horizontal.mirror = false
lvim.builtin.telescope.defaults.layout_config.preview_cutoff = 120
lvim.builtin.telescope.defaults.layout_config.prompt_position = "bottom"
lvim.builtin.telescope.defaults.layout_config.vertical.mirror = false
lvim.builtin.telescope.defaults.layout_config.width = 0.75
lvim.builtin.telescope.defaults.layout_strategy = "horizontal"
```

If you want to keep launching LunarVim with the `nvim` command, add an alias entry to your shell's config file: `alias nvim=lvim`. To temporarily revert to the default nvim prefix it with a backslash `\nvim`. If you create this alias, you may also want to explicitly set your editor as well `export EDITOR='lvim'`. This will tell command line tools like git to use LunarVim as your editor.
3 changes: 3 additions & 0 deletions versioned_docs/version-1.4/configuration/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"position": 3
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"position": 4,
"label": "Appearance"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
sidebar_position: 1
---

# Colorscheme

## Switching colors

To switch color schemes on the fly, use `<leader>sc` (`:Telescope colorscheme`)

You can also press `<leader>sp` to cycle through colorschemes with a preview.

To change the color scheme permanently, modify `config.lua`

```lua
lvim.colorscheme = "desert"
```

## Installing colorschemes

You can add any colorscheme you like. Just add a plugin with the colorscheme of your choice. For more information on installing plugins [look here.](../plugins/plugins.md)

[This is a list](https://github.com/rockerBOO/awesome-neovim#colorscheme) of colorschemes with tree-sitter support

## Customizing some colors

You can customize the highlight groups by overriding them in an autocommand.
To find the group you want to change use `leader s H` (`:Telescope highlights`),
`:TSHighlightCapturesUnderCursor` or `:Inspect`

```lua
lvim.autocommands = {
{
{ "ColorScheme" },
{
pattern = "*",
callback = function()
-- change `Normal` to the group you want to change
-- and `#ffffff` to the color you want
-- see `:h nvim_set_hl` for more options
vim.api.nvim_set_hl(0, "Normal", { bg = "#ffffff", underline = false, bold = true })
end,
},
},
}
```

## Transparent Windows

If you're using transparent windows enable this setting

```lua
lvim.transparent_window = true
```

That enables the following settings

```lua
cmd "au ColorScheme * hi Normal ctermbg=none guibg=none"
cmd "au ColorScheme * hi SignColumn ctermbg=none guibg=none"
cmd "au ColorScheme * hi NormalNC ctermbg=none guibg=none"
cmd "au ColorScheme * hi MsgArea ctermbg=none guibg=none"
cmd "au ColorScheme * hi TelescopeBorder ctermbg=none guibg=none"
cmd "au ColorScheme * hi NvimTreeNormal ctermbg=none guibg=none"
cmd "let &fcs='eob: '"
```

<iframe width="560" height="315" src="https://www.youtube.com/embed/OOr1qM17Lds" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="1"></iframe>
Loading
Loading