Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
0137a110c1 | |||
fbf881f80b | |||
c22db72435 | |||
06071dd452 | |||
dcab30f242 | |||
17a1b846f0 | |||
86904d2fb1 | |||
309d189448 | |||
b9dae57961 | |||
24665fc736 | |||
9c9e650530 |
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "13.1.0"
|
||||
".": "13.2.0"
|
||||
}
|
||||
|
22
CHANGELOG.md
22
CHANGELOG.md
@ -1,5 +1,27 @@
|
||||
# Changelog
|
||||
|
||||
## [13.2.0](https://github.com/LazyVim/LazyVim/compare/v13.1.0...v13.2.0) (2024-11-11)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **ai:** better completion/suggestions of AI engines ([#4752](https://github.com/LazyVim/LazyVim/issues/4752)) ([fbf881f](https://github.com/LazyVim/LazyVim/commit/fbf881f80b8f0fb2d9e4bc69d04f66323b25c4b9))
|
||||
* **ai:** move ai related extras from `coding` to `ai` ([#4751](https://github.com/LazyVim/LazyVim/issues/4751)) ([86904d2](https://github.com/LazyVim/LazyVim/commit/86904d2fb1ef406386b2dad43f42756e09b28182))
|
||||
* **keymaps:** leader-bo to close other buffers ([24665fc](https://github.com/LazyVim/LazyVim/commit/24665fc73651970e5a1e20a63d6031bd99b97637))
|
||||
* **rest:** add more keymaps to util.rest ([#4467](https://github.com/LazyVim/LazyVim/issues/4467)) ([c22db72](https://github.com/LazyVim/LazyVim/commit/c22db724351bc7a05c56046c48d23a2be8efe71b))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **extras:** fix alpha-nvim non-string keycodes ([#4735](https://github.com/LazyVim/LazyVim/issues/4735)) ([9c9e650](https://github.com/LazyVim/LazyVim/commit/9c9e650530dcd211afd5a8b7f5e3e33e44abd11b))
|
||||
* **snacks:** allow overriding `statuscolumn` through `options.lua` ([17a1b84](https://github.com/LazyVim/LazyVim/commit/17a1b846f08db62e3a93c76426db4017ad3cc2eb))
|
||||
* **vscode:** added snacks.nvim to allowed plugins for vscode. Fixes [#4757](https://github.com/LazyVim/LazyVim/issues/4757) ([06071dd](https://github.com/LazyVim/LazyVim/commit/06071dd452baf1e9b8b5aab140553c4f51fa522e))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **ui:** only enable treesitter folds if the buffer has treesitter highlighting ([b9dae57](https://github.com/LazyVim/LazyVim/commit/b9dae579612ccf1cd749150ff1603ff6dffc2610))
|
||||
|
||||
## [13.1.0](https://github.com/LazyVim/LazyVim/compare/v13.0.0...v13.1.0) (2024-11-09)
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim Last change: 2024 November 09
|
||||
*LazyVim.txt* For Neovim Last change: 2024 November 11
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
|
||||
---@class LazyVimConfig: LazyVimOptions
|
||||
local M = {}
|
||||
|
||||
M.version = "13.1.0" -- x-release-please-version
|
||||
M.version = "13.2.0" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
@ -135,7 +135,7 @@ local defaults = {
|
||||
}
|
||||
|
||||
M.json = {
|
||||
version = 6,
|
||||
version = 7,
|
||||
path = vim.g.lazyvim_json or vim.fn.stdpath("config") .. "/lazyvim.json",
|
||||
data = {
|
||||
version = nil, ---@type string?
|
||||
|
@ -40,6 +40,9 @@ map("n", "<leader>`", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
|
||||
map("n", "<leader>bd", function()
|
||||
Snacks.bufdelete()
|
||||
end, { desc = "Delete Buffer" })
|
||||
map("n", "<leader>bo", function()
|
||||
Snacks.bufdelete.other()
|
||||
end, { desc = "Delete Other Buffers" })
|
||||
map("n", "<leader>bD", "<cmd>:bd<cr>", { desc = "Delete Buffer and Window" })
|
||||
|
||||
-- Clear search with <esc>
|
||||
@ -177,3 +180,13 @@ map("n", "<leader><tab><tab>", "<cmd>tabnew<cr>", { desc = "New Tab" })
|
||||
map("n", "<leader><tab>]", "<cmd>tabnext<cr>", { desc = "Next Tab" })
|
||||
map("n", "<leader><tab>d", "<cmd>tabclose<cr>", { desc = "Close Tab" })
|
||||
map("n", "<leader><tab>[", "<cmd>tabprevious<cr>", { desc = "Previous Tab" })
|
||||
|
||||
-- native snippets. only needed on < 0.11, as 0.11 creates these by default
|
||||
if vim.fn.has("nvim-0.11") == 0 then
|
||||
map("s", "<Tab>", function()
|
||||
return vim.snippet.active({ direction = 1 }) and "<cmd>lua vim.snippet.jump(1)<cr>" or "<Tab>"
|
||||
end, { expr = true, desc = "Jump Next" })
|
||||
map({ "i", "s" }, "<S-Tab>", function()
|
||||
return vim.snippet.active({ direction = -1 }) and "<cmd>lua vim.snippet.jump(-1)<cr>" or "<S-Tab>"
|
||||
end, { expr = true, desc = "Jump Previous" })
|
||||
end
|
||||
|
@ -11,6 +11,10 @@ vim.g.autoformat = true
|
||||
-- enabled with `:LazyExtras`
|
||||
vim.g.lazyvim_picker = "auto"
|
||||
|
||||
-- if the completion engine supports the AI source,
|
||||
-- use that instead of inline suggestions
|
||||
vim.g.ai_cmp = true
|
||||
|
||||
-- LazyVim root dir detection
|
||||
-- Each entry can be:
|
||||
-- * the name of a detector function like `lsp` or `cwd`
|
||||
@ -85,6 +89,7 @@ opt.spelllang = { "en" }
|
||||
opt.splitbelow = true -- Put new windows below current
|
||||
opt.splitkeep = "screen"
|
||||
opt.splitright = true -- Put new windows right of current
|
||||
opt.statuscolumn = [[%!v:lua.require'snacks.statuscolumn'.get()]]
|
||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
||||
opt.termguicolors = true -- True color support
|
||||
opt.timeoutlen = vim.g.vscode and 1000 or 300 -- Lower than default (1000) to quickly trigger which-key
|
||||
|
@ -43,6 +43,9 @@ return {
|
||||
cmp.abort()
|
||||
fallback()
|
||||
end,
|
||||
["<tab>"] = function(fallback)
|
||||
return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)()
|
||||
end,
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
@ -72,9 +75,10 @@ return {
|
||||
end,
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = {
|
||||
-- only show ghost text when we show ai completions
|
||||
ghost_text = vim.g.ai_cmp and {
|
||||
hl_group = "CmpGhostText",
|
||||
},
|
||||
} or false,
|
||||
},
|
||||
sorting = defaults.sorting,
|
||||
}
|
||||
@ -105,17 +109,6 @@ return {
|
||||
table.insert(opts.sources, { name = "snippets" })
|
||||
end
|
||||
end,
|
||||
init = function()
|
||||
-- Neovim enabled snippet navigation mappings by default in v0.11
|
||||
if vim.fn.has("nvim-0.11") == 0 then
|
||||
vim.keymap.set({ "i", "s" }, "<Tab>", function()
|
||||
return vim.snippet.active({ direction = 1 }) and "<cmd>lua vim.snippet.jump(1)<cr>" or "<Tab>"
|
||||
end, { expr = true, silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<S-Tab>", function()
|
||||
return vim.snippet.active({ direction = -1 }) and "<cmd>lua vim.snippet.jump(-1)<cr>" or "<S-Tab>"
|
||||
end, { expr = true, silent = true })
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
-- auto pairs
|
||||
|
71
lua/lazyvim/plugins/extras/ai/codeium.lua
Normal file
71
lua/lazyvim/plugins/extras/ai/codeium.lua
Normal file
@ -0,0 +1,71 @@
|
||||
return {
|
||||
|
||||
-- codeium
|
||||
{
|
||||
"Exafunction/codeium.nvim",
|
||||
cmd = "Codeium",
|
||||
build = ":Codeium Auth",
|
||||
opts = {
|
||||
enable_cmp_source = vim.g.ai_cmp,
|
||||
virtual_text = {
|
||||
enabled = not vim.g.ai_cmp,
|
||||
key_bindings = {
|
||||
accept = false, -- handled by nvim-cmp / blink.cmp
|
||||
next = "<M-]>",
|
||||
prev = "<M-[>",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add ai_accept action
|
||||
{
|
||||
"Exafunction/codeium.nvim",
|
||||
opts = function()
|
||||
LazyVim.cmp.actions.ai_accept = function()
|
||||
if require("codeium.virtual_text").get_current_completion_item() then
|
||||
LazyVim.create_undo()
|
||||
vim.api.nvim_input(require("codeium.virtual_text").accept())
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
-- codeium cmp source
|
||||
{
|
||||
"nvim-cmp",
|
||||
optional = true,
|
||||
dependencies = { "codeium.nvim" },
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, 1, {
|
||||
name = "codeium",
|
||||
group_index = 1,
|
||||
priority = 100,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
optional = true,
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium"))
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
optional = true,
|
||||
opts = {
|
||||
sources = {
|
||||
compat = vim.g.ai_cmp and { "codeium" } or nil,
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
"codeium.nvim",
|
||||
vim.g.ai_cmp and "saghen/blink.compat" or nil,
|
||||
},
|
||||
},
|
||||
}
|
@ -5,8 +5,17 @@ return {
|
||||
"zbirenbaum/copilot.lua",
|
||||
cmd = "Copilot",
|
||||
build = ":Copilot auth",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
suggestion = { enabled = false },
|
||||
suggestion = {
|
||||
enabled = not vim.g.ai_cmp,
|
||||
auto_trigger = true,
|
||||
keymap = {
|
||||
accept = false, -- handled by nvim-cmp / blink.cmp
|
||||
next = "<M-]>",
|
||||
prev = "<M-[>",
|
||||
},
|
||||
},
|
||||
panel = { enabled = false },
|
||||
filetypes = {
|
||||
markdown = true,
|
||||
@ -14,6 +23,22 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add ai_accept action
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
opts = function()
|
||||
LazyVim.cmp.actions.ai_accept = function()
|
||||
if require("copilot.suggestion").is_visible() then
|
||||
LazyVim.create_undo()
|
||||
require("copilot.suggestion").accept()
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
-- lualine
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
optional = true,
|
||||
@ -55,70 +80,50 @@ return {
|
||||
-- copilot cmp source
|
||||
{
|
||||
"nvim-cmp",
|
||||
dependencies = {
|
||||
optional = true,
|
||||
dependencies = { -- this will only be evaluated if nvim-cmp is enabled
|
||||
{
|
||||
"zbirenbaum/copilot-cmp",
|
||||
dependencies = "copilot.lua",
|
||||
enabled = vim.g.ai_cmp, -- only enable if wanted
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
local copilot_cmp = require("copilot_cmp")
|
||||
copilot_cmp.setup(opts)
|
||||
-- attach cmp source whenever copilot attaches
|
||||
-- fixes lazy-loading issues with the copilot cmp source
|
||||
LazyVim.lsp.on_attach(function(client)
|
||||
LazyVim.lsp.on_attach(function()
|
||||
copilot_cmp._on_insert_enter({})
|
||||
end, "copilot")
|
||||
end,
|
||||
},
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, 1, {
|
||||
name = "copilot",
|
||||
group_index = 1,
|
||||
priority = 100,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
optional = true,
|
||||
specs = {
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
suggestion = {
|
||||
enabled = true,
|
||||
auto_trigger = true,
|
||||
keymap = { accept = false },
|
||||
specs = {
|
||||
{
|
||||
"nvim-cmp",
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, 1, {
|
||||
name = "copilot",
|
||||
group_index = 1,
|
||||
priority = 100,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- blink.cmp
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
optional = true,
|
||||
opts = {
|
||||
windows = {
|
||||
ghost_text = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
keymap = {
|
||||
["<Tab>"] = {
|
||||
function(cmp)
|
||||
if cmp.is_in_snippet() then
|
||||
return cmp.accept()
|
||||
elseif require("copilot.suggestion").is_visible() then
|
||||
LazyVim.create_undo()
|
||||
require("copilot.suggestion").accept()
|
||||
return true
|
||||
else
|
||||
return cmp.select_and_accept()
|
||||
end
|
||||
end,
|
||||
"snippet_forward",
|
||||
"fallback",
|
||||
},
|
||||
windows = { ghost_text = { enabled = false } },
|
||||
},
|
||||
specs = {
|
||||
-- blink has no copilot source, so force enable suggestions
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
opts = { suggestion = { enabled = true } },
|
||||
},
|
||||
},
|
||||
},
|
@ -1,3 +1,10 @@
|
||||
if lazyvim_docs then
|
||||
-- set to `true` to follow the main branch
|
||||
-- you need to have a working rust toolchain to build the plugin
|
||||
-- in this case.
|
||||
vim.g.lazyvim_blink_main = false
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
@ -5,8 +12,12 @@ return {
|
||||
},
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
version = "*",
|
||||
opts_extend = { "sources.completion.enabled_providers" },
|
||||
version = not vim.g.lazyvim_blink_main and "*",
|
||||
build = vim.g.lazyvim_blink_main and "cargo build --release",
|
||||
opts_extend = {
|
||||
"sources.completion.enabled_providers",
|
||||
"sources.compat",
|
||||
},
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
-- add blink.compat to dependencies
|
||||
@ -35,7 +46,7 @@ return {
|
||||
auto_show = true,
|
||||
},
|
||||
ghost_text = {
|
||||
enabled = true,
|
||||
enabled = vim.g.ai_cmp,
|
||||
},
|
||||
},
|
||||
|
||||
@ -45,6 +56,9 @@ return {
|
||||
-- experimental signature help support
|
||||
-- trigger = { signature_help = { enabled = true } }
|
||||
sources = {
|
||||
-- adding any nvim-cmp sources here will enable them
|
||||
-- with blink.compat
|
||||
compat = {},
|
||||
completion = {
|
||||
-- remember to enable your providers here
|
||||
enabled_providers = { "lsp", "path", "snippets", "buffer" },
|
||||
@ -53,8 +67,28 @@ return {
|
||||
|
||||
keymap = {
|
||||
preset = "enter",
|
||||
["<Tab>"] = {
|
||||
LazyVim.cmp.map({ "snippet_forward", "ai_accept" }),
|
||||
"fallback",
|
||||
},
|
||||
},
|
||||
},
|
||||
---@param opts blink.cmp.Config | { sources: { compat: string[] } }
|
||||
config = function(_, opts)
|
||||
-- setup compat sources
|
||||
local enabled = opts.sources.completion.enabled_providers
|
||||
for _, source in ipairs(opts.sources.compat or {}) do
|
||||
opts.sources.providers[source] = vim.tbl_deep_extend(
|
||||
"force",
|
||||
{ name = source, module = "blink.compat.source" },
|
||||
opts.sources.providers[source] or {}
|
||||
)
|
||||
if type(enabled) == "table" and not vim.tbl_contains(enabled, source) then
|
||||
table.insert(enabled, source)
|
||||
end
|
||||
end
|
||||
require("blink.cmp").setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
-- add icons
|
||||
|
@ -1,33 +0,0 @@
|
||||
return {
|
||||
|
||||
-- codeium cmp source
|
||||
{
|
||||
"nvim-cmp",
|
||||
dependencies = {
|
||||
-- codeium
|
||||
{
|
||||
"Exafunction/codeium.nvim",
|
||||
cmd = "Codeium",
|
||||
build = ":Codeium Auth",
|
||||
opts = {},
|
||||
},
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, 1, {
|
||||
name = "codeium",
|
||||
group_index = 1,
|
||||
priority = 100,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
optional = true,
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium"))
|
||||
end,
|
||||
},
|
||||
}
|
@ -1,4 +1,8 @@
|
||||
return {
|
||||
-- disable builtin snippet support
|
||||
{ "garymjr/nvim-snippets", enabled = false },
|
||||
|
||||
-- add luasnip
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
lazy = true,
|
||||
@ -12,43 +16,56 @@ return {
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-cmp",
|
||||
dependencies = {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
opts = function(_, opts)
|
||||
opts.snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
}
|
||||
table.insert(opts.sources, { name = "luasnip" })
|
||||
end,
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
history = true,
|
||||
delete_check_events = "TextChanged",
|
||||
},
|
||||
},
|
||||
|
||||
-- add snippet_forward action
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
opts = function()
|
||||
LazyVim.cmp.actions.snippet_forward = function()
|
||||
if require("luasnip").jumpable(1) then
|
||||
require("luasnip").jump(1)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
-- nvim-cmp integration
|
||||
{
|
||||
"nvim-cmp",
|
||||
optional = true,
|
||||
dependencies = { "saadparwaiz1/cmp_luasnip" },
|
||||
opts = function(_, opts)
|
||||
opts.snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
}
|
||||
table.insert(opts.sources, { name = "luasnip" })
|
||||
end,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{
|
||||
"<tab>",
|
||||
function()
|
||||
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
||||
end,
|
||||
expr = true, silent = true, mode = "i",
|
||||
},
|
||||
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
||||
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
||||
},
|
||||
},
|
||||
|
||||
-- blink.cmp integration
|
||||
{
|
||||
"garymjr/nvim-snippets",
|
||||
enabled = false,
|
||||
"saghen/blink.cmp",
|
||||
optional = true,
|
||||
opts = {
|
||||
accept = {
|
||||
expand_snippet = function(...)
|
||||
return require("luasnip").lsp_expand(...)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ return {
|
||||
dashboard.section.header.val = vim.split(logo, "\n")
|
||||
-- stylua: ignore
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("f", " " .. " Find file", LazyVim.pick()),
|
||||
dashboard.button("f", " " .. " Find file", "<cmd> lua LazyVim.pick()() <cr>"),
|
||||
dashboard.button("n", " " .. " New file", [[<cmd> ene <BAR> startinsert <cr>]]),
|
||||
dashboard.button("r", " " .. " Recent files", LazyVim.pick("oldfiles")),
|
||||
dashboard.button("g", " " .. " Find text", LazyVim.pick("live_grep")),
|
||||
dashboard.button("c", " " .. " Config", LazyVim.pick.config_files()),
|
||||
dashboard.button("r", " " .. " Recent files", [[<cmd> lua LazyVim.pick("oldfiles")() <cr>]]),
|
||||
dashboard.button("g", " " .. " Find text", [[<cmd> lua LazyVim.pick("live_grep")() <cr>]]),
|
||||
dashboard.button("c", " " .. " Config", "<cmd> lua LazyVim.pick.config_files()() <cr>"),
|
||||
dashboard.button("s", " " .. " Restore Session", [[<cmd> lua require("persistence").load() <cr>]]),
|
||||
dashboard.button("x", " " .. " Lazy Extras", "<cmd> LazyExtras <cr>"),
|
||||
dashboard.button("l", " " .. " Lazy", "<cmd> Lazy <cr>"),
|
||||
|
@ -9,10 +9,23 @@ return {
|
||||
ft = "http",
|
||||
keys = {
|
||||
{ "<leader>R", "", desc = "+Rest", ft = "http" },
|
||||
{ "<leader>Rs", "<cmd>lua require('kulala').run()<cr>", desc = "Send the request", ft = "http" },
|
||||
{ "<leader>Rt", "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body", ft = "http" },
|
||||
{ "<leader>Rp", "<cmd>lua require('kulala').jump_prev()<cr>", desc = "Jump to previous request", ft = "http" },
|
||||
{ "<leader>Rb", "<cmd>lua require('kulala').scratchpad()<cr>", desc = "Open scratchpad", ft = "http" },
|
||||
{ "<leader>Rc", "<cmd>lua require('kulala').copy()<cr>", desc = "Copy as cURL", ft = "http" },
|
||||
{ "<leader>RC", "<cmd>lua require('kulala').from_curl()<cr>", desc = "Paste from curl", ft = "http" },
|
||||
{
|
||||
"<leader>Rg",
|
||||
"<cmd>lua require('kulala').download_graphql_schema()<cr>",
|
||||
desc = "Download GraphQL schema",
|
||||
ft = "http",
|
||||
},
|
||||
{ "<leader>Ri", "<cmd>lua require('kulala').inspect()<cr>", desc = "Inspect current request", ft = "http" },
|
||||
{ "<leader>Rn", "<cmd>lua require('kulala').jump_next()<cr>", desc = "Jump to next request", ft = "http" },
|
||||
{ "<leader>Rp", "<cmd>lua require('kulala').jump_prev()<cr>", desc = "Jump to previous request", ft = "http" },
|
||||
{ "<leader>Rq", "<cmd>lua require('kulala').close()<cr>", desc = "Close window", ft = "http" },
|
||||
{ "<leader>Rr", "<cmd>lua require('kulala').replay()<cr>", desc = "Replay the last request", ft = "http" },
|
||||
{ "<leader>Rs", "<cmd>lua require('kulala').run()<cr>", desc = "Send the request", ft = "http" },
|
||||
{ "<leader>RS", "<cmd>lua require('kulala').show_stats()<cr>", desc = "Show stats", ft = "http" },
|
||||
{ "<leader>Rt", "<cmd>lua require('kulala').toggle_view()<cr>", desc = "Toggle headers/body", ft = "http" },
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
|
@ -3,6 +3,7 @@ if not vim.g.vscode then
|
||||
end
|
||||
|
||||
local enabled = {
|
||||
"LazyVim",
|
||||
"dial.nvim",
|
||||
"flit.nvim",
|
||||
"lazy.nvim",
|
||||
@ -15,10 +16,10 @@ local enabled = {
|
||||
"nvim-treesitter",
|
||||
"nvim-treesitter-textobjects",
|
||||
"nvim-ts-context-commentstring",
|
||||
"snacks.nvim",
|
||||
"ts-comments.nvim",
|
||||
"vim-repeat",
|
||||
"yanky.nvim",
|
||||
"LazyVim",
|
||||
}
|
||||
|
||||
local Config = require("lazy.core.config")
|
||||
|
@ -31,6 +31,7 @@ return {
|
||||
---@type snacks.Config
|
||||
return {
|
||||
toggle = { map = LazyVim.safe_keymap_set },
|
||||
statuscolumn = { enabled = false }, -- we set this in options.lua
|
||||
terminal = {
|
||||
win = {
|
||||
keys = {
|
||||
|
@ -7,7 +7,6 @@ return {
|
||||
keys = {
|
||||
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle Pin" },
|
||||
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete Non-Pinned Buffers" },
|
||||
{ "<leader>bo", "<Cmd>BufferLineCloseOthers<CR>", desc = "Delete Other Buffers" },
|
||||
{ "<leader>br", "<Cmd>BufferLineCloseRight<CR>", desc = "Delete Buffers to the Right" },
|
||||
{ "<leader>bl", "<Cmd>BufferLineCloseLeft<CR>", desc = "Delete Buffers to the Left" },
|
||||
{ "<S-h>", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
|
||||
|
@ -1,6 +1,36 @@
|
||||
---@class lazyvim.util.cmp
|
||||
local M = {}
|
||||
|
||||
---@alias lazyvim.util.cmp.Action fun():boolean?
|
||||
---@type table<string, lazyvim.util.cmp.Action>
|
||||
M.actions = {
|
||||
-- Native Snippets
|
||||
snippet_forward = function()
|
||||
if vim.snippet.active({ direction = 1 }) then
|
||||
vim.schedule(function()
|
||||
vim.snippet.jump(1)
|
||||
end)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
---@param actions string[]
|
||||
---@param fallback? string|fun()
|
||||
function M.map(actions, fallback)
|
||||
return function()
|
||||
for _, name in ipairs(actions) do
|
||||
if M.actions[name] then
|
||||
local ret = M.actions[name]()
|
||||
if ret then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
return type(fallback) == "function" and fallback() or fallback
|
||||
end
|
||||
end
|
||||
|
||||
---@alias Placeholder {n:number, text:string}
|
||||
|
||||
---@param snippet string
|
||||
|
@ -90,6 +90,13 @@ function M.migrate()
|
||||
json.data.extras = vim.tbl_filter(function(extra)
|
||||
return not (extra == "lazyvim.plugins.extras.editor.trouble-v3")
|
||||
end, json.data.extras or {})
|
||||
elseif json.data.version == 6 then
|
||||
local ai = { "copilot", "codeium", "copilot-chat", "tabnine" }
|
||||
json.data.extras = vim.tbl_map(function(extra)
|
||||
return extra:gsub("^lazyvim%.plugins%.extras%.coding%.(.*)$", function(name)
|
||||
return vim.tbl_contains(ai, name) and ("lazyvim.plugins.extras.ai." .. name) or extra
|
||||
end)
|
||||
end, json.data.extras or {})
|
||||
end
|
||||
|
||||
M.save()
|
||||
|
@ -7,7 +7,7 @@ function M.cmp_source(name, icon)
|
||||
if not package.loaded["cmp"] then
|
||||
return
|
||||
end
|
||||
for _, s in ipairs(require("cmp").core.sources) do
|
||||
for _, s in ipairs(require("cmp").core.sources or {}) do
|
||||
if s.name == name then
|
||||
if s.source:is_available() then
|
||||
started = true
|
||||
|
@ -53,6 +53,11 @@ local skip_check = assert(vim.uv.new_check())
|
||||
function M.foldexpr()
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
|
||||
-- no highlight, no foldexpr
|
||||
if not vim.b[buf].ts_highlight then
|
||||
return "0"
|
||||
end
|
||||
|
||||
-- still in the same tick and no parser
|
||||
if M.skip_foldexpr[buf] then
|
||||
return "0"
|
||||
|
Reference in New Issue
Block a user