Skip to content

Commit

Permalink
Merge pull request #135 from brianhuster/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
brianhuster authored Oct 21, 2024
2 parents f5f183b + 7a0bdba commit cb62043
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ https://github.com/user-attachments/assets/865112c1-8514-4920-a531-b2204194f749
## Requirements

- Neovim >=0.10.0
(recommended: >=0.10.2)
- A modern web browser

## Installation

You can install this plugin using a plugin manager. Most plugin managers are supported. Below are some examples
<details>
<summary>

### Using lazy.nvim (recommended)
</summary>

```lua
require("lazy").setup({
Expand All @@ -43,7 +47,14 @@ require("lazy").setup({
})
```

</details>

<details>
<summary>

### mini.deps
</summary>

```lua
add({
source = 'brianhuster/live-preview.nvim',
Expand All @@ -52,7 +63,14 @@ add({
require('livepreview').setup()
```

</details>

<details>
<summary>

### vim-plug
</summary>

```vim
Plug 'brianhuster/live-preview.nvim'
Plug 'brianhuster/autosave.nvim' " Not required, but recomended for autosaving
Expand All @@ -61,7 +79,13 @@ let g:livepreview_config = {} " Optional configuration.
lua require('livepreview').setup(vim.g.livepreview_config) " Required to enable the plugin
```

</details>

<details>
<summary>

### Native package (without a plugin manager)
</summary>

- **Linux, MacOS, Unix-based**

Expand All @@ -76,6 +100,7 @@ git clone --depth 1 https://github.com/brianhuster/live-preview.nvim "$HOME/AppD
```

You must add the line `require('livepreview').setup()` (Lua) or `lua require('livepreview').setup()` (Vimscript) to your Neovim configuration file to enable the plugin.
</details>

## Setup

Expand Down
30 changes: 30 additions & 0 deletions README.vi.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ https://github.com/user-attachments/assets/e9a64709-8758-44d8-9e3c-9c15e0bf2a0e
## Yêu cầu

- Neovim >=0.10.0
(khuyến nghị: >=0.10.2)
- Một trình duyệt web

## Cài đặt

Bạn có thể cài đặt plugin này bằng một trình quản lý plugin. Dưới đây là một số ví dụ

<details>
<summary>

### Với lazy.nvim
</summary>

```lua
require("lazy").setup({
{
Expand All @@ -41,7 +47,14 @@ require("lazy").setup({
})
```

</details>

<details>
<summary>

### mini.deps
</summary>

```lua
add({
source = 'brianhuster/live-preview.nvim',
Expand All @@ -50,15 +63,29 @@ add({
require('livepreview').setup()
```

</details>

<details>
<summary>

### vim-plug
</summary>

```vim
Plug 'brianhuster/live-preview.nvim'
Plug 'brianhuster/autosave.nvim' " Not required, but recomended for autosaving
let g:livepreview_config = {} " Cấu hình tùy chọn
lua require('livepreview').setup(vim.g.livepreview_config) " Bắt buộc để kích hoạt plugin
```

</details>

<details>
<summary>

### Cài đặt thủ công (không dùng trình quản lý plugin)
</summary>

- **Linux, MacOS, dựa trên Unix**

Expand All @@ -72,6 +99,9 @@ git clone --depth 1 https://github.com/brianhuster/live-preview.nvim ~/.config/n
git clone --depth 1 https://github.com/brianhuster/live-preview.nvim "$HOME/AppData/Local/nvim/pack/brianhuster/start/live-preview.nvim"
```

Bạn phải thêm dòng `require('livepreview').setup()` (Lua) hoặc `lua require('livepreview').setup()` (Vimscript) vào tệp cấu hình Neovim của bạn để kích hoạt plugin.
</details>

## Tùy chỉnh

Bạn có thể tùy chỉnh plugin bằng cách đưa 1 bảng vào biến `opts` (với lazy.nvim) hoặc hàm `require('livepreview`).setup()`. Dưới đây là cấu hình mặc định
Expand Down

0 comments on commit cb62043

Please sign in to comment.