Compare commits
39 Commits
Author | SHA1 | Date | |
---|---|---|---|
31af207542 | |||
69e8867a0f | |||
cee60a6d30 | |||
475e3f32b8 | |||
8c79ab601a | |||
87915a1f23 | |||
439340bd8a | |||
9ad1c49b67 | |||
e2c189e066 | |||
1519cd6da7 | |||
4b86cf9900 | |||
99c361f708 | |||
71ea193cf6 | |||
3c605f547c | |||
7ef2dfd3ba | |||
3f4b1ff003 | |||
0d71732902 | |||
2ebba15e12 | |||
d424a02554 | |||
5ddad99bac | |||
b2f750558a | |||
8a3321d827 | |||
ea794ffd94 | |||
8232651c4a | |||
83017ff28a | |||
12e37529e7 | |||
bfe29fb013 | |||
097b9e2f27 | |||
090ca75d3b | |||
efc95dc6aa | |||
f841ecf6bd | |||
4a626a8137 | |||
9ec253b9b6 | |||
d71471151b | |||
03e203bfbe | |||
0a9447c1b1 | |||
fefcda5431 | |||
0d6026a3e8 | |||
4bf3a39223 |
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "13.6.0"
|
||||
".": "13.9.1"
|
||||
}
|
||||
|
59
CHANGELOG.md
59
CHANGELOG.md
@ -1,5 +1,64 @@
|
||||
# Changelog
|
||||
|
||||
## [13.9.1](https://github.com/LazyVim/LazyVim/compare/v13.9.0...v13.9.1) (2024-12-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **blink:** set kind to int, not string, if overriding ([#4999](https://github.com/LazyVim/LazyVim/issues/4999)) ([cee60a6](https://github.com/LazyVim/LazyVim/commit/cee60a6d3040181ac9c5b709d79e80e180b34d48))
|
||||
|
||||
## [13.9.0](https://github.com/LazyVim/LazyVim/compare/v13.8.0...v13.9.0) (2024-12-11)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **luasnip:** add default user snippet location ([#4987](https://github.com/LazyVim/LazyVim/issues/4987)) ([8c79ab6](https://github.com/LazyVim/LazyVim/commit/8c79ab601af19b5370d560aa619567371ac70d86))
|
||||
* **vscode:** add vscode-specific keymaps and sync undo/redo with vscode ([#4983](https://github.com/LazyVim/LazyVim/issues/4983)) ([9ad1c49](https://github.com/LazyVim/LazyVim/commit/9ad1c49b67a5c4330e366cde41ab11b156de03f2))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **autocmds:** remove snacks_win from close_with_q, since they have their own keymaps ([99c361f](https://github.com/LazyVim/LazyVim/commit/99c361f708924ddc63599115580bda537cc7f119))
|
||||
* **blink:** config breaking changes. Fixes [#4990](https://github.com/LazyVim/LazyVim/issues/4990) ([439340b](https://github.com/LazyVim/LazyVim/commit/439340bd8a970aa23d513aea96c93e84b3af42dc))
|
||||
|
||||
## [13.8.0](https://github.com/LazyVim/LazyVim/compare/v13.7.0...v13.8.0) (2024-12-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **git:** added toggles for gitsigns.nvim and mini.diff ([2ebba15](https://github.com/LazyVim/LazyVim/commit/2ebba15e1274f5437a418ddacfe9dbf342fd8a18))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **dot:** kitty ft with bash treesitter highlights ([7ef2dfd](https://github.com/LazyVim/LazyVim/commit/7ef2dfd3ba9a3dffaa8c57c1bb5e130b9aa74217))
|
||||
* **keymaps:** toggle name ([b2f7505](https://github.com/LazyVim/LazyVim/commit/b2f750558a3737879f8151e741e7a3988886e37f))
|
||||
* **mini.diff:** toggle ([3f4b1ff](https://github.com/LazyVim/LazyVim/commit/3f4b1ff00364d089e19f4b3c738fd5298243fadb))
|
||||
* **rust:** only use mason.nvim if it is present ([#4963](https://github.com/LazyVim/LazyVim/issues/4963)) ([5ddad99](https://github.com/LazyVim/LazyVim/commit/5ddad99bac203e87e6f78f3ab7567a49b0d1d8a6))
|
||||
|
||||
## [13.7.0](https://github.com/LazyVim/LazyVim/compare/v13.6.0...v13.7.0) (2024-12-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **blink:** enabled treesitter highlighting ([0a9447c](https://github.com/LazyVim/LazyVim/commit/0a9447c1b1776c2d8d7b7d495538ddfab7c6cd08))
|
||||
* **extras.ai:** blink.cmp integration and kind overrides for menu drawing ([#4942](https://github.com/LazyVim/LazyVim/issues/4942)) ([f841ecf](https://github.com/LazyVim/LazyVim/commit/f841ecf6bdde98a0983e44171b1ad8513e159e29))
|
||||
* **rust:** add bacon-ls and improve debugging ([#3212](https://github.com/LazyVim/LazyVim/issues/3212)) ([ea794ff](https://github.com/LazyVim/LazyVim/commit/ea794ffd94adeb2b1d2870ed97dbd3f000d911b3))
|
||||
* **snacks:** silence copy url keymap ([#4939](https://github.com/LazyVim/LazyVim/issues/4939)) ([03e203b](https://github.com/LazyVim/LazyVim/commit/03e203bfbe1e5de38cfc0082e5d1b720cab83c0e))
|
||||
* **toggle:** added leader-A to toggle tabline. Closes [#4951](https://github.com/LazyVim/LazyVim/issues/4951) ([8232651](https://github.com/LazyVim/LazyVim/commit/8232651c4a4a80da34f8b6c1742b04144ae4b959))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **blink:** update config for latest changes ([#4953](https://github.com/LazyVim/LazyVim/issues/4953)) ([090ca75](https://github.com/LazyVim/LazyVim/commit/090ca75d3b326280a67e727ef77e15920a90e3c9))
|
||||
* **copilot:** CopilotChat.nvim has moved to main ([#4931](https://github.com/LazyVim/LazyVim/issues/4931)) ([0d6026a](https://github.com/LazyVim/LazyVim/commit/0d6026a3e8a255cf825ad293de101bc1e1a667eb))
|
||||
* **extras.treesitter-context:** change event back to `LazyFile` ([#4940](https://github.com/LazyVim/LazyVim/issues/4940)) ([83017ff](https://github.com/LazyVim/LazyVim/commit/83017ff28afa8b8ddf9254564d8b4a9c96ec3f7d))
|
||||
* **supermaven:** blink.cmp integration ([#4941](https://github.com/LazyVim/LazyVim/issues/4941)) ([d714711](https://github.com/LazyVim/LazyVim/commit/d71471151b8906155e048ea3d3fe2fa7d651990e))
|
||||
* **tex:** specify filetype for <localleader>l ([#4905](https://github.com/LazyVim/LazyVim/issues/4905)) ([12e3752](https://github.com/LazyVim/LazyVim/commit/12e37529e718b926e7513d0397e32771aeb6e049))
|
||||
* **ui:** actually disable mini-indentscope on snacks_dashboard ([#4947](https://github.com/LazyVim/LazyVim/issues/4947)) ([bfe29fb](https://github.com/LazyVim/LazyVim/commit/bfe29fb01330d2bfdfe14582133907217f4b8192))
|
||||
* **ui:** disable mini.indentscope on `ft=snacks_dashboard` ([#4928](https://github.com/LazyVim/LazyVim/issues/4928)) ([4bf3a39](https://github.com/LazyVim/LazyVim/commit/4bf3a392234f4c4421af644683d95d8aab945382))
|
||||
* **ui:** properly clear maximize state on exit. See [#4934](https://github.com/LazyVim/LazyVim/issues/4934) ([9ec253b](https://github.com/LazyVim/LazyVim/commit/9ec253b9b6bf9673f610035d741a345d6be7a44f))
|
||||
|
||||
## [13.6.0](https://github.com/LazyVim/LazyVim/compare/v13.5.3...v13.6.0) (2024-12-01)
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*LazyVim.txt* For Neovim Last change: 2024 December 01
|
||||
*LazyVim.txt* For Neovim Last change: 2024 December 12
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *LazyVim-table-of-contents*
|
||||
|
@ -66,7 +66,6 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
"neotest-summary",
|
||||
"notify",
|
||||
"qf",
|
||||
"snacks_win",
|
||||
"spectre_panel",
|
||||
"startuptime",
|
||||
"tsplayground",
|
||||
|
@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
|
||||
---@class LazyVimConfig: LazyVimOptions
|
||||
local M = {}
|
||||
|
||||
M.version = "13.6.0" -- x-release-please-version
|
||||
M.version = "13.9.1" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
|
@ -127,7 +127,8 @@ Snacks.toggle.option("wrap", {name = "Wrap"}):map("<leader>uw")
|
||||
Snacks.toggle.option("relativenumber", { name = "Relative Number"}):map("<leader>uL")
|
||||
Snacks.toggle.diagnostics():map("<leader>ud")
|
||||
Snacks.toggle.line_number():map("<leader>ul")
|
||||
Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2}):map("<leader>uc")
|
||||
Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2, name = "Conceal Level"}):map("<leader>uc")
|
||||
Snacks.toggle.option("showtabline", {off = 0, on = vim.o.showtabline > 0 and vim.o.showtabline or 2, name = "Tabline"}):map("<leader>uA")
|
||||
Snacks.toggle.treesitter():map("<leader>uT")
|
||||
Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark Background"}):map("<leader>ub")
|
||||
if vim.lsp.inlay_hint then
|
||||
@ -146,7 +147,7 @@ end
|
||||
map("n", "<leader>gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" })
|
||||
map({ "n", "x" }, "<leader>gB", function() Snacks.gitbrowse() end, { desc = "Git Browse (open)" })
|
||||
map({"n", "x" }, "<leader>gY", function()
|
||||
Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end })
|
||||
Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false })
|
||||
end, { desc = "Git Browse (copy)" })
|
||||
|
||||
-- quit
|
||||
|
@ -300,6 +300,20 @@ return {
|
||||
end,
|
||||
},
|
||||
},
|
||||
{
|
||||
"gitsigns.nvim",
|
||||
opts = function()
|
||||
Snacks.toggle({
|
||||
name = "Git Signs",
|
||||
get = function()
|
||||
return require("gitsigns.config").config.signcolumn
|
||||
end,
|
||||
set = function(state)
|
||||
require("gitsigns").toggle_signs(state)
|
||||
end,
|
||||
}):map("<leader>uG")
|
||||
end,
|
||||
},
|
||||
|
||||
-- better diagnostics list and others
|
||||
{
|
||||
|
@ -55,17 +55,15 @@ return {
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
vim.g.ai_cmp and {
|
||||
"saghen/blink.cmp",
|
||||
optional = true,
|
||||
dependencies = { "codeium.nvim", "saghen/blink.compat" },
|
||||
opts = {
|
||||
sources = {
|
||||
compat = vim.g.ai_cmp and { "codeium" } or nil,
|
||||
compat = { "codeium" },
|
||||
providers = { codeium = { kind = "Codeium" } },
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
"codeium.nvim",
|
||||
vim.g.ai_cmp and "saghen/blink.compat" or nil,
|
||||
},
|
||||
},
|
||||
} or nil,
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ end
|
||||
return {
|
||||
{
|
||||
"CopilotC-Nvim/CopilotChat.nvim",
|
||||
branch = "canary",
|
||||
branch = "main",
|
||||
cmd = "CopilotChat",
|
||||
opts = function()
|
||||
local user = vim.env.USER or "User"
|
||||
|
@ -94,31 +94,21 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
-- blink.cmp
|
||||
{
|
||||
vim.g.ai_cmp and {
|
||||
"saghen/blink.cmp",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
{
|
||||
"giuxtaposition/blink-cmp-copilot",
|
||||
enabled = vim.g.ai_cmp, -- only enable if needed
|
||||
specs = {
|
||||
{
|
||||
"blink.cmp",
|
||||
optional = true,
|
||||
opts = {
|
||||
sources = {
|
||||
providers = {
|
||||
copilot = { name = "copilot", module = "blink-cmp-copilot" },
|
||||
},
|
||||
completion = {
|
||||
enabled_providers = { "copilot" },
|
||||
},
|
||||
},
|
||||
},
|
||||
dependencies = { "giuxtaposition/blink-cmp-copilot" },
|
||||
opts = {
|
||||
sources = {
|
||||
default = { "copilot" },
|
||||
providers = {
|
||||
copilot = {
|
||||
name = "copilot",
|
||||
module = "blink-cmp-copilot",
|
||||
kind = "Copilot",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} or nil,
|
||||
}
|
||||
|
@ -43,41 +43,17 @@ return {
|
||||
end,
|
||||
},
|
||||
|
||||
-- blink.cmp integration
|
||||
--
|
||||
-- FIXME: this currently doesn't work properly
|
||||
-- {
|
||||
-- "saghen/blink.cmp",
|
||||
-- optional = true,
|
||||
-- opts = {
|
||||
-- sources = {
|
||||
-- compat = vim.g.ai_cmp and { "supermaven" } or nil,
|
||||
-- },
|
||||
-- },
|
||||
-- dependencies = {
|
||||
-- "supermaven-nvim",
|
||||
-- vim.g.ai_cmp and "saghen/blink.compat" or nil,
|
||||
-- },
|
||||
-- },
|
||||
--
|
||||
-- Disabble cmp integration for now
|
||||
{
|
||||
vim.g.ai_cmp and {
|
||||
"saghen/blink.cmp",
|
||||
optional = true,
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
dependencies = { "supermaven-nvim", "saghen/blink.compat" },
|
||||
opts = {
|
||||
completion = { ghost_text = { enabled = false } },
|
||||
},
|
||||
dependencies = {
|
||||
{
|
||||
"supermaven-nvim",
|
||||
opts = {
|
||||
disable_inline_completion = false,
|
||||
},
|
||||
sources = {
|
||||
compat = { "supermaven" },
|
||||
providers = { supermaven = { kind = "Supermaven" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
} or nil,
|
||||
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
|
@ -1,25 +1,22 @@
|
||||
return {
|
||||
-- Tabnine cmp source
|
||||
{
|
||||
"tzachar/cmp-tabnine",
|
||||
build = LazyVim.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh",
|
||||
opts = {
|
||||
max_lines = 1000,
|
||||
max_num_results = 3,
|
||||
sort = true,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("cmp_tabnine.config"):setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-cmp",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
{
|
||||
"tzachar/cmp-tabnine",
|
||||
build = {
|
||||
LazyVim.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh",
|
||||
},
|
||||
dependencies = "hrsh7th/nvim-cmp",
|
||||
opts = {
|
||||
max_lines = 1000,
|
||||
max_num_results = 3,
|
||||
sort = true,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("cmp_tabnine.config"):setup(opts)
|
||||
end,
|
||||
},
|
||||
},
|
||||
dependencies = { "tzachar/cmp-tabnine" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, 1, {
|
||||
@ -36,6 +33,19 @@ return {
|
||||
end)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
optional = true,
|
||||
dependencies = { "tzachar/cmp-tabnine", "saghen/blink.compat" },
|
||||
opts = {
|
||||
sources = {
|
||||
compat = { "cmp_tabnine" },
|
||||
providers = { cmp_tabnine = { kind = "TabNine" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Show TabNine status in lualine
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
|
@ -17,6 +17,7 @@ return {
|
||||
opts_extend = {
|
||||
"sources.completion.enabled_providers",
|
||||
"sources.compat",
|
||||
"sources.default",
|
||||
},
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
@ -33,18 +34,26 @@ return {
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
highlight = {
|
||||
appearance = {
|
||||
-- sets the fallback highlight groups to nvim-cmp's highlight groups
|
||||
-- useful for when your theme doesn't support blink.cmp
|
||||
-- will be removed in a future release, assuming themes add support
|
||||
use_nvim_cmp_as_default = false,
|
||||
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||
-- adjusts spacing to ensure icons are aligned
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||
-- adjusts spacing to ensure icons are aligned
|
||||
nerd_font_variant = "mono",
|
||||
completion = {
|
||||
accept = {
|
||||
-- experimental auto-brackets support
|
||||
auto_brackets = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
menu = {
|
||||
winblend = vim.o.pumblend,
|
||||
draw = {
|
||||
treesitter = true,
|
||||
},
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
@ -55,19 +64,14 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
-- experimental auto-brackets support
|
||||
accept = { auto_brackets = { enabled = true } },
|
||||
|
||||
-- experimental signature help support
|
||||
-- trigger = { signature_help = { enabled = true } }
|
||||
-- signature = { 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" },
|
||||
},
|
||||
default = { "lsp", "path", "snippets", "buffer" },
|
||||
},
|
||||
|
||||
keymap = {
|
||||
@ -81,7 +85,7 @@ return {
|
||||
---@param opts blink.cmp.Config | { sources: { compat: string[] } }
|
||||
config = function(_, opts)
|
||||
-- setup compat sources
|
||||
local enabled = opts.sources.completion.enabled_providers
|
||||
local enabled = opts.sources.default
|
||||
for _, source in ipairs(opts.sources.compat or {}) do
|
||||
opts.sources.providers[source] = vim.tbl_deep_extend(
|
||||
"force",
|
||||
@ -92,6 +96,37 @@ return {
|
||||
table.insert(enabled, source)
|
||||
end
|
||||
end
|
||||
|
||||
-- TODO: remove when blink made a new release > 0.7.6
|
||||
if not vim.g.lazyvim_blink_main then
|
||||
opts.sources.completion = opts.sources.completion or {}
|
||||
opts.sources.completion.enabled_providers = enabled
|
||||
end
|
||||
|
||||
-- check if we need to override symbol kinds
|
||||
for _, provider in pairs(opts.sources.providers or {}) do
|
||||
---@cast provider blink.cmp.SourceProviderConfig|{kind?:string}
|
||||
if provider.kind then
|
||||
local CompletionItemKind = require("blink.cmp.types").CompletionItemKind
|
||||
local kind_idx = #CompletionItemKind + 1
|
||||
|
||||
CompletionItemKind[kind_idx] = provider.kind
|
||||
CompletionItemKind[provider.kind] = kind_idx
|
||||
|
||||
---@type fun(ctx: blink.cmp.Context, items: blink.cmp.CompletionItem[]): blink.cmp.CompletionItem[]
|
||||
local transform_items = provider.transform_items
|
||||
---@param ctx blink.cmp.Context
|
||||
---@param items blink.cmp.CompletionItem[]
|
||||
provider.transform_items = function(ctx, items)
|
||||
items = transform_items and transform_items(ctx, items) or items
|
||||
for _, item in ipairs(items) do
|
||||
item.kind = kind_idx or item.kind
|
||||
end
|
||||
return items
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require("blink.cmp").setup(opts)
|
||||
end,
|
||||
},
|
||||
@ -110,15 +145,9 @@ return {
|
||||
"saghen/blink.cmp",
|
||||
opts = {
|
||||
sources = {
|
||||
completion = {
|
||||
-- add lazydev to your completion providers
|
||||
enabled_providers = { "lazydev" },
|
||||
},
|
||||
-- add lazydev to your completion providers
|
||||
default = { "lazydev" },
|
||||
providers = {
|
||||
lsp = {
|
||||
-- dont show LuaLS require statements when lazydev has items
|
||||
fallback_for = { "lazydev" },
|
||||
},
|
||||
lazydev = {
|
||||
name = "LazyDev",
|
||||
module = "lazydev.integrations.blink",
|
||||
|
@ -14,6 +14,7 @@ return {
|
||||
"rafamadriz/friendly-snippets",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_vscode").lazy_load({ paths = { vim.fn.stdpath("config") .. "/snippets" } })
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
@ -29,6 +29,29 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"mini.diff",
|
||||
opts = function()
|
||||
Snacks.toggle({
|
||||
name = "Mini Diff Signs",
|
||||
get = function()
|
||||
return vim.g.minidiff_disable ~= true
|
||||
end,
|
||||
set = function(state)
|
||||
vim.g.minidiff_disable = not state
|
||||
if state then
|
||||
require("mini.diff").enable(0)
|
||||
else
|
||||
require("mini.diff").disable(0)
|
||||
end
|
||||
-- HACK: redraw to update the signs
|
||||
vim.defer_fn(function()
|
||||
vim.cmd([[redraw!]])
|
||||
end, 200)
|
||||
end,
|
||||
}):map("<leader>uG")
|
||||
end,
|
||||
},
|
||||
|
||||
-- lualine integration
|
||||
{
|
||||
|
@ -1,3 +1,13 @@
|
||||
if lazyvim_docs then
|
||||
-- LSP Server to use for Rust.
|
||||
-- Set to "bacon-ls" to use bacon-ls instead of rust-analyzer.
|
||||
-- only for diagnostics. The rest of LSP support will still be
|
||||
-- provided by rust-analyzer.
|
||||
vim.g.lazyvim_rust_diagnostics = "rust-analyzer"
|
||||
end
|
||||
|
||||
local diagnostics = vim.g.lazyvim_rust_diagnostics or "rust-analyzer"
|
||||
|
||||
return {
|
||||
recommended = function()
|
||||
return LazyVim.extras.wants({
|
||||
@ -35,7 +45,13 @@ return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
optional = true,
|
||||
opts = { ensure_installed = { "codelldb" } },
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "codelldb" })
|
||||
if diagnostics == "bacon-ls" then
|
||||
vim.list_extend(opts.ensure_installed, { "bacon" })
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
@ -62,8 +78,12 @@ return {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
-- Add clippy lints for Rust.
|
||||
checkOnSave = true,
|
||||
-- Add clippy lints for Rust if using rust-analyzer
|
||||
checkOnSave = diagnostics == "rust-analyzer",
|
||||
-- Enable diagnostics if using rust-analyzer
|
||||
diagnostics = {
|
||||
enable = diagnostics == "rust-analyzer",
|
||||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
ignored = {
|
||||
@ -77,6 +97,18 @@ return {
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
if LazyVim.has("mason.nvim") then
|
||||
local package_path = require("mason-registry").get_package("codelldb"):get_install_path()
|
||||
local codelldb = package_path .. "/extension/adapter/codelldb"
|
||||
local library_path = package_path .. "/extension/lldb/lib/liblldb.dylib"
|
||||
local uname = io.popen("uname"):read("*l")
|
||||
if uname == "Linux" then
|
||||
library_path = package_path .. "/extension/lldb/lib/liblldb.so"
|
||||
end
|
||||
opts.dap = {
|
||||
adapter = require("rustaceanvim.config").get_codelldb_adapter(codelldb, library_path),
|
||||
}
|
||||
end
|
||||
vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {})
|
||||
if vim.fn.executable("rust-analyzer") == 0 then
|
||||
LazyVim.error(
|
||||
@ -92,6 +124,9 @@ return {
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
bacon_ls = {
|
||||
enabled = diagnostics == "bacon-ls",
|
||||
},
|
||||
rust_analyzer = { enabled = false },
|
||||
},
|
||||
},
|
||||
|
@ -130,9 +130,7 @@ return {
|
||||
optional = true,
|
||||
opts = {
|
||||
sources = {
|
||||
completion = {
|
||||
enabled_providers = { "dadbod" },
|
||||
},
|
||||
default = { "dadbod" },
|
||||
providers = {
|
||||
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
|
||||
},
|
||||
|
@ -30,7 +30,7 @@ return {
|
||||
vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
|
||||
end,
|
||||
keys = {
|
||||
{ "<localLeader>l", "", desc = "+vimtex" },
|
||||
{ "<localLeader>l", "", desc = "+vimtex", ft = "tex" },
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -23,6 +23,7 @@ return {
|
||||
"mason",
|
||||
"neo-tree",
|
||||
"notify",
|
||||
"snacks_dashboard",
|
||||
"snacks_notif",
|
||||
"snacks_terminal",
|
||||
"snacks_win",
|
||||
@ -33,6 +34,13 @@ return {
|
||||
vim.b.miniindentscope_disable = true
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "SnacksDashboardOpened",
|
||||
callback = function(data)
|
||||
vim.b[data.buf].miniindentscope_disable = true
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- Show context of the current function
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
event = "VeryLazy",
|
||||
event = "LazyFile",
|
||||
opts = function()
|
||||
local tsc = require("treesitter-context")
|
||||
Snacks.toggle({
|
||||
|
@ -39,11 +39,12 @@ return {
|
||||
pattern = {
|
||||
[".*/waybar/config"] = "jsonc",
|
||||
[".*/mako/config"] = "dosini",
|
||||
[".*/kitty/.+%.conf"] = "bash",
|
||||
[".*/kitty/.+%.conf"] = "kitty",
|
||||
[".*/hypr/.+%.conf"] = "hyprlang",
|
||||
["%.env%.[%w_.-]+"] = "sh",
|
||||
},
|
||||
})
|
||||
vim.treesitter.language.register("bash", "kitty")
|
||||
|
||||
add("git_config")
|
||||
|
||||
|
@ -33,9 +33,18 @@ end
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyVimKeymapsDefaults",
|
||||
callback = function()
|
||||
-- VSCode-specific keymaps for search and navigation
|
||||
vim.keymap.set("n", "<leader><space>", "<cmd>Find<cr>")
|
||||
vim.keymap.set("n", "<leader>/", [[<cmd>lua require('vscode').action('workbench.action.findInFiles')<cr>]])
|
||||
vim.keymap.set("n", "<leader>ss", [[<cmd>lua require('vscode').action('workbench.action.gotoSymbol')<cr>]])
|
||||
|
||||
-- Keep undo/redo lists in sync with VsCode
|
||||
vim.keymap.set("n", "u", "<Cmd>call VSCodeNotify('undo')<CR>")
|
||||
vim.keymap.set("n", "<C-r>", "<Cmd>call VSCodeNotify('redo')<CR>")
|
||||
|
||||
-- Navigate VSCode tabs like lazyvim buffers
|
||||
vim.keymap.set("n", "<S-h>", "<Cmd>call VSCodeNotify('workbench.action.previousEditor')<CR>")
|
||||
vim.keymap.set("n", "<S-l>", "<Cmd>call VSCodeNotify('workbench.action.nextEditor')<CR>")
|
||||
end,
|
||||
})
|
||||
|
||||
|
@ -100,20 +100,6 @@ function M.add_missing_snippet_docs(window)
|
||||
end
|
||||
end
|
||||
|
||||
function M.visible()
|
||||
---@module 'blink.cmp'
|
||||
local blink = package.loaded["blink.cmp"]
|
||||
if blink then
|
||||
return blink.windows and blink.windows.autocomplete.win:is_open()
|
||||
end
|
||||
---@module 'cmp'
|
||||
local cmp = package.loaded["cmp"]
|
||||
if cmp then
|
||||
return cmp.core.view:visible()
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- This is a better implementation of `cmp.confirm`:
|
||||
-- * check if the completion menu is visible without waiting for running sources
|
||||
-- * create an undo point before confirming
|
||||
|
@ -34,7 +34,7 @@ end
|
||||
function M.maximize()
|
||||
---@type {k:string, v:any}[]?
|
||||
local maximized = nil
|
||||
return Snacks.toggle({
|
||||
local toggle = Snacks.toggle({
|
||||
name = "Maximize",
|
||||
get = function()
|
||||
return maximized ~= nil
|
||||
@ -51,16 +51,6 @@ function M.maximize()
|
||||
set("winminwidth", 10)
|
||||
set("winminheight", 4)
|
||||
vim.cmd("wincmd =")
|
||||
-- `QuitPre` seems to be executed even if we quit a normal window, so we don't want that
|
||||
-- `VimLeavePre` might be another consideration? Not sure about differences between the 2
|
||||
vim.api.nvim_create_autocmd("ExitPre", {
|
||||
once = true,
|
||||
group = vim.api.nvim_create_augroup("lazyvim_restore_max_exit_pre", { clear = true }),
|
||||
desc = "Restore width/height when close Neovim while maximized",
|
||||
callback = function()
|
||||
M.maximize.set(false)
|
||||
end,
|
||||
})
|
||||
else
|
||||
for _, opt in ipairs(maximized) do
|
||||
vim.o[opt.k] = opt.v
|
||||
@ -70,6 +60,19 @@ function M.maximize()
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- `QuitPre` seems to be executed even if we quit a normal window, so we don't want that
|
||||
-- `VimLeavePre` might be another consideration? Not sure about differences between the 2
|
||||
vim.api.nvim_create_autocmd("ExitPre", {
|
||||
group = vim.api.nvim_create_augroup("lazyvim_restore_max_exit_pre", { clear = true }),
|
||||
desc = "Restore width/height when close Neovim while maximized",
|
||||
callback = function()
|
||||
if toggle:get() then
|
||||
toggle:set(false)
|
||||
end
|
||||
end,
|
||||
})
|
||||
return toggle
|
||||
end
|
||||
|
||||
return M
|
||||
|
Reference in New Issue
Block a user