Skip to content

Commit

Permalink
docs(i18n): update current release version
Browse files Browse the repository at this point in the history
  • Loading branch information
kylo252 committed May 17, 2024
1 parent 1c753b3 commit 3f2f368
Show file tree
Hide file tree
Showing 26 changed files with 2,517 additions and 5 deletions.
24 changes: 24 additions & 0 deletions i18n/de/docusaurus-plugin-content-docs/version-1.4/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Einleitung
sidebar_position: 1
---

<img src="../img/lunarvim_logo.png" alt="LunarVim Logo" />

# Einleitung

LunarVim ist eine auf Neovim (>= 0.7.2) basierende Text-Editor Konfiguration, die sich auf die schnelle Bereitstellung einer voll funktionsfähigen, erweiterbaren und benutzerfreundlichen Entwicklungsumgebung konzentriert.

LunarVim verwendet neue Neovim Funktionen wie [Treesitter](https://tree-sitter.github.io/tree-sitter/) und das [Language Server Protocol](https://en.wikipedia.org/wiki/Language_Server_Protocol).

## Meinungsstark

LunarVim wird mit einer vernünftigen Standardkonfiguration ausgeliefert. Zu den Funktionen gehören Autovervollständigung, integrierte Terminals, Datei-Explorer, Fuzzy-Finder, LSP, Linting, Formatierung Debugging.

## Erweiterbar

Nur weil LunarVim stark von den Meinungen der Entwickler beeinflusst ist, heißt das nicht, dass Sie diese teilen müssen. Jedes eingebaute Plugin kann in der Datei `config.lua` ein- oder ausgeschaltet werden. Hier können Sie Ihre eigenen Plugins, Keymaps, Autocommands, Leader Bindings und alle anderen benutzerdefinierten Einstellungen hinzufügen.

## Schnell

Damit Sie nicht zwischen Funktionen und Geschwindigkeit entscheiden müssen, versucht LunarVim alle Plugins "lazy" zu laden. So spielt es keine Rolle, ob sie ein Plugin aktiviert oder deaktiviert haben.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 1

## 前置条件

- 请确保拥有最新版本的 [`Neovim v0.9.0+`](https://github.com/neovim/neovim/releases/latest)
- 请确保拥有最新版本的 [`Neovim v0.9.5+`](https://github.com/neovim/neovim/releases/latest)
- 在您的系统上安装 [`git`](https://cli.github.com/)[`make`](https://www.gnu.org/software/make/)[`pip`](https://pypi.org/project/pip/)[`python`](https://www.python.org/)[`npm`](https://npmjs.com/)[`node`](https://nodejs.org/)[`cargo`](https://www.rust-lang.org/tools/install)
- [解决全局安装程序包时的 `EACCES` 权限错误](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally),以避免使用 npm 安装程序包时出错。
- [`PowerShell 7+`](https://learn.microsoft.com/en-us/powershell/scripting/whats-new/migrating-from-windows-powershell-51-to-powershell-7?view=powershell-7.2)(Windows系统所需)。
Expand All @@ -17,7 +17,7 @@ sidebar_position: 1

## 稳定版

(Neovim 0.9.0)
(Neovim 0.9.5)

没有警报和意外:

Expand All @@ -28,14 +28,14 @@ import TabItem from '@theme/TabItem';
<TabItem value="linux/macos" label="Linux/MacOS">

```bash
LV_BRANCH='release-1.3/neovim-0.9' bash <(curl -s https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.3/neovim-0.9/utils/installer/install.sh)
LV_BRANCH='master' bash <(curl -s https://raw.githubusercontent.com/LunarVim/LunarVim/master/utils/installer/install.sh)
```

</TabItem>
<TabItem value="windows" label="Windows">

```powershell
pwsh -c "`$LV_BRANCH='release-1.3/neovim-0.9'; iwr https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.3/neovim-0.9/utils/installer/install.ps1 -UseBasicParsing | iex"
pwsh -c "`$LV_BRANCH='master'; iwr https://raw.githubusercontent.com/LunarVim/LunarVim/master/utils/installer/install.ps1 -UseBasicParsing | iex"
```

</TabItem>
Expand All @@ -44,7 +44,7 @@ pwsh -c "`$LV_BRANCH='release-1.3/neovim-0.9'; iwr https://raw.githubusercontent
_这只是为了查看基本的功能,因此某些交互可能会被环境拦截。_

```bash
docker run -w /tmp -it --rm alpine:edge sh -uelic 'addgroup -S lunaruser && adduser -S lunaruser -G lunaruser --shell /bin/sh && apk add yarn git python3 cargo neovim ripgrep alpine-sdk bash curl --update && LV_BRANCH='release-1.3/neovim-0.9' su -c "bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/release-1.3/neovim-0.9/utils/installer/install.sh) --no-install-dependencies" lunaruser && su -c /home/lunaruser/.local/bin/lvim lunaruser'
docker run -w /tmp -it --rm alpine:edge sh -uelic 'addgroup -S lunaruser && adduser -S lunaruser -G lunaruser --shell /bin/sh && apk add yarn git python3 cargo neovim ripgrep alpine-sdk bash curl --update && LV_BRANCH='master' su -c "bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh) --no-install-dependencies" lunaruser && su -c /home/lunaruser/.local/bin/lvim lunaruser'
```

</TabItem>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 入门指南

这一页还没写, [您可以帮助我们写](https://github.com/LunarVim/lunarvim.org/issues/352)
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
sidebar_position: 3
---

# 键位总览

这里概述了最常用的键位映射。以下键位表并不完整,可以通过 `<leader>sk` 搜索全部键位,或按下 `<leader>` 显示键位提示弹窗。

也可以参考:
[vim键位](https://devhints.io/vim)

**提示:** `<leader>` 默认是空格键,全部按键请参考 `:help keycodes`

**提示:** `<M>` 表示Windows/Linux系统上的 `alt`,MacOS系统上的 `option`

**提示:** 要查看不以`<leader>`键开头的键位(例如下面出现的 `<C-\>`等),先按`<leader>`弹出键位提示弹窗,再按`<backspace>`键查看。

## 插件

| 按键 | 描述 | 模式 |
| ----------------------------- | ----------------------------------------------------------------------------------------------- | ------ |
| `<leader>` | [whichkey](https://github.com/folke/which-key.nvim) (键位提示弹窗 (1秒后弹出)) | normal |
| `<leader>e` | [nvimtree](https://github.com/nvim-tree/nvim-tree.lua) (文件浏览边栏) | normal |
| `<leader>f` `<leader>s`(menu) | [telescope](https://github.com/nvim-telescope/telescope.nvim) (查找文件,搜索文本等) | normal |
| `<leader>;` | [alpha](https://github.com/goolord/alpha-nvim) (主页) | normal |
| `<C-\>` `<M-1/2/3>` | [toggleterm](https://github.com/akinsho/toggleterm.nvim) (终端) | normal |

## LSP

| 按键 | 描述 | 模式 |
| ---- | --------------------- | ------ |
| `K` | 悬停信息 | normal |
| `gd` | 跳转到定义 | normal |
| `gD` | 跳转到声明 | normal |
| `gr` | 跳转到引用 | normal |
| `gI` | 跳转到实现 | normal |
| `gs` | 显示签名帮助 | normal |
| `gl` | 显示当前行诊断信息 | normal |

## 编辑

| 按键 | 描述 | 模式 |
| ----------- | ----------------- | -------------- |
| `<leader>/` | 注释 | normal, visual |
| `gb` | 块注释 | visual |
| `<M-k>` | 向上移动行 | normal, visual |
| `<M-j>` | 向下移动行 | normal, visual |

## Completion

| 按键 | 描述 | 模式 |
| -------------------------- | -------------------------------------- | ------ |
| `<C-space>` | 显示补全窗口 | insert |
| `<CR>` `<C-y>` | 确认 | insert |
| `<C-e>` | 种植 | insert |
| `<C-k>` `<Up>` `<Tab>` | 上一项 | insert |
| `<C-j>` `<Down>` `<S-Tab>` | 下一项 | insert |
| `<C-d>` | 向上滚动文本 | insert |
| `<C-f>` | 向下滚动文本 | insert |
| `<CR>` `<Tab>` | 跳转到代码模版的下一个位置 | insert |
| `<S-Tab>` | 跳转到代码模版的上一个位置 | insert |

## Windows

| 按键 | 描述 | 模式 |
| ----------- | ---------------------- | ------ |
| `<C-h>` | 光标移到左窗口 | normal |
| `<C-j>` | 光标移到下窗口 | normal |
| `<C-k>` | 光标移到上窗口 | normal |
| `<C-l>` | 光标移到右窗口 | normal |
| `<C-Up>` | 减小窗口高度 | normal |
| `<C-Down>` | 增加窗口高度 | normal |
| `<C-Left>` | 减小窗口宽度 | normal |
| `<C-Right>` | 增大窗口宽度 | normal |

## Miscellaneous

| 按键 | 描述 | 模式 |
| ------------ | ------------------------- | ------ |
| `<leader>Lc` | 编辑lvim配置文件 | normal |
| `<leader>h` | 清除搜索结果高亮 | normal |
| `<leader>sh` | 搜索`:help`帮助文件 | normal |
| `<leader>sr` | 搜索最近打开的文件 | normal |
| `<leader>pS` | 显示已安装的插件 | normal |

## [nvimtree](https://github.com/nvim-tree/nvim-tree.lua) (文件浏览边栏)

`g?` 显示键位。
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 2
---

# 插件总揽

这一页还没写, [您可以帮助我们写](https://github.com/LunarVim/lunarvim.org/issues/352)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 1
---

# 术语

这一页还没写, [您可以帮助我们写](https://github.com/LunarVim/lunarvim.org/issues/352)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 配置

您可以使用配置文件`~/.config/lvim/config.lua`来配置LunarVim。

如希望快速开始使用LunarVim,请复制示例配置文件。

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

许多LunarVim内部设置都由`lvim`全局对象显露。
如需查看所有可用设置,请在`~/.config/lvim/``~/.local/share/lunarvim/lvim`运行以下命令以生成`lv-settings.lua`文件。

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

下面是输出的示例。

```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"
```

如果您想继续使用`nvim`命令启动LunarVim,请在shell的配置文件中设置别名:`alias nvim=lvim`。要临时恢复为默认的nvim,请在其前面加上反斜杠`\nvim`。如果创建此别名,可能还需要显式设置编辑器`export EDITOR='lvim'`。这将告诉git等命令行工具使用LunarVim作为编辑器。
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
sidebar_position: 1
---

# 配色方案

## 更换配色


如需实时更换配色,输入以下命令:

```vim
:Telescope colorscheme
```

您也可以使用`<leader>sp` 来预览所有的配色方案。

如需永久改变配色方案,则修改`config.lua`

```lua
lvim.colorscheme = 'desert'
```

## 安装配色方案

您可以按照自己的喜好添加任意配色方案,只需添加配色方案的插件即可。关于安装插件的更多信息请参考[此处](../plugins/plugins.md)

[此列表](https://github.com/rockerBOO/awesome-neovim#colorscheme) 有带tree-sitter支持的配色方案。

## 定制一些颜色

您可以通过在自动命令中覆盖它们来自定义突出显示组。要查找要更改的组,请使用 `leader s H` (`:Telescope highlights`)、 `:TSHighlightCapturesUnderCursor``: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,
},
},
}

```

## 透明窗口

如果您在使用透明的窗口,需要打开这个设置:

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

这会允许以下设置:

```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

0 comments on commit 3f2f368

Please sign in to comment.