Compare commits

..

17 Commits

Author SHA1 Message Date
e996eed750 chore(main): release 10.5.0 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-19 20:14:17 +02:00
8df44b3bb5 feat(typescript): added remove unused imports () 2023-10-19 20:12:48 +02:00
82da2440e4 fix(nvim-ts-autotag): make it actually work :) 2023-10-19 19:54:36 +02:00
fad3777296 fix(tabnine): run :CmpTabnineHub automatically on build () 2023-10-19 07:54:19 +02:00
ea3155aef6 fix(conform): allow overriding all conform format options. Fixes 2023-10-19 07:52:47 +02:00
98b51a608c style(dashboard): make layout exactly the same as before 2023-10-19 07:52:47 +02:00
0ac8f6fb3b fix(treesitter-context): set default max_lines=3 2023-10-19 07:52:47 +02:00
b8c7e70c80 chore(build): auto-generate vimdoc 2023-10-19 05:45:44 +00:00
d73aee4a93 feat(dashboard): remove unnecessary brackets from keys () 2023-10-19 07:45:03 +02:00
ae77bfda89 chore(main): release 10.4.4 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-18 13:11:54 +02:00
5c8cefaf40 chore(build): auto-generate vimdoc 2023-10-18 09:39:39 +00:00
7d8b3e8ef9 fix(project): don't let project.nvim change the cwd. Leads to too much confusion 2023-10-18 11:38:57 +02:00
0e12b00743 chore(main): release 10.4.3 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-18 00:06:46 +02:00
2e308d5440 fix(neotest): better integration with trouble: no longer steals focus and hides when all ok 2023-10-18 00:04:28 +02:00
5c1656729a fix(dashboard): config shortcut when opening dashboard again. Fixes 2023-10-17 18:28:06 +02:00
ian
1d4fbd3b2e fix(keymaps): let keymap n and N opens folds ()
It's strange that mappings to n and N do not open folds like its original behavior, so I append `zv` to manually open folds.
2023-10-17 18:03:34 +02:00
b0ded5c015 fix(dot): treesitter langs in dot extra were not added 2023-10-17 16:33:55 +02:00
12 changed files with 105 additions and 29 deletions

