Compare commits

..

11 Commits

Author SHA1 Message Date
8b0e6ab19e chore(main): release 1.9.4 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-16 13:29:41 +01:00
27248b0193 chore(build): auto-generate vimdoc 2023-02-15 13:04:31 +00:00
d198a19325 fix(health): also check for fdfind instead of just fd. Fixes 2023-02-15 14:03:46 +01:00
b64d980bbf chore(main): release 1.9.3 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-14 22:04:39 +01:00
5d6f0d58d5 fix(notify): install notify when noice is not enabled 2023-02-14 21:56:09 +01:00
cc3070d30e faet(util): added Util.on_very_lazy 2023-02-14 21:55:52 +01:00
e91903e810 chore(build): auto-generate vimdoc 2023-02-14 13:41:28 +00:00
38eb3bf115 fix(which-key): only add noice group when noice is enabled 2023-02-14 14:40:34 +01:00
2e18998c9e chore(main): release 1.9.2 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-12 16:52:20 +01:00
a3aeb27cbc fix(format): nil check 2023-02-12 12:31:43 +01:00
fab6150da9 fix(format): dont format if client capaibilities disabled it. 2023-02-12 11:43:31 +01:00
7 changed files with 74 additions and 8 deletions

@ -1,5 +1,28 @@
# Changelog
## [1.9.4](https://github.com/LazyVim/LazyVim/compare/v1.9.3...v1.9.4) (2023-02-15)
### Bug Fixes
* **health:** also check for fdfind instead of just fd. Fixes [#270](https://github.com/LazyVim/LazyVim/issues/270) ([d198a19](https://github.com/LazyVim/LazyVim/commit/d198a193256429e401fbec7fa8ac7a46de06f07b))
## [1.9.3](https://github.com/LazyVim/LazyVim/compare/v1.9.2...v1.9.3) (2023-02-14)
### Bug Fixes
* **notify:** install notify when noice is not enabled ([5d6f0d5](https://github.com/LazyVim/LazyVim/commit/5d6f0d58d5daf2f87ea9f0a49170103925d1b528))
* **which-key:** only add noice group when noice is enabled ([38eb3bf](https://github.com/LazyVim/LazyVim/commit/38eb3bf115f1b550e853a04545932fad3fbffe5b))
## [1.9.2](https://github.com/LazyVim/LazyVim/compare/v1.9.1...v1.9.2) (2023-02-12)
### Bug Fixes
* **format:** dont format if client capaibilities disabled it. [#249](https://github.com/LazyVim/LazyVim/issues/249) ([fab6150](https://github.com/LazyVim/LazyVim/commit/fab6150da919a094614752f95f5fe4e7f55832f8))
* **format:** nil check ([a3aeb27](https://github.com/LazyVim/LazyVim/commit/a3aeb27cbc2fa1f19d525b97ebb4cc1a56c7c538))
## [1.9.1](https://github.com/LazyVim/LazyVim/compare/v1.9.0...v1.9.1) (2023-02-12)

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 12
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 February 15
==============================================================================
Table of Contents *LazyVim-table-of-contents*

@ -9,11 +9,23 @@ function M.check()
vim.health.report_error("Neovim >= 0.8.0 is required")
end
for _, cmd in ipairs({ "git", "rg", "fd", "lazygit" }) do
if vim.fn.executable(cmd) == 1 then
vim.health.report_ok(("`%s` is installed"):format(cmd))
for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit" }) do
local name = type(cmd) == "string" and cmd or vim.inspect(cmd)
local commands = type(cmd) == "string" and { cmd } or cmd
---@cast commands string[]
local found = false
for _, c in ipairs(commands) do
if vim.fn.executable(c) == 1 then
name = c
found = true
end
end
if found then
vim.health.report_ok(("`%s` is installed"):format(name))
else
vim.health.report_warn(("`%s` is not installed"):format(cmd))
vim.health.report_warn(("`%s` is not installed"):format(name))
end
end
end

@ -176,7 +176,7 @@ return {
config = function(_, opts)
local wk = require("which-key")
wk.setup(opts)
wk.register({
local keymaps = {
mode = { "n", "v" },
["g"] = { name = "+goto" },
["gz"] = { name = "+surround" },
@ -190,11 +190,14 @@ return {
["<leader>gh"] = { name = "+hunks" },
["<leader>q"] = { name = "+quit/session" },
["<leader>s"] = { name = "+search" },
["<leader>sn"] = { name = "+noice" },
["<leader>u"] = { name = "+ui" },
["<leader>w"] = { name = "+windows" },
["<leader>x"] = { name = "+diagnostics/quickfix" },
})
}
if Util.has("noice.nvim") then
keymaps["<leader>sn"] = { name = "+noice" }
end
wk.register(keymaps)
end,
},

@ -38,6 +38,15 @@ function M.format()
end
function M.on_attach(client, buf)
-- dont format if client disabled it
if
client.config
and client.config.capabilities
and client.config.capabilities.documentFormattingProvider == false
then
return
end
if client.supports_method("textDocument/formatting") then
vim.api.nvim_create_autocmd("BufWritePre", {
group = vim.api.nvim_create_augroup("LspFormat." .. buf, {}),

@ -20,6 +20,15 @@ return {
return math.floor(vim.o.columns * 0.75)
end,
},
init = function()
-- when noice is not enabled, install notify on VeryLazy
local Util = require("lazyvim.util")
if not Util.has("noice.nvim") then
Util.on_very_lazy(function()
vim.notify = require("notify")
end)
end
end,
},
-- better vim.ui

@ -20,6 +20,16 @@ function M.has(plugin)
return require("lazy.core.config").plugins[plugin] ~= nil
end
---@param fn fun()
function M.on_very_lazy(fn)
vim.api.nvim_create_autocmd("User", {
pattern = "VeryLazy",
callback = function()
fn()
end,
})
end
---@param name string
function M.opts(name)
local plugin = require("lazy.core.config").plugins[name]