Compare commits

..

13 Commits

Author SHA1 Message Date
cce46cd640 chore(main): release 9.1.1 (#1597)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-06 01:02:16 +02:00
337cfdbec4 fix(ui): include extmark signs in signcolumn. Fixes #1596 2023-10-05 23:34:32 +02:00
b2af941290 ci: disable blank issues 2023-10-05 16:33:01 +02:00
f219364656 chore(main): release 9.1.0 (#1592)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-05 16:03:46 +02:00
6f1cdfe4bd feat(dashboard): add projects if enabled (#1595) 2023-10-05 15:59:44 +02:00
1eb019274b fix(options): set default laststatus=3 and set it to 0 before loading dashboard to prevent flickering 2023-10-05 10:43:21 +02:00
d6b56c075e fix(dasboard): disable alpha only once 2023-10-05 09:53:50 +02:00
6f6d587998 chore(build): auto-generate vimdoc 2023-10-05 06:08:38 +00:00
d3e7f7717e fix(tailwind): allow overriding filetypes. Fixes #1590 2023-10-05 08:07:56 +02:00
49b91b6b1f chore(main): release 9.0.2 (#1589)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-04 21:10:17 +02:00
86de423ef0 fix(treesitter): dont enable ]c, [c, ... in diff-mode 2023-10-04 21:00:32 +02:00
0cc80b1b05 fix(autocmds): last_loc autocmd didn't work correctly for first opened file 2023-10-04 20:40:11 +02:00
7272b3e4b5 fix(bufferline): load bufferline on VeryLazy. Fixes #1587 2023-10-04 20:04:56 +02:00
12 changed files with 114 additions and 14 deletions

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1 @@
blank_issues_enabled: false

View File

@ -1,5 +1,35 @@
# Changelog
## [9.1.1](https://github.com/LazyVim/LazyVim/compare/v9.1.0...v9.1.1) (2023-10-05)
### Bug Fixes
* **ui:** include extmark signs in signcolumn. Fixes [#1596](https://github.com/LazyVim/LazyVim/issues/1596) ([337cfdb](https://github.com/LazyVim/LazyVim/commit/337cfdbec43003cb2c269e59b27167aa752bf41f))
## [9.1.0](https://github.com/LazyVim/LazyVim/compare/v9.0.2...v9.1.0) (2023-10-05)
### Features
* **dashboard:** add projects if enabled ([#1595](https://github.com/LazyVim/LazyVim/issues/1595)) ([6f1cdfe](https://github.com/LazyVim/LazyVim/commit/6f1cdfe4bd2ec9a85c92a312fa52ba86e02d1a9f))
### Bug Fixes
* **dasboard:** disable alpha only once ([d6b56c0](https://github.com/LazyVim/LazyVim/commit/d6b56c075e88ce12e9e16fb2eeeea38fb7853600))
* **options:** set default laststatus=3 and set it to 0 before loading dashboard to prevent flickering ([1eb0192](https://github.com/LazyVim/LazyVim/commit/1eb019274b5564e66ac6c7e119c140bae262e10c))
* **tailwind:** allow overriding filetypes. Fixes [#1590](https://github.com/LazyVim/LazyVim/issues/1590) ([d3e7f77](https://github.com/LazyVim/LazyVim/commit/d3e7f7717e960bb883b35e9a75badfd5b938cace))
## [9.0.2](https://github.com/LazyVim/LazyVim/compare/v9.0.1...v9.0.2) (2023-10-04)
### Bug Fixes
* **autocmds:** last_loc autocmd didn't work correctly for first opened file ([0cc80b1](https://github.com/LazyVim/LazyVim/commit/0cc80b1b0594516ccc2c1e6c9a60c84012a29abb))
* **bufferline:** load bufferline on VeryLazy. Fixes [#1587](https://github.com/LazyVim/LazyVim/issues/1587) ([7272b3e](https://github.com/LazyVim/LazyVim/commit/7272b3e4b5b626597658dabf774998057892d066))
* **treesitter:** dont enable ]c, [c, ... in diff-mode ([86de423](https://github.com/LazyVim/LazyVim/commit/86de423ef029abd085531e18b197a5f90e201d98))
## [9.0.1](https://github.com/LazyVim/LazyVim/compare/v9.0.0...v9.0.1) (2023-10-04)

View File

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 October 04
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 October 05
==============================================================================
Table of Contents *LazyVim-table-of-contents*

View File

@ -32,6 +32,9 @@ vim.api.nvim_create_autocmd({ "VimResized" }, {
vim.api.nvim_create_autocmd("BufReadPost", {
group = augroup("last_loc"),
callback = function(event)
if event.data and event.data.lazy_file then
return
end
local exclude = { "gitcommit" }
local buf = event.buf
if vim.tbl_contains(exclude, vim.bo[buf].filetype) then

View File

@ -168,9 +168,10 @@ function M.lazy_file()
pattern = event.pattern,
modeline = false,
buffer = event.buf,
data = event.data,
data = { lazy_file = true },
})
end
vim.api.nvim_exec_autocmds("CursorMoved", { modeline = false })
events = {}
end

View File

@ -16,7 +16,7 @@ opt.grepformat = "%f:%l:%c:%m"
opt.grepprg = "rg --vimgrep"
opt.ignorecase = true -- Ignore case
opt.inccommand = "nosplit" -- preview incremental substitute
opt.laststatus = 0
opt.laststatus = 3 -- global statusline
opt.list = true -- Show some invisible characters (tabs...
opt.mouse = "a" -- Enable mouse mode
opt.number = true -- Print line number

View File

@ -4,16 +4,30 @@ return {
opts = {
servers = {
tailwindcss = {
-- exclude a filetype from the default_config
filetypes_exclude = { "markdown" },
-- add additional filetypes to the default_config
filetypes_include = {},
-- to fully override the default_config, change the below
-- filetypes = {}
},
},
setup = {
tailwindcss = function(_, opts)
local tw = require("lspconfig.server_configurations.tailwindcss")
opts.filetypes = opts.filetypes or {}
-- Add default filetypes
vim.list_extend(opts.filetypes, tw.default_config.filetypes)
-- Remove excluded filetypes
--- @param ft string
opts.filetypes = vim.tbl_filter(function(ft)
return not vim.tbl_contains(opts.filetypes_exclude or {}, ft)
end, tw.default_config.filetypes)
end, opts.filetypes)
-- Add additional filetypes
vim.list_extend(opts.filetypes, opts.filetypes_include)
end,
},
},

View File

@ -4,10 +4,6 @@ return {
{
"glepnir/dashboard-nvim",
event = "VimEnter",
dependencies = {
-- disable alpha
{ "goolord/alpha-nvim", enabled = false },
},
opts = function()
local logo = [[
██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z

View File

@ -42,4 +42,17 @@ return {
vim.list_extend(opts.items, items)
end,
},
{
"glepnir/dashboard-nvim",
optional = true,
opts = function(_, opts)
local projects = {
action = "Telescope projects",
desc = " Projects",
icon = "",
key = "p",
}
table.insert(opts.config.center, 3, projects)
end,
},
}

View File

@ -10,6 +10,18 @@ return {
dependencies = {
{
"nvim-treesitter/nvim-treesitter-textobjects",
config = function()
-- Disable class keymaps in diff mode
vim.api.nvim_create_autocmd("BufReadPost", {
callback = function(event)
if vim.wo.diff then
for _, key in ipairs({ "[c", "]c", "[C", "]C" }) do
pcall(vim.keymap.del, "n", key, { buffer = event.buf })
end
end
end,
})
end,
},
},
cmd = { "TSUpdateSync" },

View File

@ -53,7 +53,7 @@ return {
-- tabs, which include filetype icons and close buttons.
{
"akinsho/bufferline.nvim",
event = "LazyFile",
event = "VeryLazy",
keys = {
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete non-pinned buffers" },
@ -316,6 +316,7 @@ return {
return dashboard
end,
config = function(_, dashboard)
vim.o.laststatus = 0
-- close Lazy and re-open when the dashboard is ready
if vim.o.filetype == "lazy" then
vim.cmd.close()

View File

@ -1,15 +1,44 @@
local M = {}
---@alias Sign {name:string, text:string, texthl:string}
---@alias Sign {name:string, text:string, texthl:string, priority:number}
-- Returns a list of regular and extmark signs sorted by priority (low to high)
---@return Sign[]
---@param buf number
---@param lnum number
function M.get_signs(buf, lnum)
---@diagnostic disable-next-line: no-unknown
return vim.tbl_map(function(sign)
return vim.fn.sign_getdefined(sign.name)[1]
-- Get regular signs
---@type Sign[]
local signs = vim.tbl_map(function(sign)
---@type Sign
local ret = vim.fn.sign_getdefined(sign.name)[1]
ret.priority = sign.priority
return ret
end, vim.fn.sign_getplaced(buf, { group = "*", lnum = lnum })[1].signs)
-- Get extmark signs
local extmarks = vim.api.nvim_buf_get_extmarks(
buf,
-1,
{ lnum - 1, 0 },
{ lnum - 1, -1 },
{ details = true, type = "sign" }
)
for _, extmark in pairs(extmarks) do
signs[#signs + 1] = {
name = extmark[4].sign_hl_group,
text = extmark[4].sign_text,
texthl = extmark[4].sign_hl_group,
priority = extmark[4].priority,
}
end
-- Sort by priority
table.sort(signs, function(a, b)
return (a.priority or 0) < (b.priority or 0)
end)
return signs
end
---@return Sign?
@ -66,7 +95,7 @@ function M.statuscolumn()
for _, s in ipairs(M.get_signs(buf, vim.v.lnum)) do
if s.name:find("GitSign") then
right = s
elseif not left then
else
left = s
end
end