Compare commits
73 Commits
Author | SHA1 | Date | |
---|---|---|---|
23410a4594 | |||
c737f2b6c2 | |||
78354a1e5e | |||
080ea29354 | |||
3d7238f753 | |||
a43d1b79f2 | |||
bd1ba54d13 | |||
9f2010a8b9 | |||
e09423b28c | |||
2525b91313 | |||
a213da4430 | |||
b57582bc91 | |||
d41ef05cc0 | |||
dfde622847 | |||
44df7434d4 | |||
049e323714 | |||
7d96b07c6f | |||
ad229bbf42 | |||
cbf1d335ed | |||
6ebf3ab084 | |||
25d37a2cdd | |||
7409fef291 | |||
3f5c2c283e | |||
f51719a12d | |||
ea4858874b | |||
c42ebc216a | |||
bdddb215cc | |||
eb143ebe11 | |||
86ac9989ea | |||
dc1d48f436 | |||
5202a0f006 | |||
7b9145c12d | |||
3e46dd61cd | |||
43763a6226 | |||
6c334fed6a | |||
d18331ca89 | |||
59f3b3e096 | |||
4fbb7a2803 | |||
b760ec63c4 | |||
d565684ade | |||
c7aeda9db1 | |||
3a718c5c85 | |||
6c86952a0e | |||
ad214af54d | |||
40983a3269 | |||
2f93f69171 | |||
4379ae8ab9 | |||
eb92903342 | |||
03282126e3 | |||
1274310e6d | |||
14e708a246 | |||
437156a3ae | |||
063f8d6dff | |||
d63c471008 | |||
4042614005 | |||
81ab5bed7a | |||
5264909b54 | |||
68c21ec452 | |||
7fe0d5c7c7 | |||
342fa02370 | |||
ac1051686b | |||
55cc8b67fc | |||
1d2c97cbda | |||
0b8c799a7a | |||
1caa27ba4a | |||
3518c1d73b | |||
ae8c371ff4 | |||
17fe32e428 | |||
ef21bea975 | |||
38ad79d548 | |||
95b86c8d1d | |||
01a1b8e80d | |||
06c38c52a9 |
195
CHANGELOG.md
195
CHANGELOG.md
@ -1,5 +1,200 @@
|
||||
# Changelog
|
||||
|
||||
## [3.3.0](https://github.com/LazyVim/LazyVim/compare/v3.2.0...v3.3.0) (2023-05-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **telescope:** added `<a-c>` mapping for telescope pickers to switch to cwd instead of root ([c737f2b](https://github.com/LazyVim/LazyVim/commit/c737f2b6c265d2c82cebf9f999425a2bd008e692))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **telescope:** keep current prompt when switching to hidden/no_ignore ([78354a1](https://github.com/LazyVim/LazyVim/commit/78354a1e5e88c68a9d99b72af5a0844befee419b))
|
||||
|
||||
## [3.2.0](https://github.com/LazyVim/LazyVim/compare/v3.1.0...v3.2.0) (2023-05-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **noice:** enable the inc_rename preset when inc_rename is availble ([a43d1b7](https://github.com/LazyVim/LazyVim/commit/a43d1b79f29deecc694bd409ab497f8a62091b11))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **mini:** lazy now supports mini plugins out of the box. no longer needed to have a custom config ([bd1ba54](https://github.com/LazyVim/LazyVim/commit/bd1ba54d1347c1f340db896f25e43c8591365512))
|
||||
|
||||
## [3.1.0](https://github.com/LazyVim/LazyVim/compare/v3.0.0...v3.1.0) (2023-05-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **noice:** send written notifications to the mini view instead of notify ([2525b91](https://github.com/LazyVim/LazyVim/commit/2525b913139c6ca288677126d1451b9683bbac1f))
|
||||
* **noice:** use noice's improved entry doc view for cmp ([a213da4](https://github.com/LazyVim/LazyVim/commit/a213da4430c1012bf7278080cbdc03a236e8230f))
|
||||
|
||||
## [3.0.0](https://github.com/LazyVim/LazyVim/compare/v2.13.1...v3.0.0) (2023-05-12)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **mini.comment:** removed ts-context-commentstring since mini.comment provides this functionality out of the box
|
||||
|
||||
### Features
|
||||
|
||||
* **mini.comment:** removed ts-context-commentstring since mini.comment provides this functionality out of the box ([d41ef05](https://github.com/LazyVim/LazyVim/commit/d41ef05cc00bf3502fb55512c265a02116127ca8))
|
||||
|
||||
## [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)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **tsserver:** set some tsserver formatting settings to their Neovim equivalents. Also used for organize imports ([eb92903](https://github.com/LazyVim/LazyVim/commit/eb92903342a7ac12185c62bb63b5caa4c80ce7dc))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **copilot:** work-around Neovim bug. Fixes [#656](https://github.com/LazyVim/LazyVim/issues/656) ([4379ae8](https://github.com/LazyVim/LazyVim/commit/4379ae8ab9aec497e58eeae733a0a87c70289570))
|
||||
|
||||
## [2.8.0](https://github.com/LazyVim/LazyVim/compare/v2.7.0...v2.8.0) (2023-04-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **copilot:** better copilot status colors for lualine ([1274310](https://github.com/LazyVim/LazyVim/commit/1274310e6da0de56da92ae8e26c8f388cf314a5b))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove unintentional `<lt>nop>` mapping ([#651](https://github.com/LazyVim/LazyVim/issues/651)) ([14e708a](https://github.com/LazyVim/LazyVim/commit/14e708a24642cf3926b9b74743c192c3b5c63f3e))
|
||||
|
||||
## [2.7.0](https://github.com/LazyVim/LazyVim/compare/v2.6.0...v2.7.0) (2023-04-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **copilot:** added lualine component for copilot. Simple icon colored by status. Will add status message when available (warnings) ([d63c471](https://github.com/LazyVim/LazyVim/commit/d63c4710083cd2bcab104972bd4a6b3d1b80c3c6))
|
||||
|
||||
## [2.6.0](https://github.com/LazyVim/LazyVim/compare/v2.5.0...v2.6.0) (2023-04-20)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **extras:** added project management ([#300](https://github.com/LazyVim/LazyVim/issues/300)) ([7fe0d5c](https://github.com/LazyVim/LazyVim/commit/7fe0d5c7c798e2a1d6abf7d43380876a268ac462))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **project:** load on VeryLazy otherwise projects wont be loaded when opening Telescope ([5264909](https://github.com/LazyVim/LazyVim/commit/5264909b542da1c6215e042c62903bb491a2c1eb))
|
||||
|
||||
## [2.5.0](https://github.com/LazyVim/LazyVim/compare/v2.4.3...v2.5.0) (2023-04-19)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **lsp:** added support for setting global lsp client capabilities ([ac10516](https://github.com/LazyVim/LazyVim/commit/ac1051686bcff8377f1d99228bcbe64530ec384a))
|
||||
|
||||
## [2.4.3](https://github.com/LazyVim/LazyVim/compare/v2.4.2...v2.4.3) (2023-04-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **treesitter:** de-duplicate langs in endure_installed. Fixes [#628](https://github.com/LazyVim/LazyVim/issues/628) ([1d2c97c](https://github.com/LazyVim/LazyVim/commit/1d2c97cbda099c76ee132ee5019a3f80fd88f8ed))
|
||||
|
||||
## [2.4.2](https://github.com/LazyVim/LazyVim/compare/v2.4.1...v2.4.2) (2023-04-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **diagnostics:** deepcopy diagnostic params. Fixes [#621](https://github.com/LazyVim/LazyVim/issues/621) ([1caa27b](https://github.com/LazyVim/LazyVim/commit/1caa27ba4acb04ebbc64a91de242574790dcf92f))
|
||||
|
||||
## [2.4.1](https://github.com/LazyVim/LazyVim/compare/v2.4.0...v2.4.1) (2023-04-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **lsp:** properly check that diagnostics virtual_text is a table. Fixes [#618](https://github.com/LazyVim/LazyVim/issues/618) ([17fe32e](https://github.com/LazyVim/LazyVim/commit/17fe32e428bbade6f91770814e8748425bfc01a2))
|
||||
|
||||
## [2.4.0](https://github.com/LazyVim/LazyVim/compare/v2.3.0...v2.4.0) (2023-04-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **dap:** add more keybindings and lualine component ([#612](https://github.com/LazyVim/LazyVim/issues/612)) ([38ad79d](https://github.com/LazyVim/LazyVim/commit/38ad79d5485c083afdb04b1fb9f9683403a6d7bd))
|
||||
* **diagnostics:** added support for setting prefix = "icons". Check the docs on how to enable ([01a1b8e](https://github.com/LazyVim/LazyVim/commit/01a1b8e80db55963f281cf36674cf1c174e2f50e))
|
||||
* **diagnostics:** show diagnostics source when more than one source is reporting diagnostics ([06c38c5](https://github.com/LazyVim/LazyVim/commit/06c38c52a91bb1dcc2dec2d79d6e13606324be77))
|
||||
|
||||
## [2.3.0](https://github.com/LazyVim/LazyVim/compare/v2.2.1...v2.3.0) (2023-04-17)
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 17
|
||||
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 May 18
|
||||
|
||||
==============================================================================
|
||||
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
|
||||
|
@ -93,9 +93,7 @@ return {
|
||||
{
|
||||
"echasnovski/mini.pairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("mini.pairs").setup(opts)
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- surround
|
||||
@ -130,27 +128,13 @@ return {
|
||||
update_n_lines = "gzn", -- Update `n_lines`
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
-- use gz mappings instead of s to prevent conflict with leap
|
||||
require("mini.surround").setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
-- 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 = {},
|
||||
},
|
||||
|
||||
-- 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" },
|
||||
@ -153,10 +166,14 @@ return {
|
||||
return require("trouble.providers.telescope").open_selected_with_trouble(...)
|
||||
end,
|
||||
["<a-i>"] = function()
|
||||
Util.telescope("find_files", { no_ignore = true })()
|
||||
local action_state = require("telescope.actions.state")
|
||||
local line = action_state.get_current_line()
|
||||
Util.telescope("find_files", { no_ignore = true, default_text = line })()
|
||||
end,
|
||||
["<a-h>"] = function()
|
||||
Util.telescope("find_files", { hidden = true })()
|
||||
local action_state = require("telescope.actions.state")
|
||||
local line = action_state.get_current_line()
|
||||
Util.telescope("find_files", { hidden = true, default_text = line })()
|
||||
end,
|
||||
["<C-Down>"] = function(...)
|
||||
return require("telescope.actions").cycle_history_next(...)
|
||||
|
@ -10,6 +10,34 @@ return {
|
||||
panel = { enabled = false },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
local Util = require("lazyvim.util")
|
||||
local colors = {
|
||||
[""] = Util.fg("Special"),
|
||||
["Normal"] = Util.fg("Special"),
|
||||
["Warning"] = Util.fg("DiagnosticError"),
|
||||
["InProgress"] = Util.fg("DiagnosticWarn"),
|
||||
}
|
||||
table.insert(opts.sections.lualine_x, 2, {
|
||||
function()
|
||||
local icon = require("lazyvim.config").icons.kinds.Copilot
|
||||
local status = require("copilot.api").status.data
|
||||
return icon .. (status.message or "")
|
||||
end,
|
||||
cond = function()
|
||||
local ok, clients = pcall(vim.lsp.get_active_clients, { name = "copilot", bufnr = 0 })
|
||||
return ok and #clients > 0
|
||||
end,
|
||||
color = function()
|
||||
local status = require("copilot.api").status.data
|
||||
return colors[status.status] or colors[""]
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- copilot cmp source
|
||||
{
|
||||
@ -26,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,
|
||||
@ -38,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 = {
|
||||
|
@ -8,7 +8,8 @@ return {
|
||||
"rcarriga/nvim-dap-ui",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" }
|
||||
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
|
||||
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
|
||||
},
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
@ -69,14 +70,22 @@ return {
|
||||
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
|
||||
{ "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
|
||||
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
|
||||
{ "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
|
||||
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
|
||||
{ "<leader>dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
|
||||
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to line (no execute)" },
|
||||
{ "<leader>di", function() require("dap").step_into() end, desc = "Step Into" },
|
||||
{ "<leader>dj", function() require("dap").down() end, desc = "Down" },
|
||||
{ "<leader>dk", function() require("dap").up() end, desc = "Up" },
|
||||
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
|
||||
{ "<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.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" },
|
||||
{ "<leader>dr", function() require("dap").repl.open() end, desc = "Repl" },
|
||||
},
|
||||
|
||||
config = function()
|
||||
|
32
lua/lazyvim/plugins/extras/lang/tailwind.lua
Normal file
32
lua/lazyvim/plugins/extras/lang/tailwind.lua
Normal file
@ -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,
|
||||
},
|
||||
}
|
@ -20,6 +20,20 @@ return {
|
||||
---@type lspconfig.options.tsserver
|
||||
tsserver = {
|
||||
settings = {
|
||||
typescript = {
|
||||
format = {
|
||||
indentSize = vim.o.shiftwidth,
|
||||
convertTabsToSpaces = vim.o.expandtab,
|
||||
tabSize = vim.o.tabstop,
|
||||
},
|
||||
},
|
||||
javascript = {
|
||||
format = {
|
||||
indentSize = vim.o.shiftwidth,
|
||||
convertTabsToSpaces = vim.o.expandtab,
|
||||
tabSize = vim.o.tabstop,
|
||||
},
|
||||
},
|
||||
completions = {
|
||||
completeFunctionCalls = true,
|
||||
},
|
||||
|
@ -33,8 +33,5 @@ return {
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("mini.animate").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
30
lua/lazyvim/plugins/extras/util/project.lua
Normal file
30
lua/lazyvim/plugins/extras/util/project.lua
Normal file
@ -0,0 +1,30 @@
|
||||
return {
|
||||
{
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
-- project management
|
||||
{
|
||||
"ahmedkhalf/project.nvim",
|
||||
opts = {},
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("project_nvim").setup(opts)
|
||||
require("telescope").load_extension("projects")
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>fp", "<Cmd>Telescope projects<CR>", desc = "Projects" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
opts = function(_, dashboard)
|
||||
local button = dashboard.button("p", " " .. " Projects", ":Telescope projects <CR>")
|
||||
button.opts.hl = "AlphaButtons"
|
||||
button.opts.hl_shortcut = "AlphaShortcut"
|
||||
table.insert(dashboard.section.buttons.val, 4, button)
|
||||
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,
|
||||
|
@ -21,9 +21,18 @@ return {
|
||||
diagnostics = {
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
virtual_text = { spacing = 4, prefix = "●" },
|
||||
virtual_text = {
|
||||
spacing = 4,
|
||||
source = "if_many",
|
||||
prefix = "●",
|
||||
-- this will set set the prefix to a function that returns the diagnostics icon based on the severity
|
||||
-- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
|
||||
-- prefix = "icons",
|
||||
},
|
||||
severity_sort = true,
|
||||
},
|
||||
-- add any global capabilities here
|
||||
capabilities = {},
|
||||
-- Automatically format on save
|
||||
autoformat = true,
|
||||
-- options for vim.lsp.buf.format
|
||||
@ -66,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)
|
||||
@ -79,10 +89,29 @@ return {
|
||||
name = "DiagnosticSign" .. name
|
||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||
end
|
||||
vim.diagnostic.config(opts.diagnostics)
|
||||
|
||||
if type(opts.diagnostics.virtual_text) == "table" and opts.diagnostics.virtual_text.prefix == "icons" then
|
||||
opts.diagnostics.virtual_text.prefix = vim.fn.has("nvim-0.10.0") == 0 and "●"
|
||||
or function(diagnostic)
|
||||
local icons = require("lazyvim.config").icons.diagnostics
|
||||
for d, icon in pairs(icons) do
|
||||
if diagnostic.severity == vim.diagnostic.severity[d:upper()] then
|
||||
return icon
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
vim.diagnostic.config(vim.deepcopy(opts.diagnostics))
|
||||
|
||||
local servers = opts.servers
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
local capabilities = vim.tbl_deep_extend(
|
||||
"force",
|
||||
{},
|
||||
vim.lsp.protocol.make_client_capabilities(),
|
||||
require("cmp_nvim_lsp").default_capabilities(),
|
||||
opts.capabilities or {}
|
||||
)
|
||||
|
||||
local function setup(server)
|
||||
local server_opts = vim.tbl_deep_extend("force", {
|
||||
@ -125,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,
|
||||
},
|
||||
|
||||
|
@ -34,7 +34,6 @@ return {
|
||||
opts = {
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
context_commentstring = { enable = true, enable_autocmd = false },
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
@ -60,13 +59,24 @@ return {
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = "<nop>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
},
|
||||
---@param opts TSConfig
|
||||
config = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
---@type table<string, boolean>
|
||||
local added = {}
|
||||
opts.ensure_installed = vim.tbl_filter(function(lang)
|
||||
if added[lang] then
|
||||
return false
|
||||
end
|
||||
added[lang] = true
|
||||
return true
|
||||
end, opts.ensure_installed)
|
||||
end
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
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)
|
||||
@ -85,14 +89,7 @@ return {
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
local icons = require("lazyvim.config").icons
|
||||
|
||||
local function fg(name)
|
||||
return function()
|
||||
---@type {foreground?:number}?
|
||||
local hl = vim.api.nvim_get_hl_by_name(name, true)
|
||||
return hl and hl.foreground and { fg = string.format("#%06x", hl.foreground) }
|
||||
end
|
||||
end
|
||||
local Util = require("lazyvim.util")
|
||||
|
||||
return {
|
||||
options = {
|
||||
@ -126,15 +123,21 @@ return {
|
||||
{
|
||||
function() return require("noice").api.status.command.get() end,
|
||||
cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end,
|
||||
color = fg("Statement")
|
||||
color = Util.fg("Statement"),
|
||||
},
|
||||
-- stylua: ignore
|
||||
{
|
||||
function() return require("noice").api.status.mode.get() end,
|
||||
cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end,
|
||||
color = fg("Constant") ,
|
||||
color = Util.fg("Constant"),
|
||||
},
|
||||
{ require("lazy.status").updates, cond = require("lazy.status").has_updates, color = fg("Special") },
|
||||
-- stylua: ignore
|
||||
{
|
||||
function() return " " .. require("dap").status() end,
|
||||
cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end,
|
||||
color = Util.fg("Debug"),
|
||||
},
|
||||
{ require("lazy.status").updates, cond = require("lazy.status").has_updates, color = Util.fg("Special") },
|
||||
{
|
||||
"diff",
|
||||
symbols = {
|
||||
@ -166,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,
|
||||
},
|
||||
@ -190,9 +193,6 @@ return {
|
||||
end,
|
||||
})
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("mini.indentscope").setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
-- noicer ui
|
||||
@ -215,12 +215,23 @@ return {
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
["cmp.entry.get_documentation"] = true,
|
||||
},
|
||||
},
|
||||
routes = {
|
||||
{
|
||||
filter = {
|
||||
event = "msg_show",
|
||||
find = "%d+L, %d+B",
|
||||
},
|
||||
view = "mini",
|
||||
},
|
||||
},
|
||||
presets = {
|
||||
bottom_search = true,
|
||||
command_palette = true,
|
||||
long_message_to_split = true,
|
||||
inc_rename = true,
|
||||
},
|
||||
},
|
||||
-- stylua: ignore
|
||||
|
@ -215,7 +215,7 @@ To use this, add it to your **lazy.nvim** imports:
|
||||
```lua title="lua/config/lazy.lua" {4}
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
{ "folke/LazyVim", import = "lazyvim.plugins" },
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
{ import = "%s" },
|
||||
{ import = "plugins" },
|
||||
},
|
||||
|
@ -20,6 +20,13 @@ function M.has(plugin)
|
||||
return require("lazy.core.config").plugins[plugin] ~= nil
|
||||
end
|
||||
|
||||
function M.fg(name)
|
||||
---@type {foreground?:number}?
|
||||
local hl = vim.api.nvim_get_hl and vim.api.nvim_get_hl(0, { name = name }) or vim.api.nvim_get_hl_by_name(name, true)
|
||||
local fg = hl and hl.fg or hl.foreground
|
||||
return fg and { fg = string.format("#%06x", fg) }
|
||||
end
|
||||
|
||||
---@param fn fun()
|
||||
function M.on_very_lazy(fn)
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
@ -98,6 +105,20 @@ function M.telescope(builtin, opts)
|
||||
builtin = "find_files"
|
||||
end
|
||||
end
|
||||
if opts.cwd and opts.cwd ~= vim.loop.cwd() then
|
||||
opts.attach_mappings = function(_, map)
|
||||
map("i", "<a-c>", function()
|
||||
local action_state = require("telescope.actions.state")
|
||||
local line = action_state.get_current_line()
|
||||
M.telescope(
|
||||
params.builtin,
|
||||
vim.tbl_deep_extend("force", {}, params.opts or {}, { cwd = false, default_text = line })
|
||||
)()
|
||||
end)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
require("telescope.builtin")[builtin](opts)
|
||||
end
|
||||
end
|
||||
@ -189,4 +210,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
|
||||
|
Reference in New Issue
Block a user