Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
03282126e3 | |||
1274310e6d | |||
14e708a246 | |||
437156a3ae | |||
063f8d6dff | |||
d63c471008 | |||
4042614005 | |||
81ab5bed7a | |||
5264909b54 | |||
68c21ec452 | |||
7fe0d5c7c7 | |||
342fa02370 | |||
ac1051686b | |||
55cc8b67fc | |||
1d2c97cbda | |||
0b8c799a7a | |||
1caa27ba4a |
52
CHANGELOG.md
52
CHANGELOG.md
@ -1,5 +1,57 @@
|
||||
# Changelog
|
||||
|
||||
## [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)
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 19
|
||||
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 April 21
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
@ -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 clients = vim.lsp.get_active_clients({ name = "copilot", bufnr = 0 })
|
||||
return #clients > 0
|
||||
end,
|
||||
color = function()
|
||||
local status = require("copilot.api").status.data
|
||||
return colors[status.status] or colors[""]
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- copilot cmp source
|
||||
{
|
||||
|
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,
|
||||
},
|
||||
}
|
@ -31,6 +31,8 @@ return {
|
||||
},
|
||||
severity_sort = true,
|
||||
},
|
||||
-- add any global capabilities here
|
||||
capabilities = {},
|
||||
-- Automatically format on save
|
||||
autoformat = true,
|
||||
-- options for vim.lsp.buf.format
|
||||
@ -99,10 +101,16 @@ return {
|
||||
end
|
||||
end
|
||||
|
||||
vim.diagnostic.config(opts.diagnostics)
|
||||
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", {
|
||||
|
@ -60,13 +60,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,
|
||||
},
|
||||
|
@ -85,14 +85,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 = {
|
||||
@ -122,25 +115,25 @@ return {
|
||||
},
|
||||
},
|
||||
lualine_x = {
|
||||
-- stylua: ignore
|
||||
{
|
||||
function() return " " .. require("dap").status() end,
|
||||
cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end,
|
||||
color = fg("Debug"),
|
||||
},
|
||||
-- stylua: ignore
|
||||
{
|
||||
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 = {
|
||||
|
@ -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", {
|
||||
|
Reference in New Issue
Block a user