Skip to content

Commit

Permalink
Merge branch 'LazyVim:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
anjotadena authored Jan 13, 2024
2 parents 65637c2 + 879e295 commit 96735a3
Show file tree
Hide file tree
Showing 83 changed files with 6,099 additions and 1,082 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: kdheepak/panvimdoc@main
with:
vimdoc: LazyVim
version: "Neovim >= 0.8.0"
version: "Neovim >= 0.9.0"
demojify: true
treesitter: true
- name: Push changes
Expand All @@ -59,6 +59,8 @@ jobs:
with:
release-type: simple
package-name: LazyVim
extra-files: |
lua/lazyvim/config/init.lua
- uses: actions/checkout@v3
- name: tag stable versions
if: ${{ steps.release.outputs.release_created }}
Expand Down
1,024 changes: 1,018 additions & 6 deletions CHANGELOG.md

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# What's new?

## 10.x

- User extras under `lua/plugins/extras` can now also be managed
with **LazyExtras**

- `nvim-ts-autotag` is now included by default

- `nvim-treesitter-context` is now included by default

- Added extra for `symbols-outline.nvim`

- Added extra for `aerial.nvim`

- `nvim-navic` has been removed. If you want to keep using `nvim-navic`,
you can enable the **editor.navic** extra

- New `:LazyExtras` command for managing **LazyVim** extras

- Improved **formatting**:

- **LazyVim** can now work with multiple formatters. Types:

- **primary**: only one primary formatter can be active at a time.
_(conform, none-ls, LSP)_
- **secondary**: multiple secondary formatters can be active _(eslint, ...)_

- **LazyVim** automatically selects the primary formatter based on the
current available sources and priorities.

- New `:LazyFormat` command for formatting the current selection or buffer
- New `:LazyFormatInfo` command for displaying the active formatters
for the current buffer
- Auto-formatting can be disabled with:

```lua
vim.g.autoformat = false -- globally
vim.b.autoformat = false -- buffer-local
```

- `none-ls.nvim` is no longer installed by default

- `conform.nvim` is now the default formatter
- `nvim-lint` is now the default linter
- If you want to keep using `none-ls.nvim`,
you can enable the **lsp.none-ls** extra

- `dashboard.nvim` is the new default dashboard plugin

- If you want to keep using `alpha.nvim`, you can enable the **ui.alpha** extra

- Improved **root detection**:

- New `:LazyRoot` command that shows info about the root dir detection
- Configurable with `vim.g.root_spec`

```lua
-- LazyVim root dir detection
-- Each entry can be:
-- * the name of a detector function like `lsp` or `cwd`
-- * a pattern or array of patterns like `.git` or `lua`.
-- * a function with signature `function(buf) -> string|string[]`
vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }

-- To disable root detection set to just "cwd"
vim.g.root_spec = { "cwd" }
```
3 changes: 2 additions & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ LazyVim 提供了两全其美的方式 - 根据需要调整配置的灵活性,

## ⚡️ 要求

- Neovim >= **0.8.0** (需要用 **LuaJIT** 构建)
- Neovim >= **0.9.0** (需要用 **LuaJIT** 构建)
- Git >= **2.19.0** (用于部分克隆支持)
- 一个 [Nerd Font](https://www.nerdfonts.com/) 字体 **_(可选)_**
- 一个用于 `nvim-treesitter`**C** 编译器。看 [这里](https://github.com/nvim-treesitter/nvim-treesitter#requirements)

## 🚀 入门

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ to tweak your config as needed, along with the convenience of a pre-configured s

## ⚡️ Requirements

- Neovim >= **0.8.0** (needs to be built with **LuaJIT**)
- Neovim >= **0.9.0** (needs to be built with **LuaJIT**)
- Git >= **2.19.0** (for partial clones support)
- a [Nerd Font](https://www.nerdfonts.com/) **_(optional)_**
- a **C** compiler for `nvim-treesitter`. See [here](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
Expand Down
4 changes: 2 additions & 2 deletions doc/LazyVim.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 June 24
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2023 November 30

==============================================================================
Table of Contents *LazyVim-table-of-contents*
Expand Down Expand Up @@ -52,7 +52,7 @@ FEATURES *LazyVim-features*

REQUIREMENTS *LazyVim-requirements*

- Neovim >= **0.8.0** (needs to be built with **LuaJIT**)
- Neovim >= **0.9.0** (needs to be built with **LuaJIT**)
- Git >= **2.19.0** (for partial clones support)
- a Nerd Font <https://www.nerdfonts.com/> **(optional)**
- a **C** compiler for `nvim-treesitter`. See here <https://github.com/nvim-treesitter/nvim-treesitter#requirements>
Expand Down
17 changes: 13 additions & 4 deletions lua/lazyvim/config/autocmds.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- This file is automatically loaded by lazyvim.config.init
-- This file is automatically loaded by lazyvim.config.init.

local function augroup(name)
return vim.api.nvim_create_augroup("lazyvim_" .. name, { clear = true })
Expand All @@ -22,16 +22,24 @@ vim.api.nvim_create_autocmd("TextYankPost", {
vim.api.nvim_create_autocmd({ "VimResized" }, {
group = augroup("resize_splits"),
callback = function()
local current_tab = vim.fn.tabpagenr()
vim.cmd("tabdo wincmd =")
vim.cmd("tabnext " .. current_tab)
end,
})

-- go to last loc when opening a buffer
vim.api.nvim_create_autocmd("BufReadPost", {
group = augroup("last_loc"),
callback = function()
local mark = vim.api.nvim_buf_get_mark(0, '"')
local lcount = vim.api.nvim_buf_line_count(0)
callback = function(event)
local exclude = { "gitcommit" }
local buf = event.buf
if vim.tbl_contains(exclude, vim.bo[buf].filetype) or vim.b[buf].lazyvim_last_loc then
return
end
vim.b[buf].lazyvim_last_loc = true
local mark = vim.api.nvim_buf_get_mark(buf, '"')
local lcount = vim.api.nvim_buf_line_count(buf)
if mark[1] > 0 and mark[1] <= lcount then
pcall(vim.api.nvim_win_set_cursor, 0, mark)
end
Expand All @@ -48,6 +56,7 @@ vim.api.nvim_create_autocmd("FileType", {
"man",
"notify",
"qf",
"query",
"spectre_panel",
"startuptime",
"tsplayground",
Expand Down
Loading

0 comments on commit 96735a3

Please sign in to comment.