mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-13 14:21:56 +02:00
Merge branch 'main' into lang/typst
This commit is contained in:
commit
f67fe0319b
9 changed files with 34 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
*LazyVim.txt* For Neovim Last change: 2024 July 25
|
*LazyVim.txt* For Neovim Last change: 2024 September 16
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
Table of Contents *LazyVim-table-of-contents*
|
Table of Contents *LazyVim-table-of-contents*
|
||||||
|
|
|
@ -20,9 +20,12 @@ vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
|
||||||
|
|
||||||
-- LazyVim automatically configures lazygit:
|
-- LazyVim automatically configures lazygit:
|
||||||
-- * theme, based on the active colorscheme.
|
-- * theme, based on the active colorscheme.
|
||||||
-- * editorPreset to nvim-remote
|
-- * editPreset to nvim-remote
|
||||||
-- * enables nerd font icons
|
-- * enables nerd font icons
|
||||||
-- Set to false to disable.
|
-- Set to false to disable.
|
||||||
|
-- Set the options you want to override in `~/.config/lazygit/custom.yml`
|
||||||
|
-- WARN: on Windows you might want to set `editPreset: "nvim"` due to
|
||||||
|
-- this issue https://github.com/jesseduffield/lazygit/issues/3467
|
||||||
vim.g.lazygit_config = true
|
vim.g.lazygit_config = true
|
||||||
|
|
||||||
-- Options for the LazyVim statuscolumn
|
-- Options for the LazyVim statuscolumn
|
||||||
|
|
|
@ -137,7 +137,7 @@ return {
|
||||||
function()
|
function()
|
||||||
local grug = require("grug-far")
|
local grug = require("grug-far")
|
||||||
local ext = vim.bo.buftype == "" and vim.fn.expand("%:e")
|
local ext = vim.bo.buftype == "" and vim.fn.expand("%:e")
|
||||||
grug.grug_far({
|
grug.open({
|
||||||
transient = true,
|
transient = true,
|
||||||
prefills = {
|
prefills = {
|
||||||
filesFilter = ext and ext ~= "" and "*." .. ext or nil,
|
filesFilter = ext and ext ~= "" and "*." .. ext or nil,
|
||||||
|
|
|
@ -23,7 +23,6 @@ return {
|
||||||
local user = vim.env.USER or "User"
|
local user = vim.env.USER or "User"
|
||||||
user = user:sub(1, 1):upper() .. user:sub(2)
|
user = user:sub(1, 1):upper() .. user:sub(2)
|
||||||
return {
|
return {
|
||||||
model = "gpt-4",
|
|
||||||
auto_insert_mode = true,
|
auto_insert_mode = true,
|
||||||
show_help = true,
|
show_help = true,
|
||||||
question_header = " " .. user .. " ",
|
question_header = " " .. user .. " ",
|
||||||
|
|
|
@ -76,6 +76,7 @@ return {
|
||||||
"iamcco/markdown-preview.nvim",
|
"iamcco/markdown-preview.nvim",
|
||||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||||
build = function()
|
build = function()
|
||||||
|
require("lazy").load({ plugins = { "markdown-preview.nvim" } })
|
||||||
vim.fn["mkdp#util#install"]()
|
vim.fn["mkdp#util#install"]()
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
|
@ -92,7 +93,7 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"MeanderingProgrammer/markdown.nvim",
|
"MeanderingProgrammer/render-markdown.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
file_types = { "markdown", "norg", "rmd", "org" },
|
file_types = { "markdown", "norg", "rmd", "org" },
|
||||||
code = {
|
code = {
|
||||||
|
|
|
@ -10,6 +10,7 @@ return {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>qs", function() require("persistence").load() end, desc = "Restore Session" },
|
{ "<leader>qs", function() require("persistence").load() end, desc = "Restore Session" },
|
||||||
|
{ "<leader>qS", function() require("persistence").select() end,desc = "Select Session" },
|
||||||
{ "<leader>ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
|
{ "<leader>ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
|
||||||
{ "<leader>qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" },
|
{ "<leader>qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" },
|
||||||
},
|
},
|
||||||
|
|
|
@ -70,6 +70,10 @@ function M.open(opts)
|
||||||
if ok then
|
if ok then
|
||||||
M.config_dir = lines[1]
|
M.config_dir = lines[1]
|
||||||
vim.env.LG_CONFIG_FILE = LazyVim.norm(M.config_dir .. "/config.yml" .. "," .. M.theme_path)
|
vim.env.LG_CONFIG_FILE = LazyVim.norm(M.config_dir .. "/config.yml" .. "," .. M.theme_path)
|
||||||
|
local custom_config = LazyVim.norm(M.config_dir .. "/custom.yml")
|
||||||
|
if vim.uv.fs_stat(custom_config) and vim.uv.fs_stat(custom_config).type == "file" then
|
||||||
|
vim.env.LG_CONFIG_FILE = vim.env.LG_CONFIG_FILE .. "," .. custom_config
|
||||||
|
end
|
||||||
else
|
else
|
||||||
---@diagnostic disable-next-line: cast-type-mismatch
|
---@diagnostic disable-next-line: cast-type-mismatch
|
||||||
---@cast lines string
|
---@cast lines string
|
||||||
|
@ -130,9 +134,9 @@ gui:
|
||||||
---@type string[]
|
---@type string[]
|
||||||
local lines = {}
|
local lines = {}
|
||||||
for k, v in pairs(theme) do
|
for k, v in pairs(theme) do
|
||||||
lines[#lines + 1] = (" %s:"):format(k)
|
lines[#lines + 1] = (" %s:"):format(k)
|
||||||
for _, c in ipairs(v) do
|
for _, c in ipairs(v) do
|
||||||
lines[#lines + 1] = (" - %q"):format(c)
|
lines[#lines + 1] = (" - %q"):format(c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
config = config .. table.concat(lines, "\n")
|
config = config .. table.concat(lines, "\n")
|
||||||
|
|
|
@ -33,6 +33,7 @@ M.renames = {
|
||||||
["null-ls.nvim"] = "none-ls.nvim",
|
["null-ls.nvim"] = "none-ls.nvim",
|
||||||
["romgrk/nvim-treesitter-context"] = "nvim-treesitter/nvim-treesitter-context",
|
["romgrk/nvim-treesitter-context"] = "nvim-treesitter/nvim-treesitter-context",
|
||||||
["glepnir/dashboard-nvim"] = "nvimdev/dashboard-nvim",
|
["glepnir/dashboard-nvim"] = "nvimdev/dashboard-nvim",
|
||||||
|
["markdown.nvim"] = "render-markdown.nvim",
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.save_core()
|
function M.save_core()
|
||||||
|
|
|
@ -127,9 +127,25 @@ M.number = M.wrap({
|
||||||
M.diagnostics = M.wrap({
|
M.diagnostics = M.wrap({
|
||||||
name = "Diagnostics",
|
name = "Diagnostics",
|
||||||
get = function()
|
get = function()
|
||||||
return vim.diagnostic.is_enabled and vim.diagnostic.is_enabled()
|
local enabled = false
|
||||||
|
if vim.diagnostic.is_enabled then
|
||||||
|
enabled = vim.diagnostic.is_enabled()
|
||||||
|
elseif vim.diagnostic.is_disabled then
|
||||||
|
enabled = not vim.diagnostic.is_disabled()
|
||||||
|
end
|
||||||
|
return enabled
|
||||||
|
end,
|
||||||
|
set = function(state)
|
||||||
|
if vim.fn.has("nvim-0.10") == 0 then
|
||||||
|
if state then
|
||||||
|
pcall(vim.diagnostic.enable)
|
||||||
|
else
|
||||||
|
pcall(vim.diagnostic.disable)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
vim.diagnostic.enable(state)
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
set = vim.diagnostic.enable,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
M.inlay_hints = M.wrap({
|
M.inlay_hints = M.wrap({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue