Compare commits

..

32 Commits

Author SHA1 Message Date
dfde622847 chore(main): release 2.13.1 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-12 17:05:10 +02:00
44df7434d4 perf(comment): removed nvim-ts-context-commentstring, since mini.comment now handles that internally 2023-05-12 17:03:16 +02:00
049e323714 fix(copilot): removed special handling of copilot in cmp. no longer needed 2023-05-12 17:01:10 +02:00
7d96b07c6f chore(build): auto-generate vimdoc 2023-05-12 14:47:08 +00:00
ad229bbf42 fix(copilot): latest copilot-cmp requires passing opts to _on_insert_enter () 2023-05-12 16:46:21 +02:00
cbf1d335ed chore(build): auto-generate vimdoc 2023-05-08 16:57:02 +00:00
6ebf3ab084 fix(icons): updated a dap icon 2023-05-08 18:56:18 +02:00
25d37a2cdd chore(main): release 2.13.0 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-04 18:32:55 +02:00
7409fef291 chore(build): auto-generate vimdoc 2023-05-04 16:28:28 +00:00
3f5c2c283e feat(extras): added extra for tailwindcss 2023-05-04 18:27:36 +02:00
f51719a12d chore(build): auto-generate vimdoc 2023-05-02 19:30:33 +00:00
DYY
ea4858874b fix(mason): exclude filetype mason in indent-blankline.nvim () 2023-05-02 21:29:52 +02:00
c42ebc216a chore(main): release 2.12.1 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-28 15:26:43 +02:00
bdddb215cc chore(build): auto-generate vimdoc 2023-04-28 09:48:21 +00:00
eb143ebe11 fix(format): only do null-ls formatting logic when null-ls is availble. Fixes 2023-04-28 11:47:37 +02:00
86ac9989ea chore(build): auto-generate vimdoc 2023-04-25 07:13:27 +00:00
dc1d48f436 style: Change description of notify.dismiss() binding () 2023-04-25 09:12:41 +02:00
5202a0f006 chore(main): release 2.12.0 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-24 20:47:45 +02:00
7b9145c12d fix(spectre): use new url by default 2023-04-24 08:45:40 +02:00
3e46dd61cd feat(bufferline): use mini.bufremove to close a buffer ()
* feat(bufferline): use `mini.bufremove` to close a buffer

* fix(bufferline): don't force remove buffers

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-04-24 08:40:57 +02:00
43763a6226 chore(build): auto-generate vimdoc 2023-04-24 06:39:25 +00:00
6c334fed6a feat(telescope): added keymap for recent files in the current directory. ()
* Support MRU in current directory.

* Update editor.lua

* fix(telescope): use cwd for oldfiles for consistency with other commands

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-04-24 08:38:42 +02:00
d18331ca89 chore(main): release 2.11.0 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-23 11:21:54 +02:00
59f3b3e096 feat(plugins): automatically handle plugin repo renames 2023-04-23 11:20:02 +02:00
J
4fbb7a2803 fix(health): remove deprecated api warning () 2023-04-23 11:04:05 +02:00
b760ec63c4 chore(build): auto-generate vimdoc 2023-04-23 09:02:33 +00:00
d565684ade feat(lsp): automatically resolve denols/tsserver conflicts if both are configured 2023-04-23 11:01:46 +02:00
c7aeda9db1 chore(build): auto-generate vimdoc 2023-04-22 21:07:31 +00:00
3a718c5c85 feat(dap): Change DAP REPL binding from open to toggle () 2023-04-22 23:06:55 +02:00
6c86952a0e chore(main): release 2.10.0 ()
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-21 23:53:51 +02:00
ad214af54d feat(neo-tree): refresh neotree git status when closing a lazygit terminal 2023-04-21 23:42:30 +02:00
40983a3269 fix(copilot): re-enable copilot confirm with overwrite 2023-04-21 23:42:30 +02:00
13 changed files with 181 additions and 43 deletions

@ -1,5 +1,77 @@
# Changelog
## [2.13.1](https://github.com/LazyVim/LazyVim/compare/v2.13.0...v2.13.1) (2023-05-12)
### Bug Fixes
* **copilot:** latest copilot-cmp requires passing opts to _on_insert_enter ([#752](https://github.com/LazyVim/LazyVim/issues/752)) ([ad229bb](https://github.com/LazyVim/LazyVim/commit/ad229bbf42125c23b933575e7540f7302f128d35))
* **copilot:** removed special handling of copilot in cmp. no longer needed ([049e323](https://github.com/LazyVim/LazyVim/commit/049e323714a56200e220384a2fe618b5bff631d2))
* **icons:** updated a dap icon ([6ebf3ab](https://github.com/LazyVim/LazyVim/commit/6ebf3ab084361b47796840fb6f7fe00cd05dfeb4))
### Performance Improvements
* **comment:** removed nvim-ts-context-commentstring, since mini.comment now handles that internally ([44df743](https://github.com/LazyVim/LazyVim/commit/44df7434d4320d27672cca937e594efbf1e021ba))
## [2.13.0](https://github.com/LazyVim/LazyVim/compare/v2.12.1...v2.13.0) (2023-05-04)
### Features
* **extras:** added extra for tailwindcss ([3f5c2c2](https://github.com/LazyVim/LazyVim/commit/3f5c2c283e30f7b4c4c290d7a731e7dfbc86d8b8))
### Bug Fixes
* **mason:** exclude filetype mason in indent-blankline.nvim ([#701](https://github.com/LazyVim/LazyVim/issues/701)) ([ea48588](https://github.com/LazyVim/LazyVim/commit/ea4858874b983e4b3a8a7078828d98533e386035))
## [2.12.1](https://github.com/LazyVim/LazyVim/compare/v2.12.0...v2.12.1) (2023-04-28)
### Bug Fixes
* **format:** only do null-ls formatting logic when null-ls is availble. Fixes [#684](https://github.com/LazyVim/LazyVim/issues/684) ([eb143eb](https://github.com/LazyVim/LazyVim/commit/eb143ebe110995fb208fc480958a55858944c5f9))
## [2.12.0](https://github.com/LazyVim/LazyVim/compare/v2.11.0...v2.12.0) (2023-04-24)
### Features
* **bufferline:** use `mini.bufremove` to close a buffer ([#670](https://github.com/LazyVim/LazyVim/issues/670)) ([3e46dd6](https://github.com/LazyVim/LazyVim/commit/3e46dd61cdc79bbb915f81e4188fc5337cd2f84b))
* **telescope:** added keymap for recent files in the current directory. ([#669](https://github.com/LazyVim/LazyVim/issues/669)) ([6c334fe](https://github.com/LazyVim/LazyVim/commit/6c334fed6a59f6b1dc3a38f6253f2b4265557f30))
### Bug Fixes
* **spectre:** use new url by default ([7b9145c](https://github.com/LazyVim/LazyVim/commit/7b9145c12d15a81e40a721974a9a68994ccd8855))
## [2.11.0](https://github.com/LazyVim/LazyVim/compare/v2.10.0...v2.11.0) (2023-04-23)
### Features
* **dap:** Change DAP REPL binding from open to toggle ([#663](https://github.com/LazyVim/LazyVim/issues/663)) ([3a718c5](https://github.com/LazyVim/LazyVim/commit/3a718c5c85e966e2751dade0006dcbeed72e8b00))
* **lsp:** automatically resolve denols/tsserver conflicts if both are configured ([d565684](https://github.com/LazyVim/LazyVim/commit/d565684ade6e04eb77319ddb5becac9c5bd21cc4))
* **plugins:** automatically handle plugin repo renames ([59f3b3e](https://github.com/LazyVim/LazyVim/commit/59f3b3e096280629a459054bc5538c058854dffc))
### Bug Fixes
* **health:** remove deprecated api warning ([#666](https://github.com/LazyVim/LazyVim/issues/666)) ([4fbb7a2](https://github.com/LazyVim/LazyVim/commit/4fbb7a280310a6ea500509aa73a4f7c7d06f6bea))
## [2.10.0](https://github.com/LazyVim/LazyVim/compare/v2.9.0...v2.10.0) (2023-04-21)
### Features
* **neo-tree:** refresh neotree git status when closing a lazygit terminal ([ad214af](https://github.com/LazyVim/LazyVim/commit/ad214af54d47e67aa8be46ae12cbe7c71da0c0bf))
### Bug Fixes
* **copilot:** re-enable copilot confirm with overwrite ([40983a3](https://github.com/LazyVim/LazyVim/commit/40983a326952e24512f0eacc5b524337044ed3ff))
## [2.9.0](https://github.com/LazyVim/LazyVim/compare/v2.8.0...v2.9.0) (2023-04-21)

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 21
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 May 12
==============================================================================
Table of Contents *LazyVim-table-of-contents*
@ -43,7 +43,6 @@ pre-configured setup.
FEATURES *LazyVim-features*
- Transform your Neovim into a full-fledged IDE
- Easily customize and extend your config with lazy.nvim <https://github.com/folke/lazy.nvim>
- Blazingly fast
@ -53,7 +52,6 @@ FEATURES *LazyVim-features*
REQUIREMENTS *LazyVim-requirements*
- Neovim >= **0.8.0** (needs to be built with **LuaJIT**)
- Git >= **2.19.0** (for partial clones support)
- a Nerd Font <https://www.nerdfonts.com/> **(optional)**
@ -77,7 +75,6 @@ Try it with Docker ~
Install the LazyVim Starter ~
- Make a backup of your current Neovim files:
>sh
mv ~/.config/nvim ~/.config/nvim.bak

@ -20,7 +20,7 @@ local defaults = {
-- icons used by other plugins
icons = {
dap = {
Stopped = { " ", "DiagnosticWarn", "DapStoppedLine" },
Stopped = { "󰁕 ", "DiagnosticWarn", "DapStoppedLine" },
Breakpoint = "",
BreakpointCondition = "",
BreakpointRejected = { "", "DiagnosticError" },
@ -77,6 +77,10 @@ local defaults = {
},
}
M.renames = {
["windwp/nvim-spectre"] = "nvim-pack/nvim-spectre",
}
---@type LazyVimConfig
local options
@ -170,6 +174,14 @@ function M.init()
-- this is needed to make sure options will be correctly applied
-- after installing missing plugins
require("lazyvim.config").load("options")
local Plugin = require("lazy.core.plugin")
local add = Plugin.Spec.add
Plugin.Spec.add = function(self, plugin, ...)
if type(plugin) == "table" and M.renames[plugin[1]] then
plugin[1] = M.renames[plugin[1]]
end
return add(self, plugin, ...)
end
end
end

@ -1,12 +1,17 @@
local M = {}
local start = vim.health.start or vim.health.report_start
local ok = vim.health.ok or vim.health.report_ok
local warn = vim.health.warn or vim.health.report_warn
local error = vim.health.error or vim.health.report_error
function M.check()
vim.health.report_start("LazyVim")
start("LazyVim")
if vim.fn.has("nvim-0.8.0") == 1 then
vim.health.report_ok("Using Neovim >= 0.8.0")
ok("Using Neovim >= 0.8.0")
else
vim.health.report_error("Neovim >= 0.8.0 is required")
error("Neovim >= 0.8.0 is required")
end
for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit" }) do
@ -23,9 +28,9 @@ function M.check()
end
if found then
vim.health.report_ok(("`%s` is installed"):format(name))
ok(("`%s` is installed"):format(name))
else
vim.health.report_warn(("`%s` is not installed"):format(name))
warn(("`%s` is not installed"):format(name))
end
end
end

@ -137,20 +137,11 @@ return {
},
-- comments
{ "JoosepAlviste/nvim-ts-context-commentstring", lazy = true },
{
"echasnovski/mini.comment",
event = "VeryLazy",
opts = {
hooks = {
pre = function()
require("ts_context_commentstring.internal").update_commentstring({})
end,
},
},
config = function(_, opts)
require("mini.comment").setup(opts)
end,
opts = {},
main = "mini.comment",
},
-- better text-objects

@ -40,6 +40,7 @@ return {
filesystem = {
bind_to_cwd = false,
follow_current_file = true,
use_libuv_file_watcher = true,
},
window = {
mappings = {
@ -55,11 +56,22 @@ return {
},
},
},
config = function(_, opts)
require("neo-tree").setup(opts)
vim.api.nvim_create_autocmd("TermClose", {
pattern = "*lazygit",
callback = function()
if package.loaded["neo-tree.sources.git_status"] then
require("neo-tree.sources.git_status").refresh()
end
end,
})
end,
},
-- search/replace in multiple files
{
"windwp/nvim-spectre",
"nvim-pack/nvim-spectre",
-- stylua: ignore
keys = {
{ "<leader>sr", function() require("spectre").open() end, desc = "Replace in files (Spectre)" },
@ -81,6 +93,7 @@ return {
{ "<leader>ff", Util.telescope("files"), desc = "Find Files (root dir)" },
{ "<leader>fF", Util.telescope("files", { cwd = false }), desc = "Find Files (cwd)" },
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent" },
{ "<leader>fR", Util.telescope("oldfiles", { cwd = vim.loop.cwd() }), desc = "Recent (cwd)" },
-- git
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "commits" },
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "status" },

@ -54,7 +54,7 @@ return {
-- fixes lazy-loading issues with the copilot cmp source
require("lazyvim.util").on_attach(function(client)
if client.name == "copilot" then
copilot_cmp._on_insert_enter()
copilot_cmp._on_insert_enter({})
end
end)
end,
@ -66,21 +66,6 @@ return {
table.insert(opts.sources, 1, { name = "copilot", group_index = 2 })
local confirm = opts.mapping["<CR>"]
local confirm_copilot = cmp.mapping.confirm({
select = true,
behavior = cmp.ConfirmBehavior.Replace,
})
opts.mapping = vim.tbl_extend("force", opts.mapping, {
["<CR>"] = function(...)
local entry = cmp.get_selected_entry()
if entry and entry.source.name == "copilot" then
-- return confirm_copilot(...)
end
return confirm(...)
end,
})
opts.sorting = {
priority_weight = 2,
comparators = {

@ -82,7 +82,7 @@ return {
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out" },
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
{ "<leader>dp", function() require("dap").pause() end, desc = "Pause" },
{ "<leader>dr", function() require("dap").repl.open() end, desc = "Repl" },
{ "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
{ "<leader>ds", function() require("dap").session() end, desc = "Session" },
{ "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },
{ "<leader>dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" },

@ -0,0 +1,32 @@
return {
{
"neovim/nvim-lspconfig",
opts = {
servers = {
tailwindcss = {},
},
},
},
{
"NvChad/nvim-colorizer.lua",
opts = {
user_default_options = {
tailwind = true,
},
},
},
{
"hrsh7th/nvim-cmp",
dependencies = {
{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
},
opts = function(_, opts)
-- original LazyVim kind icon formatter
local format_kinds = opts.formatting.format
opts.formatting.format = function(entry, item)
format_kinds(entry, item) -- add icons
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
end
end,
},
}

@ -25,7 +25,8 @@ function M.format(opts)
return
end
local ft = vim.bo[buf].filetype
local have_nls = #require("null-ls.sources").get_available(ft, "NULL_LS_FORMATTING") > 0
local have_nls = package.loaded["null-ls"]
and (#require("null-ls.sources").get_available(ft, "NULL_LS_FORMATTING") > 0)
vim.lsp.buf.format(vim.tbl_deep_extend("force", {
bufnr = buf,

@ -75,10 +75,11 @@ return {
},
---@param opts PluginLspOpts
config = function(_, opts)
local Util = require("lazyvim.util")
-- setup autoformat
require("lazyvim.plugins.lsp.format").autoformat = opts.autoformat
-- setup formatting and keymaps
require("lazyvim.util").on_attach(function(client, buffer)
Util.on_attach(function(client, buffer)
require("lazyvim.plugins.lsp.format").on_attach(client, buffer)
require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer)
end)
@ -153,6 +154,14 @@ return {
mlsp.setup({ ensure_installed = ensure_installed })
mlsp.setup_handlers({ setup })
end
if Util.lsp_get_config("denols") and Util.lsp_get_config("tsserver") then
local is_deno = require("lspconfig.util").root_pattern("deno.json", "deno.jsonc")
Util.lsp_disable("tsserver", is_deno)
Util.lsp_disable("denols", function(root_dir)
return not is_deno(root_dir)
end)
end
end,
},

@ -8,7 +8,7 @@ return {
function()
require("notify").dismiss({ silent = true, pending = true })
end,
desc = "Delete all Notifications",
desc = "Dismiss all Notifications",
},
},
opts = {
@ -59,6 +59,10 @@ return {
},
opts = {
options = {
-- stylua: ignore
close_command = function(n) require("mini.bufremove").delete(n, false) end,
-- stylua: ignore
right_mouse_command = function(n) require("mini.bufremove").delete(n, false) end,
diagnostics = "nvim_lsp",
always_show_bufferline = false,
diagnostics_indicator = function(_, _, diag)
@ -165,7 +169,7 @@ return {
opts = {
-- char = "▏",
char = "",
filetype_exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy" },
filetype_exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
show_trailing_blankline_indent = false,
show_current_context = false,
},

@ -196,4 +196,21 @@ function M.lazy_notify()
timer:start(500, 0, replay)
end
function M.lsp_get_config(server)
local configs = require("lspconfig.configs")
return rawget(configs, server)
end
---@param server string
---@param cond fun( root_dir, config): boolean
function M.lsp_disable(server, cond)
local util = require("lspconfig.util")
local def = M.lsp_get_config(server)
def.document_config.on_new_config = util.add_hook_before(def.document_config.on_new_config, function(config, root_dir)
if cond(root_dir, config) then
config.enabled = false
end
end)
end
return M