@ -1,5 +1,37 @@
# Changelog
## [10.5.0](https://github.com/LazyVim/LazyVim/compare/v10.4.4...v10.5.0) (2023-10-19)
### Features
* **dashboard:** remove unnecessary brackets from keys ([#1791](https://github.com/LazyVim/LazyVim/issues/1791)) ([d73aee4](https://github.com/LazyVim/LazyVim/commit/d73aee4a934b0aa12e07039da9e2df0215ba2cba))
### Bug Fixes
* **conform:** allow overriding all conform format options. Fixes [#1790](https://github.com/LazyVim/LazyVim/issues/1790) ([ea3155a](https://github.com/LazyVim/LazyVim/commit/ea3155aef6d47e744cb2b4a7a3b567288d780f8d))
* **nvim-ts-autotag:** make it actually work :) ([82da244](https://github.com/LazyVim/LazyVim/commit/82da2440e4c9d7e604cf998aee0655f78ddfdd5c))
* **tabnine:** run `:CmpTabnineHub` automatically on build ([#1788](https://github.com/LazyVim/LazyVim/issues/1788)) ([fad3777](https://github.com/LazyVim/LazyVim/commit/fad37772967f06c65d6f0b52c2ea6f190b3218ee))
* **treesitter-context:** set default max_lines=3 ([0ac8f6f](https://github.com/LazyVim/LazyVim/commit/0ac8f6fb3b1705c2b675a0e3cbee4968370f047a))
## [10.4.4](https://github.com/LazyVim/LazyVim/compare/v10.4.3...v10.4.4) (2023-10-18)
### Bug Fixes
* **project:** don't let `project.nvim` change the cwd. Leads to too much confusion ([7d8b3e8](https://github.com/LazyVim/LazyVim/commit/7d8b3e8ef96f91f96c8e3a0ba62dfab270debf9f))
## [10.4.3](https://github.com/LazyVim/LazyVim/compare/v10.4.2...v10.4.3) (2023-10-17)
### Bug Fixes
* **dashboard:** config shortcut when opening dashboard again. Fixes [#1768](https://github.com/LazyVim/LazyVim/issues/1768) ([5c16567](https://github.com/LazyVim/LazyVim/commit/5c1656729aeb39fbb8dc29d4f3d6d86d0836f8b4))
* **dot:** treesitter langs in dot extra were not added ([b0ded5c](https://github.com/LazyVim/LazyVim/commit/b0ded5c015a68f07a32fab64a2cd0f27f4d69870))
* **keymaps:** let keymap n and N opens folds ([#1298](https://github.com/LazyVim/LazyVim/issues/1298)) ([1d4fbd3](https://github.com/LazyVim/LazyVim/commit/1d4fbd3b2e48eaae448073af020ca2617ab7bd5c))
* **neotest:** better integration with trouble: no longer steals focus and hides when all ok ([2e308d5](https://github.com/LazyVim/LazyVim/commit/2e308d5440c830bb37531d03a0313af3a5c94bb5))
## [10.4.2](https://github.com/LazyVim/LazyVim/compare/v10.4.1...v10.4.2) (2023-10-17)

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2023 October 17
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2023 October 19
==============================================================================
Table of Contents *LazyVim-table-of-contents*

@ -3,7 +3,7 @@ local Util = require("lazyvim.util")
---@class LazyVimConfig: LazyVimOptions
local M = {}
M.version = "10.4.2" -- x-release-please-version
M.version = "10.5.0" -- x-release-please-version
---@class LazyVimOptions
local defaults = {

@ -50,10 +50,10 @@ map(
)
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
map("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
map("n", "n", "'Nn'[v:searchforward].'zv'", { expr = true, desc = "Next search result" })
map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
map("o", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
map("n", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
map("n", "N", "'nN'[v:searchforward].'zv'", { expr = true, desc = "Prev search result" })
map("x", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
map("o", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })

@ -5,10 +5,12 @@ return {
{
"nvim-cmp",
dependencies = {
-- Add TabNine support, make sure you run :CmpTabnineHub after installation.
{
"tzachar/cmp-tabnine",
build = Util.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh",
build = {
Util.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh",
":CmpTabnineHub",
},
dependencies = "hrsh7th/nvim-cmp",
opts = {
max_lines = 1000,

@ -32,6 +32,19 @@ return {
end,
desc = "Organize Imports",
},
{
"<leader>cR",
function()
vim.lsp.buf.code_action({
apply = true,
context = {
only = { "source.removeUnused.ts" },
diagnostics = {},
},
})
end,
desc = "Remove Unused Imports",
},
},
settings = {
typescript = {

@ -27,7 +27,7 @@ return {
quickfix = {
open = function()
if require("lazyvim.util").has("trouble.nvim") then
vim.cmd("Trouble quickfix")
require("trouble").open({ mode = "quickfix", focus = false })
else
vim.cmd("copen")
end
@ -46,6 +46,37 @@ return {
},
}, neotest_ns)
if require("lazyvim.util").has("trouble.nvim") then
opts.consumers = opts.consumers or {}
-- Refresh and auto close trouble after running tests
---@type neotest.Consumer
opts.consumers.trouble = function(client)
client.listeners.results = function(adapter_id, results, partial)
if partial then
return
end
local tree = assert(client:get_position(nil, { adapter = adapter_id }))
local failed = 0
for pos_id, result in pairs(results) do
if result.status == "failed" and tree:get_key(pos_id) then
failed = failed + 1
end
end
vim.schedule(function()
local trouble = require("trouble")
if trouble.is_open() then
trouble.refresh()
if failed == 0 then
trouble.close()
end
end
end)
return {}
end
end
end
if opts.adapters then
local adapters = {}
for name, config in pairs(opts.adapters or {}) do

@ -37,7 +37,7 @@ return {
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
local function add(lang)
if type(opts.ensure_installed) ~= "table" then
if type(opts.ensure_installed) == "table" then
table.insert(opts.ensure_installed, lang)
end
end

@ -5,7 +5,9 @@ return {
-- project management
{
"ahmedkhalf/project.nvim",
opts = {},
opts = {
manual_mode = true,
},
event = "VeryLazy",
config = function(_, opts)
require("project_nvim").setup(opts)

@ -2,9 +2,6 @@ local Util = require("lazyvim.util")
local M = {}
---@type ConformOpts
local conform_opts = {}
---@param opts ConformOpts
function M.setup(_, opts)
for name, formatter in pairs(opts.formatters or {}) do
@ -29,7 +26,6 @@ function M.setup(_, opts)
opts[key] = nil
end
end
conform_opts = opts
require("conform").setup(opts)
end
@ -57,11 +53,10 @@ return {
priority = 100,
primary = true,
format = function(buf)
require("conform").format(Util.merge({
timeout_ms = conform_opts.format.timeout_ms,
async = conform_opts.format.async,
quiet = conform_opts.format.quiet,
}, { bufnr = buf }))
local plugin = require("lazy.core.config").plugins["conform.nvim"]
local Plugin = require("lazy.core.plugin")
local opts = Plugin.values(plugin, "opts", false)
require("conform").format(Util.merge(opts.format, { bufnr = buf }))
end,
sources = function(buf)
local ret = require("conform").list_formatters(buf)

@ -109,7 +109,7 @@ return {
"nvim-treesitter/nvim-treesitter-context",
event = "LazyFile",
enabled = true,
opts = { mode = "cursor" },
opts = { mode = "cursor", max_lines = 3 },
keys = {
{
"<leader>ut",
@ -131,7 +131,7 @@ return {
-- Automatically add closing tags for HTML and JSX
{
"windwp/nvim-ts-autotag",
event = "InsertEnter",
event = "LazyFile",
opts = {},
},
}

@ -371,15 +371,15 @@ return {
header = vim.split(logo, "\n"),
-- stylua: ignore
center = {
{ action = "Telescope find_files", desc = " Find file", icon = "", key = "f" },
{ action = "ene | startinsert", desc = " New file", icon = "", key = "n" },
{ action = "Telescope oldfiles", desc = " Recent files", icon = "", key = "r" },
{ action = "Telescope live_grep", desc = " Find text", icon = "", key = "g" },
{ action = Util.telescope.config_files(), desc = " Config", icon = "", key = "c" },
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = "", key = "s" },
{ action = "LazyExtras", desc = " Lazy Extras", icon = "", key = "x" },
{ action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" },
{ action = "qa", desc = " Quit", icon = "", key = "q" },
{ action = "Telescope find_files", desc = " Find file", icon = "", key = "f" },
{ action = "ene | startinsert", desc = " New file", icon = "", key = "n" },
{ action = "Telescope oldfiles", desc = " Recent files", icon = "", key = "r" },
{ action = "Telescope live_grep", desc = " Find text", icon = "", key = "g" },
{ action = [[lua require("lazyvim.util").telescope.config_files()()]], desc = " Config", icon = "", key = "c" },
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = "", key = "s" },
{ action = "LazyExtras", desc = " Lazy Extras", icon = "", key = "x" },
{ action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" },
{ action = "qa", desc = " Quit", icon = "", key = "q" },
},
footer = function()
local stats = require("lazy").stats()
@ -391,6 +391,7 @@ return {
for _, button in ipairs(opts.config.center) do
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
button.key_format = " %s"
end
-- close Lazy and re-open when the dashboard is ready