mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-10 21:05:43 +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*
|
||||
|
|
|
@ -20,9 +20,12 @@ vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
|
|||
|
||||
-- LazyVim automatically configures lazygit:
|
||||
-- * theme, based on the active colorscheme.
|
||||
-- * editorPreset to nvim-remote
|
||||
-- * editPreset to nvim-remote
|
||||
-- * enables nerd font icons
|
||||
-- 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
|
||||
|
||||
-- Options for the LazyVim statuscolumn
|
||||
|
|
|
@ -137,7 +137,7 @@ return {
|
|||
function()
|
||||
local grug = require("grug-far")
|
||||
local ext = vim.bo.buftype == "" and vim.fn.expand("%:e")
|
||||
grug.grug_far({
|
||||
grug.open({
|
||||
transient = true,
|
||||
prefills = {
|
||||
filesFilter = ext and ext ~= "" and "*." .. ext or nil,
|
||||
|
|
|
@ -23,7 +23,6 @@ return {
|
|||
local user = vim.env.USER or "User"
|
||||
user = user:sub(1, 1):upper() .. user:sub(2)
|
||||
return {
|
||||
model = "gpt-4",
|
||||
auto_insert_mode = true,
|
||||
show_help = true,
|
||||
question_header = " " .. user .. " ",
|
||||
|
|
|
@ -76,6 +76,7 @@ return {
|
|||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = function()
|
||||
require("lazy").load({ plugins = { "markdown-preview.nvim" } })
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end,
|
||||
keys = {
|
||||
|
@ -92,7 +93,7 @@ return {
|
|||
},
|
||||
|
||||
{
|
||||
"MeanderingProgrammer/markdown.nvim",
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
opts = {
|
||||
file_types = { "markdown", "norg", "rmd", "org" },
|
||||
code = {
|
||||
|
|
|
@ -10,6 +10,7 @@ return {
|
|||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<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>qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" },
|
||||
},
|
||||
|
|
|
@ -70,6 +70,10 @@ function M.open(opts)
|
|||
if ok then
|
||||
M.config_dir = lines[1]
|
||||
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
|
||||
---@diagnostic disable-next-line: cast-type-mismatch
|
||||
---@cast lines string
|
||||
|
|
|
@ -33,6 +33,7 @@ M.renames = {
|
|||
["null-ls.nvim"] = "none-ls.nvim",
|
||||
["romgrk/nvim-treesitter-context"] = "nvim-treesitter/nvim-treesitter-context",
|
||||
["glepnir/dashboard-nvim"] = "nvimdev/dashboard-nvim",
|
||||
["markdown.nvim"] = "render-markdown.nvim",
|
||||
}
|
||||
|
||||
function M.save_core()
|
||||
|
|
|
@ -127,9 +127,25 @@ M.number = M.wrap({
|
|||
M.diagnostics = M.wrap({
|
||||
name = "Diagnostics",
|
||||
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,
|
||||
set = vim.diagnostic.enable,
|
||||
})
|
||||
|
||||
M.inlay_hints = M.wrap({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue