mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Merge branch 'main' into php
This commit is contained in:
commit
676cc45b33
8 changed files with 27 additions and 70 deletions
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
|
|
@ -1 +1,5 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Ask a question or start a discussion
|
||||
url: https://github.com/LazyVim/LazyVim/discussions
|
||||
about: Use Github discussions instead
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 08
|
||||
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 09
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
|
|
|||
|
|
@ -46,4 +46,8 @@ return {
|
|||
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
||||
},
|
||||
},
|
||||
{
|
||||
"garymjr/nvim-snippets",
|
||||
enabled = false,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ return {
|
|||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "angular", "scss" })
|
||||
end
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
|
||||
pattern = { "*.component.html", "*.container.html" },
|
||||
callback = function()
|
||||
vim.treesitter.start(nil, "angular")
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ return {
|
|||
})
|
||||
end,
|
||||
|
||||
{ "towolf/vim-helm", ft = "helm" },
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = { ensure_installed = { "helm" } },
|
||||
|
|
|
|||
|
|
@ -120,11 +120,10 @@ return {
|
|||
{
|
||||
"nvim-neotest/neotest",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
opts.adapters = opts.adapters or {}
|
||||
vim.list_extend(opts.adapters, {
|
||||
require("rustaceanvim.neotest"),
|
||||
})
|
||||
end,
|
||||
opts = {
|
||||
adapters = {
|
||||
["rustaceanvim.neotest"] = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,53 +48,20 @@ return {
|
|||
else
|
||||
LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`")
|
||||
end
|
||||
local Signs = require("octo.ui.signs")
|
||||
|
||||
---@type {buf: number, from: number, to: number, dirty: boolean}[]
|
||||
local signs = {}
|
||||
|
||||
local unplace = Signs.unplace
|
||||
function Signs.unplace(bufnr)
|
||||
signs = vim.tbl_filter(function(s)
|
||||
return s.buf ~= bufnr
|
||||
end, signs)
|
||||
return unplace(bufnr)
|
||||
end
|
||||
|
||||
function Signs.place_signs(bufnr, start_line, end_line, is_dirty)
|
||||
signs[#signs + 1] = { buf = bufnr, from = start_line, to = end_line, dirty = is_dirty }
|
||||
end
|
||||
-- stylua: ignore
|
||||
local corners = {
|
||||
top = "┌╴",
|
||||
middle = "│ ",
|
||||
last = "└╴",
|
||||
single = "[ ",
|
||||
}
|
||||
|
||||
--- Fixes octo's comment rendering to take wrapping into account
|
||||
---@param buf number
|
||||
---@param lnum number
|
||||
---@param vnum number
|
||||
---@param win number
|
||||
table.insert(LazyVim.ui.virtual, function(buf, lnum, vnum, win)
|
||||
lnum = lnum - 1
|
||||
for _, s in ipairs(signs) do
|
||||
if buf == s.buf and lnum >= s.from and lnum <= s.to then
|
||||
local height = vim.api.nvim_win_text_height(win, { start_row = s.from, end_row = s.to }).all
|
||||
local height_end = vim.api.nvim_win_text_height(win, { start_row = s.to, end_row = s.to }).all
|
||||
local corner = corners.middle
|
||||
if height == 1 then
|
||||
corner = corners.single
|
||||
elseif lnum == s.from and vnum == 0 then
|
||||
corner = corners.top
|
||||
elseif lnum == s.to and vnum == height_end - 1 then
|
||||
corner = corners.last
|
||||
-- Keep some empty windows in sessions
|
||||
vim.api.nvim_create_autocmd("ExitPre", {
|
||||
group = vim.api.nvim_create_augroup("octo_exit_pre", { clear = true }),
|
||||
callback = function(ev)
|
||||
local keep = { "octo" }
|
||||
for _, win in ipairs(vim.api.nvim_list_wins()) do
|
||||
local buf = vim.api.nvim_win_get_buf(win)
|
||||
if vim.tbl_contains(keep, vim.bo[buf].filetype) then
|
||||
vim.bo[buf].buftype = "" -- set buftype to empty to keep the window
|
||||
end
|
||||
return { { text = corner, texthl = s.dirty and "OctoDirty" or "IblScope" } }
|
||||
end
|
||||
end
|
||||
end)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
---@class lazyvim.util.ui
|
||||
local M = {}
|
||||
|
||||
---@type (fun(buf:number, lnum:number, vnum:number, win:number):Sign[]?)[]
|
||||
M.virtual = {}
|
||||
|
||||
---@alias Sign {name:string, text:string, texthl:string, priority:number}
|
||||
|
||||
-- Returns a list of regular and extmark signs sorted by priority (low to high)
|
||||
|
|
@ -108,21 +105,9 @@ function M.statuscolumn()
|
|||
if show_signs then
|
||||
local signs = M.get_signs(buf, vim.v.lnum)
|
||||
|
||||
local has_virtual = false
|
||||
for _, fn in ipairs(M.virtual) do
|
||||
local virtual = fn(buf, vim.v.lnum, vim.v.virtnum, win)
|
||||
if virtual then
|
||||
has_virtual = true
|
||||
vim.list_extend(signs, virtual)
|
||||
end
|
||||
end
|
||||
|
||||
---@type Sign?,Sign?,Sign?
|
||||
local left, right, fold, githl
|
||||
for _, s in ipairs(signs) do
|
||||
if s.name and s.name:lower():find("^octo_clean") then
|
||||
s.texthl = "IblScope"
|
||||
end
|
||||
if s.name and (s.name:find("GitSign") or s.name:find("MiniDiffSign")) then
|
||||
right = s
|
||||
if use_githl then
|
||||
|
|
@ -132,9 +117,6 @@ function M.statuscolumn()
|
|||
left = s
|
||||
end
|
||||
end
|
||||
if vim.v.virtnum ~= 0 and not has_virtual then
|
||||
left = nil
|
||||
end
|
||||
|
||||
vim.api.nvim_win_call(win, function()
|
||||
if vim.fn.foldclosed(vim.v.lnum) >= 0 then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue