Compare commits

..

10 Commits

Author SHA1 Message Date
f46316af00 chore(main): release 5.1.0 (#1138)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-16 10:38:07 +02:00
63e898599a feat(lang): add null-ls tools to mason's ensure_installed (#1133) 2023-07-16 08:47:06 +02:00
3a07bd8d2e chore(build): auto-generate vimdoc 2023-07-16 06:42:27 +00:00
69bb89184f feat(neo-tree): update to v3.x and change follow_current_file to a … (#1143)
* feat(neo-tree): update to v3.x and change `follow_current_file` to a table and enable it

* fix(neo-tree): remove nerd font v3 icons

* fix(neo-tree): remove legaccy commands

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-07-16 08:41:45 +02:00
0801e52118 chore(build): auto-generate vimdoc 2023-07-15 07:31:17 +00:00
1b0b6eb0e1 feat(lsp): add 'reuse_win' for reuse window in lsp definition keymap (#1131)
* feat(lsp): add 'reuse_win' for reuse window in lsp definition keymap

* fix: inline telescope require
2023-07-15 09:30:34 +02:00
8c0e39c826 chore(main): release 5.0.0 (#1108)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-13 08:21:44 +02:00
bb2608ecd1 chore(build): auto-generate vimdoc 2023-07-13 06:18:44 +00:00
ae759b947b feat(flash)!: Make flash.nvim the default jump plugin for LazyVim
Use the `editor.leap` extra if you rather want to use leap/flit
2023-07-13 08:18:02 +02:00
9387ab388e feat: added leader-L to show the LazyVim changelog 2023-07-13 08:18:02 +02:00
10 changed files with 150 additions and 126 deletions

View File

@ -1,5 +1,26 @@
# Changelog
## [5.1.0](https://github.com/LazyVim/LazyVim/compare/v5.0.0...v5.1.0) (2023-07-16)
### Features
* **lang:** add null-ls tools to mason's ensure_installed ([#1133](https://github.com/LazyVim/LazyVim/issues/1133)) ([63e8985](https://github.com/LazyVim/LazyVim/commit/63e898599a00d8b1832de650ed67f63a44bf22e0))
* **lsp:** add 'reuse_win' for reuse window in lsp definition keymap ([#1131](https://github.com/LazyVim/LazyVim/issues/1131)) ([1b0b6eb](https://github.com/LazyVim/LazyVim/commit/1b0b6eb0e13018196f0110b06149f00f2df5162f))
* **neo-tree:** update to v3.x and change `follow_current_file` to a … ([#1143](https://github.com/LazyVim/LazyVim/issues/1143)) ([69bb891](https://github.com/LazyVim/LazyVim/commit/69bb89184f9297f1377f77a8b6bee2487df6ac00))
## [5.0.0](https://github.com/LazyVim/LazyVim/compare/v4.28.1...v5.0.0) (2023-07-13)
### ⚠ BREAKING CHANGES
* **flash:** Make flash.nvim the default jump plugin for LazyVim
### Features
* added `leader-L` to show the LazyVim changelog ([9387ab3](https://github.com/LazyVim/LazyVim/commit/9387ab388ec43cae0689405fcb21bb4ecf67322c))
* **flash:** Make flash.nvim the default jump plugin for LazyVim ([ae759b9](https://github.com/LazyVim/LazyVim/commit/ae759b947b1ef16d9814fcddfcafe2cdd767bc6a))
## [4.28.1](https://github.com/LazyVim/LazyVim/compare/v4.28.0...v4.28.1) (2023-07-12)

View File

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

View File

@ -128,6 +128,9 @@ if vim.fn.has("nvim-0.9.0") == 1 then
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
end
-- LazyVim Changelog
map("n", "<leader>L", Util.changelog, {desc = "LazyVim Changelog"})
-- floating terminal
local lazyterm = function() Util.float_term(nil, { cwd = Util.get_root() }) end
map("n", "<leader>ft", lazyterm, { desc = "Terminal (root dir)" })

View File

@ -5,6 +5,7 @@ return {
-- file explorer
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
cmd = "Neotree",
keys = {
{
@ -28,7 +29,6 @@ return {
vim.cmd([[Neotree close]])
end,
init = function()
vim.g.neo_tree_remove_legacy_commands = 1
if vim.fn.argc() == 1 then
local stat = vim.loop.fs_stat(vim.fn.argv(0))
if stat and stat.type == "directory" then
@ -41,7 +41,7 @@ return {
open_files_do_not_replace_types = { "terminal", "Trouble", "qf", "Outline" },
filesystem = {
bind_to_cwd = false,
follow_current_file = true,
follow_current_file = { enabled = true },
use_libuv_file_watcher = true,
},
window = {
@ -56,16 +56,6 @@ return {
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
icon = {
folder_empty = "󰜌",
folder_empty_open = "󰜌",
},
git_status = {
symbols = {
renamed = "󰁕",
unstaged = "󰄱",
},
},
},
},
config = function(_, opts)
@ -213,34 +203,76 @@ return {
},
},
-- easily jump to any location and enhanced f/t motions for Leap
{
"ggandor/flit.nvim",
keys = function()
---@type LazyKeys[]
local ret = {}
for _, key in ipairs({ "f", "F", "t", "T" }) do
ret[#ret + 1] = { key, mode = { "n", "x", "o" }, desc = key }
end
return ret
end,
opts = { labeled_modes = "nx" },
},
-- disable old installations of leap and flit. Optional so it doesn't appear under disabled plugins
{
"ggandor/leap.nvim",
enabled = function()
vim.schedule(function()
local Config = require("lazy.core.config")
if Config.spec.disabled["leap.nvim"] or Config.spec.disabled["flit.nvim"] then
require("lazy.core.util").warn(
[[`flash.nvim` is now the default **LazyVim** jump plugin.
**leap.nvim** and **flit.nvim** have been disabled.
Please remove the plugins from your config.
If you rather use leap/flit instead, you can add the leap extra:
`lazyvim.plugins.extras.editor.leap`
]],
{ title = "LazyVim" }
)
end
end)
return false
end,
optional = true,
},
{ "ggandor/flit.nvim", enabled = false, optional = true },
-- Add Flash
{
"folke/flash.nvim",
event = "VeryLazy",
vscode = true,
---@type Flash.Config
opts = {},
-- stylua: ignore
keys = {
{ "s", mode = { "n", "x", "o" }, desc = "Leap forward to" },
{ "S", mode = { "n", "x", "o" }, desc = "Leap backward to" },
{ "gs", mode = { "n", "x", "o" }, desc = "Leap from windows" },
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
{ "S", mode = { "n", "o", "x" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
},
config = function(_, opts)
local leap = require("leap")
for k, v in pairs(opts) do
leap.opts[k] = v
},
-- Flash Telescope config
{
"nvim-telescope/telescope.nvim",
optional = true,
opts = function(_, opts)
if not require("lazyvim.util").has("flash.nvim") then
return
end
leap.add_default_mappings(true)
vim.keymap.del({ "x", "o" }, "x")
vim.keymap.del({ "x", "o" }, "X")
local function flash(prompt_bufnr)
require("flash").jump({
pattern = "^",
label = { after = { 0, 0 } },
search = {
mode = "search",
exclude = {
function(win)
return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "TelescopeResults"
end,
},
},
action = function(match)
local picker = require("telescope.actions.state").get_current_picker(prompt_bufnr)
picker:set_selection(match.pos[1] - 1)
end,
})
end
opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, {
mappings = { n = { s = flash }, i = { ["<c-s>"] = flash } },
})
end,
},

View File

@ -1,83 +1,6 @@
return {
{ "ggandor/leap.nvim", enabled = false },
{ "ggandor/flit.nvim", enabled = false },
{
"folke/flash.nvim",
event = "VeryLazy",
vscode = true,
---@type Flash.Config
opts = {},
keys = {
{
"s",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
{
"S",
mode = { "n", "o", "x" },
function()
require("flash").treesitter()
end,
desc = "Flash Treesitter",
},
{
"r",
mode = "o",
function()
require("flash").remote()
end,
desc = "Remote Flash",
},
{
"R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
{
"<c-s>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
},
{
"nvim-telescope/telescope.nvim",
optional = true,
opts = function(_, opts)
local function flash(prompt_bufnr)
require("flash").jump({
pattern = "^",
label = { after = { 0, 0 } },
search = {
mode = "search",
exclude = {
function(win)
return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "TelescopeResults"
end,
},
},
action = function(match)
local picker = require("telescope.actions.state").get_current_picker(prompt_bufnr)
picker:set_selection(match.pos[1] - 1)
end,
})
end
opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, {
mappings = {
n = { s = flash },
i = { ["<c-s>"] = flash },
},
})
end,
},
}
require("lazy.core.util").warn(
"`flash.nvim` is now the default jump plugin for **LazyVim**.\nPlease remove the `lazyvim.plugins.extras.editor.flash` import from your **lazy** config.",
{ title = "LazyVim" }
)
return {}

View File

@ -0,0 +1,40 @@
return {
-- disable flash
{ "folke/flash.nvim", enabled = false, optional = true },
-- easily jump to any location and enhanced f/t motions for Leap
{
"ggandor/flit.nvim",
enabled = true,
keys = function()
---@type LazyKeys[]
local ret = {}
for _, key in ipairs({ "f", "F", "t", "T" }) do
ret[#ret + 1] = { key, mode = { "n", "x", "o" }, desc = key }
end
return ret
end,
opts = { labeled_modes = "nx" },
},
{
"ggandor/leap.nvim",
enabled = true,
keys = {
{ "s", mode = { "n", "x", "o" }, desc = "Leap forward to" },
{ "S", mode = { "n", "x", "o" }, desc = "Leap backward to" },
{ "gs", mode = { "n", "x", "o" }, desc = "Leap from windows" },
},
config = function(_, opts)
local leap = require("leap")
for k, v in pairs(opts) do
leap.opts[k] = v
end
leap.add_default_mappings(true)
vim.keymap.del({ "x", "o" }, "x")
vim.keymap.del({ "x", "o" }, "X")
end,
},
-- makes some plugins dot-repeatable like leap
{ "tpope/vim-repeat", event = "VeryLazy" },
}

View File

@ -100,7 +100,7 @@ return {
"mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
table.insert(opts.ensure_installed, "delve")
vim.list_extend(opts.ensure_installed, { "gomodifytags", "impl", "gofumpt", "goimports-reviser", "delve" })
end,
},
},

View File

@ -14,11 +14,11 @@ function M.get()
M._keys = {
{ "<leader>cd", vim.diagnostic.open_float, desc = "Line Diagnostics" },
{ "<leader>cl", "<cmd>LspInfo<cr>", desc = "Lsp Info" },
{ "gd", "<cmd>Telescope lsp_definitions<cr>", desc = "Goto Definition", has = "definition" },
{ "gd", function() require("telescope.builtin").lsp_definitions({ reuse_win = true }) end, desc = "Goto Definition", has = "definition" },
{ "gr", "<cmd>Telescope lsp_references<cr>", desc = "References" },
{ "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" },
{ "gI", "<cmd>Telescope lsp_implementations<cr>", desc = "Goto Implementation" },
{ "gy", "<cmd>Telescope lsp_type_definitions<cr>", desc = "Goto T[y]pe Definition" },
{ "gI", function() require("telescope.builtin").lsp_implementations({ reuse_win = true }) end, desc = "Goto Implementation" },
{ "gy", function() require("telescope.builtin").lsp_type_definitions({ reuse_win = true }) end, desc = "Goto T[y]pe Definition" },
{ "K", vim.lsp.buf.hover, desc = "Hover" },
{ "gK", vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" },
{ "<c-k>", vim.lsp.buf.signature_help, mode = "i", desc = "Signature Help", has = "signatureHelp" },

View File

@ -24,7 +24,4 @@ return {
-- library used by other plugins
{ "nvim-lua/plenary.nvim", lazy = true },
-- makes some plugins dot-repeatable like leap
{ "tpope/vim-repeat", event = "VeryLazy" },
}

View File

@ -277,4 +277,12 @@ function M.on_load(name, fn)
end
end
function M.changelog()
local lv = require("lazy.core.config").plugins.LazyVim
local float = require("lazy.util").open(lv.dir .. "/CHANGELOG.md")
vim.wo[float.win].spell = false
vim.wo[float.win].wrap = false
vim.diagnostic.disable(float.buf)
end
return M