Compare commits

..

17 Commits

Author SHA1 Message Date
03282126e3 chore(main): release 2.8.0 (#652)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-21 09:25:43 +02:00
1274310e6d feat(copilot): better copilot status colors for lualine 2023-04-21 09:24:12 +02:00
14e708a246 fix: remove unintentional <lt>nop> mapping (#651) 2023-04-21 09:21:34 +02:00
437156a3ae chore(main): release 2.7.0 (#650)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-21 08:59:45 +02:00
063f8d6dff chore(build): auto-generate vimdoc 2023-04-21 06:47:24 +00:00
d63c471008 feat(copilot): added lualine component for copilot. Simple icon colored by status. Will add status message when available (warnings) 2023-04-21 08:46:45 +02:00
4042614005 refactor: move lualine fg function to Util 2023-04-21 08:46:05 +02:00
81ab5bed7a chore(main): release 2.6.0 (#638)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-20 09:27:37 +02:00
5264909b54 fix(project): load on VeryLazy otherwise projects wont be loaded when opening Telescope 2023-04-20 08:29:22 +02:00
68c21ec452 chore(build): auto-generate vimdoc 2023-04-20 06:15:00 +00:00
7fe0d5c7c7 feat(extras): added project management (#300)
* feat(project): add project management

* refactor: moved project to extras

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-04-20 08:14:21 +02:00
342fa02370 chore(main): release 2.5.0 (#635)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-19 20:04:23 +02:00
ac1051686b feat(lsp): added support for setting global lsp client capabilities 2023-04-19 19:58:05 +02:00
55cc8b67fc chore(main): release 2.4.3 (#630)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-19 17:07:32 +02:00
1d2c97cbda fix(treesitter): de-duplicate langs in endure_installed. Fixes #628 2023-04-19 16:45:02 +02:00
0b8c799a7a chore(main): release 2.4.2 (#623)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-19 07:52:26 +02:00
1caa27ba4a fix(diagnostics): deepcopy diagnostic params. Fixes #621 2023-04-19 07:49:39 +02:00
8 changed files with 150 additions and 21 deletions

View File

@ -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;lt&gt;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)

View File

@ -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*

View File

@ -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
{

View 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,
},
}

View File

@ -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", {

View File

@ -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,
},

View File

@ -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 = {

View File

@ -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", {