Compare commits

..

19 Commits

Author SHA1 Message Date
2b3bd6c013 fix: disable telescope 2024-06-10 21:57:28 +02:00
31c40573db feat: added ctrl-f and ctrl-b to scroll the preview window 2024-06-10 21:55:40 +02:00
9cc5d3df50 fix: fix path formatting for grep 2024-06-10 20:59:42 +02:00
6761d8efc8 chore: cleanup 2024-06-10 20:44:43 +02:00
0d05715411 feat: consistent prompt symbols for all pickers 2024-06-10 20:44:32 +02:00
dd5a5fb4cd feat: use ctrl-r to toggle between rootdir/cwd 2024-06-10 20:44:13 +02:00
9f98b0a01e chore: remove fzf_colors code since PR has been merged 2024-06-10 20:43:40 +02:00
b74db85447 feat(fzf-lua): added support for todo-comments 2024-06-10 18:10:13 +02:00
c155b2e965 feat: added symbols filter 2024-06-10 17:31:26 +02:00
6a07e6522a refactor: temp code for better fzf_colors 2024-06-10 17:10:37 +02:00
26254487fb feat: added toggle for hidden/ignore 2024-06-10 17:10:07 +02:00
f9697cbf17 feat: root-dir toggle 2024-06-10 17:09:43 +02:00
7eac9a854b refactor: trouble 2024-06-10 17:09:33 +02:00
4947802191 feat: fzf_colors based on Neovim colorscheme 2024-06-10 14:23:18 +02:00
60d472a569 fix: fzf smart open 2024-06-10 06:40:43 +02:00
252197f659 Update lua/lazyvim/plugins/extras/editor/fzf.lua
Co-authored-by: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com>
2024-06-09 23:27:22 +02:00
e29ad4a14e refactor: LazyVim.pick 2024-06-09 23:13:53 +02:00
1b34b481c8 feat: added trouble integration 2024-06-09 23:13:53 +02:00
bedeb66fa9 feat(extras): added fzf-lua 2024-06-09 23:13:53 +02:00
99 changed files with 1069 additions and 2567 deletions

View File

@ -1,8 +0,0 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
charset = utf-8

View File

@ -1,3 +0,0 @@
{
".": "12.29.2"
}

View File

@ -6,10 +6,7 @@ body:
- type: markdown
attributes:
value: |
**Before** reporting an issue, make sure to read the [documentation](https://github.com/LazyVim/LazyVim)
and search [existing issues](https://github.com/LazyVim/LazyVim/issues).
Usage questions such as ***"How do I...?"*** belong in [Discussions](https://github.com/LazyVim/LazyVim/discussions) and will be closed.
**Before** reporting an issue, make sure to read the [documentation](https://github.com/folke/LazyVim) and search [existing issues](https://github.com/folke/LazyVim/issues). Usage questions such as ***"How do I...?"*** belong in [Discussions](https://github.com/folke/LazyVim/discussions) and will be closed.
- type: checkboxes
attributes:
label: Did you check docs and existing issues?
@ -60,15 +57,33 @@ body:
label: Repro
description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
value: |
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
require("lazy.minit").repro({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- add any other plugins here
},
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
"folke/LazyVim",
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
render: lua
vim.cmd.colorscheme("tokyonight")
-- add anything else here
render: Lua
validations:
required: false

View File

@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
- name: Ask a question or start a discussion
url: https://github.com/LazyVim/LazyVim/discussions
about: Use Github discussions instead

View File

@ -1,19 +0,0 @@
## Description
<!-- Describe the big picture of your changes to communicate to the maintainers
why we should accept this pull request. -->
## Related Issue(s)
<!--
If this PR fixes any issues, please link to the issue here.
- Fixes #<issue_number>
-->
## Screenshots
<!-- Add screenshots of the changes if applicable. -->
## Checklist
- [ ] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.

View File

@ -1,6 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

View File

@ -1,9 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "simple",
"extra-files": ["lua/lazyvim/config/init.lua"]
}
}
}

View File

@ -1,14 +1,81 @@
name: CI
on:
push:
branches: [main, master]
pull_request:
jobs:
ci:
uses: folke/github/.github/workflows/ci.yml@main
secrets: inherit
with:
plugin: LazyVim
repo: LazyVim/LazyVim
stylua:
name: Stylua Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .
tests:
strategy:
matrix:
# os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Neovim
shell: bash
run: |
mkdir -p /tmp/nvim
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage
cd /tmp/nvim
chmod a+x ./nvim.appimage
./nvim.appimage --appimage-extract
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
- name: Run Tests
run: |
nvim --version
[ ! -d tests ] && exit 0
./tests/run
docs:
runs-on: ubuntu-latest
needs: tests
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: LazyVim
version: "Neovim >= 0.9.0"
demojify: true
treesitter: true
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore(build): auto-generate vimdoc"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
release:
name: release
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- docs
- tests
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: simple
- uses: actions/checkout@v4
- name: tag stable versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
git tag -d stable || true
git push origin :stable || true
git tag -a stable -m "Last Stable Release"
git push origin stable

View File

@ -1,8 +1,12 @@
name: "PR Labeler"
name: "Pull Request Labeler"
on:
- pull_request_target
jobs:
labeler:
uses: folke/github/.github/workflows/labeler.yml@main
secrets: inherit
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5

View File

@ -1,4 +1,4 @@
name: PR Title
name: "Lint PR"
on:
pull_request_target:
@ -6,13 +6,36 @@ on:
- opened
- edited
- synchronize
- reopened
- ready_for_review
permissions:
pull-requests: read
jobs:
pr-title:
uses: folke/github/.github/workflows/pr.yml@main
secrets: inherit
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
requireScope: true
subjectPattern: ^(?![A-Z]).+$
scopes: |
.+
types: |
build
chore
ci
docs
feat
fix
merge
perf
refactor
revert
style
test
wip
ignoreLabels: |
autorelease: pending

View File

@ -1,10 +1,27 @@
name: Stale Issues & PRs
name: Close stale issues and PRs
on:
workflow_dispatch:
schedule:
- cron: "30 1 * * *"
jobs:
ci:
uses: folke/github/.github/workflows/stale.yml@main
secrets: inherit
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
operations-per-run: 300
# default stale time
days-before-stale: 30
days-before-close: 7
# never stale pull requests
# days-before-pr-stale: -1
days-before-pr-close: -1
# exclude issues with certain labels
exempt-issue-labels: pinned,wip,security,notice
# never stale issues attached to a milestone
# exempt-all-milestones: true
stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days."
stale-pr-message: "This PR is stale because it has been open 60 days with no activity."
close-issue-message: "This issue was closed because it has been stalled for 7 days with no activity."

View File

@ -1,12 +0,0 @@
name: Update Repo
on:
workflow_dispatch:
schedule:
# Run every hour
- cron: "0 * * * *"
jobs:
ci:
uses: folke/github/.github/workflows/update.yml@main
secrets: inherit

15
.gitignore vendored
View File

@ -1,9 +1,8 @@
*.log
/.repro
/.tests
/build
/debug
/doc/tags
foo.*
node_modules
tt.*
.tests
doc/tags
debug
.repro
foo.*
*.log
data

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +0,0 @@
# Contributing to LazyVim
## General Guidelines
- Avoid using Vim plugins whenever possible.
- If an extra requires a Vim plugin, explain why in the PR description.
- Ensure all configurations are overridable by the user, using Lazy's specs.
- Tag specs as `optional` if they should only be enabled when the user has them installed.
- Implement proper lazy-loading for every plugin added in an extra.
- Understand how Lazy's dependencies work. For Lua dependencies, do not specify
them in the `dependencies` field. Instead, add them as a separate spec with `lazy=true`.
## Contributing an Extra Plugin
- The plugin should be well-known and require significant configuration.
- Simple specs containing just the plugin with some options will not be accepted.
## Contributing an Extra Language
- You should be familiar with the language you are adding.
- You should have experience with the language's ecosystem, including formatters,
linters, and LSP servers.
- The extra should include the setup most widely used by the community.
- Include Tree-sitter parsers that are not yet the default.
- Include the most widely used LSP server setup.
- Avoid the need for LSP wrapper packages whenever possible.
- Only add a formatter if it is typically used by the community instead of the LSP formatter.
- Only add extra linters if the community typically uses them instead of just the LSP linters.
- Every language extra requires a `recommended` section as part of the extra.
Check lspconfig server configurations for the proper filetypes and root directories.
Refer to other extras for creating the `recommended` section.

View File

@ -113,10 +113,6 @@ docker run -w /root -it --rm alpine:edge sh -uelic '
[![Watch the video](https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg)](https://www.youtube.com/watch?v=N93cTbtLCIM)
[@dusty-phillips](https://github.com/dusty-phillips) 正在编写一本名为
[LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes)
的书,该书可在线免费获得。
## 📂 文件结构
config 下的文件会在适当的时候自动加载,所以你不需要手动引入这些文件。

View File

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim Last change: 2024 July 14
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 June 09
==============================================================================
Table of Contents *LazyVim-table-of-contents*

View File

@ -67,7 +67,6 @@ vim.api.nvim_create_autocmd("FileType", {
"neotest-summary",
"neotest-output-panel",
"dbout",
"gitsigns.blame",
},
callback = function(event)
vim.bo[event.buf].buflisted = false
@ -87,7 +86,7 @@ vim.api.nvim_create_autocmd("FileType", {
-- wrap and check for spell in text filetypes
vim.api.nvim_create_autocmd("FileType", {
group = augroup("wrap_spell"),
pattern = { "text", "plaintex", "typst", "gitcommit", "markdown" },
pattern = { "*.txt", "*.tex", "*.typ", "gitcommit", "markdown" },
callback = function()
vim.opt_local.wrap = true
vim.opt_local.spell = true
@ -114,29 +113,3 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, {
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
end,
})
vim.filetype.add({
pattern = {
[".*"] = {
function(path, buf)
return vim.bo[buf]
and vim.bo[buf].filetype ~= "bigfile"
and path
and vim.fn.getfsize(path) > vim.g.bigfile_size
and "bigfile"
or nil
end,
},
},
})
vim.api.nvim_create_autocmd({ "FileType" }, {
group = augroup("bigfile"),
pattern = "bigfile",
callback = function(ev)
vim.b.minianimate_disable = true
vim.schedule(function()
vim.bo[ev.buf].syntax = vim.filetype.match({ buf = ev.buf }) or ""
end)
end,
})

View File

@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
---@class LazyVimConfig: LazyVimOptions
local M = {}
M.version = "12.29.2" -- x-release-please-version
M.version = "10.21.1" -- x-release-please-version
LazyVim.config = M
---@class LazyVimOptions
@ -136,7 +136,6 @@ local defaults = {
M.json = {
version = 6,
path = vim.g.lazyvim_json or vim.fn.stdpath("config") .. "/lazyvim.json",
data = {
version = nil, ---@type string?
news = {}, ---@type table<string, string>
@ -145,7 +144,8 @@ M.json = {
}
function M.json.load()
local f = io.open(M.json.path, "r")
local path = vim.fn.stdpath("config") .. "/lazyvim.json"
local f = io.open(path, "r")
if f then
local data = f:read("*a")
f:close()
@ -248,17 +248,16 @@ function M.load(name)
end, { msg = "Failed loading " .. mod })
end
end
local pattern = "LazyVim" .. name:sub(1, 1):upper() .. name:sub(2)
-- always load lazyvim, then user file
if M.defaults[name] or name == "options" then
_load("lazyvim.config." .. name)
vim.api.nvim_exec_autocmds("User", { pattern = pattern .. "Defaults", modeline = false })
end
_load("config." .. name)
if vim.bo.filetype == "lazy" then
-- HACK: LazyVim may have overwritten options of the Lazy ui, so reset this here
vim.cmd([[do VimResized]])
end
local pattern = "LazyVim" .. name:sub(1, 1):upper() .. name:sub(2)
vim.api.nvim_exec_autocmds("User", { pattern = pattern, modeline = false })
end

View File

@ -5,12 +5,6 @@ vim.g.maplocalleader = "\\"
-- LazyVim auto format
vim.g.autoformat = true
-- LazyVim picker to use.
-- Can be one of: telescope, fzf
-- Leave it to "auto" to automatically use the picker
-- enabled with `:LazyExtras`
vim.g.lazyvim_picker = "auto"
-- LazyVim root dir detection
-- Each entry can be:
-- * the name of a detector function like `lsp` or `cwd`
@ -40,12 +34,6 @@ vim.g.lazyvim_statuscolumn = {
-- Hide deprecation warnings
vim.g.deprecation_warnings = false
-- Set filetype to `bigfile` for files larger than 1.5 MB
-- Only vim syntax will be enabled (with the correct filetype)
-- LSP, treesitter and other ft plugins will be disabled.
-- mini.animate will also be disabled.
vim.g.bigfile_size = 1024 * 1024 * 1.5 -- 1.5 MB
-- Show the current document symbols location from Trouble in lualine
vim.g.trouble_lualine = true
@ -75,7 +63,6 @@ opt.grepformat = "%f:%l:%c:%m"
opt.grepprg = "rg --vimgrep"
opt.ignorecase = true -- Ignore case
opt.inccommand = "nosplit" -- preview incremental substitute
opt.jumpoptions = "view"
opt.laststatus = 3 -- global statusline
opt.linebreak = true -- Wrap lines at convenient points
opt.list = true -- Show some invisible characters (tabs...

View File

@ -23,19 +23,19 @@ return {
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
local cmp = require("cmp")
local defaults = require("cmp.config.default")()
local auto_select = true
return {
auto_brackets = {}, -- configure any filetype to auto add brackets
completion = {
completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"),
completeopt = "menu,menuone,noinsert",
},
preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None,
mapping = cmp.mapping.preset.insert({
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = LazyVim.cmp.confirm({ select = auto_select }),
["<C-y>"] = LazyVim.cmp.confirm({ select = true }),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = LazyVim.cmp.confirm(),
["<S-CR>"] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<C-CR>"] = function(fallback)
cmp.abort()
@ -49,23 +49,11 @@ return {
{ name = "buffer" },
}),
formatting = {
format = function(entry, item)
local icons = LazyVim.config.icons.kinds
format = function(_, item)
local icons = require("lazyvim.config").icons.kinds
if icons[item.kind] then
item.kind = icons[item.kind] .. item.kind
end
local widths = {
abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40,
menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30,
}
for key, width in pairs(widths) do
if item[key] and vim.fn.strdisplaywidth(item[key]) > width then
item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. ""
end
end
return item
end,
},
@ -77,7 +65,32 @@ return {
sorting = defaults.sorting,
}
end,
main = "lazyvim.util.cmp",
---@param opts cmp.ConfigSchema | {auto_brackets?: string[]}
config = function(_, opts)
for _, source in ipairs(opts.sources) do
source.group_index = source.group_index or 1
end
local parse = require("cmp.utils.snippet").parse
require("cmp.utils.snippet").parse = function(input)
local ok, ret = pcall(parse, input)
if ok then
return ret
end
return LazyVim.cmp.snippet_preview(input)
end
local cmp = require("cmp")
cmp.setup(opts)
cmp.event:on("confirm_done", function(event)
if vim.tbl_contains(opts.auto_brackets or {}, vim.bo.filetype) then
LazyVim.cmp.auto_brackets(event.entry)
end
end)
cmp.event:on("menu_opened", function(event)
LazyVim.cmp.add_missing_snippet_docs(event.window)
end)
end,
},
-- snippets
@ -115,7 +128,7 @@ return {
{
"<S-Tab>",
function()
return vim.snippet.active({ direction = -1 }) and "<cmd>lua vim.snippet.jump(-1)<cr>" or "<S-Tab>"
return vim.snippet.active({ direction = -1 }) and "<cmd>lua vim.snippet.jump(-1)<cr>" or "<Tab>"
end,
expr = true,
silent = true,
@ -129,16 +142,9 @@ return {
"echasnovski/mini.pairs",
event = "VeryLazy",
opts = {
modes = { insert = true, command = true, terminal = false },
-- skip autopair when next character is one of these
skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
-- skip autopair when the cursor is inside these treesitter nodes
skip_ts = { "string" },
-- skip autopair when next character is closing pair
-- and there are more closing pairs than opening pairs
skip_unbalanced = true,
-- better deal with markdown code blocks
markdown = true,
mappings = {
["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^\\`].", register = { cr = false } },
},
},
keys = {
{
@ -154,9 +160,6 @@ return {
desc = "Toggle Auto Pairs",
},
},
config = function(_, opts)
LazyVim.mini.pairs(opts)
end,
},
-- comments

View File

@ -26,13 +26,4 @@ return {
"neovim/nvim-lspconfig",
dependencies = {},
},
-- dummy import to save core imports
{
import = "foobar",
enabled = function()
LazyVim.plugin.save_core()
return false
end,
},
}

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,3 @@
local M = {}
---@param kind string
function M.pick(kind)
return function()
local actions = require("CopilotChat.actions")
local items = actions[kind .. "_actions"]()
if not items then
LazyVim.warn("No " .. kind .. " found on the current line")
return
end
local ok = pcall(require, "fzf-lua")
require("CopilotChat.integrations." .. (ok and "fzflua" or "telescope")).pick(items)
end
end
return {
{
"CopilotC-Nvim/CopilotChat.nvim",
@ -38,8 +22,7 @@ return {
}
end,
keys = {
{ "<c-s>", "<CR>", ft = "copilot-chat", desc = "Submit Prompt", remap = true },
{ "<leader>a", "", desc = "+ai", mode = { "n", "v" } },
{ "<leader>a", "", desc = "+ai" },
{
"<leader>aa",
function()
@ -67,10 +50,6 @@ return {
desc = "Quick Chat (CopilotChat)",
mode = { "n", "v" },
},
-- Show help actions with telescope
{ "<leader>ad", M.pick("help"), desc = "Diagnostic Help (CopilotChat)", mode = { "n", "v" } },
-- Show prompts actions with telescope
{ "<leader>ap", M.pick("prompt"), desc = "Prompt Actions (CopilotChat)", mode = { "n", "v" } },
},
config = function(_, opts)
local chat = require("CopilotChat")
@ -88,6 +67,39 @@ return {
end,
},
-- Telescope integration
{
"nvim-telescope/telescope.nvim",
optional = true,
keys = {
-- Show help actions with telescope
{
"<leader>ad",
function()
local actions = require("CopilotChat.actions")
local help = actions.help_actions()
if not help then
LazyVim.warn("No diagnostics found on the current line")
return
end
require("CopilotChat.integrations.telescope").pick(help)
end,
desc = "Diagnostic Help (CopilotChat)",
mode = { "n", "v" },
},
-- Show prompts actions with telescope
{
"<leader>ap",
function()
local actions = require("CopilotChat.actions")
require("CopilotChat.integrations.telescope").pick(actions.prompt_actions())
end,
desc = "Prompt Actions (CopilotChat)",
mode = { "n", "v" },
},
},
},
-- Edgy integration
{
"folke/edgy.nvim",

View File

@ -27,7 +27,7 @@ return {
}
table.insert(opts.sections.lualine_x, 2, {
function()
local icon = LazyVim.config.icons.kinds.Copilot
local icon = require("lazyvim.config").icons.kinds.Copilot
local status = require("copilot.api").status.data
return icon .. (status.message or "")
end,

View File

@ -42,7 +42,7 @@ return {
optional = true,
event = "VeryLazy",
opts = function(_, opts)
local icon = LazyVim.config.icons.kinds.TabNine
local icon = require("lazyvim.config").icons.kinds.TabNine
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("cmp_tabnine", icon))
end,
},

View File

@ -8,23 +8,13 @@ return {
highlight = { timer = 150 },
},
keys = {
{
"<leader>p",
function()
if LazyVim.pick.picker.name == "telescope" then
require("telescope").extensions.yank_history.yank_history({})
else
vim.cmd([[YankyRingHistory]])
end
end,
desc = "Open Yank History",
},
-- stylua: ignore
{ "<leader>p", function() require("telescope").extensions.yank_history.yank_history({ }) end, desc = "Open Yank History" },
{ "y", "<Plug>(YankyYank)", mode = { "n", "x" }, desc = "Yank Text" },
{ "p", "<Plug>(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Text After Cursor" },
{ "P", "<Plug>(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Text Before Cursor" },
{ "gp", "<Plug>(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put Text After Selection" },
{ "gP", "<Plug>(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put Text Before Selection" },
{ "p", "<Plug>(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Cursor" },
{ "P", "<Plug>(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Cursor" },
{ "gp", "<Plug>(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Selection" },
{ "gP", "<Plug>(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Selection" },
{ "[y", "<Plug>(YankyCycleForward)", desc = "Cycle Forward Through Yank History" },
{ "]y", "<Plug>(YankyCycleBackward)", desc = "Cycle Backward Through Yank History" },
{ "]p", "<Plug>(YankyPutIndentAfterLinewise)", desc = "Put Indented After Cursor (Linewise)" },

View File

@ -17,7 +17,33 @@ return {
desc = "Debugging support. Requires language specific adapters to be configured. (see lang extras)",
dependencies = {
"rcarriga/nvim-dap-ui",
-- fancy UI for the debugger
{
"rcarriga/nvim-dap-ui",
dependencies = { "nvim-neotest/nvim-nio" },
-- stylua: ignore
keys = {
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
},
opts = {},
config = function(_, opts)
local dap = require("dap")
local dapui = require("dapui")
dapui.setup(opts)
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open({})
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close({})
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close({})
end
end,
},
-- virtual text for the debugger
{
"theHamsta/nvim-dap-virtual-text",
@ -48,14 +74,10 @@ return {
},
config = function()
-- load mason-nvim-dap here, after all adapters have been setup
if LazyVim.has("mason-nvim-dap.nvim") then
require("mason-nvim-dap").setup(LazyVim.opts("mason-nvim-dap.nvim"))
end
local Config = require("lazyvim.config")
vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" })
for name, sign in pairs(LazyVim.config.icons.dap) do
for name, sign in pairs(Config.icons.dap) do
sign = type(sign) == "table" and sign or { sign }
vim.fn.sign_define(
"Dap" .. name,
@ -72,32 +94,6 @@ return {
end,
},
-- fancy UI for the debugger
{
"rcarriga/nvim-dap-ui",
dependencies = { "nvim-neotest/nvim-nio" },
-- stylua: ignore
keys = {
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
},
opts = {},
config = function(_, opts)
local dap = require("dap")
local dapui = require("dapui")
dapui.setup(opts)
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open({})
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close({})
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close({})
end
end,
},
-- mason.nvim integration
{
"jay-babu/mason-nvim-dap.nvim",
@ -118,7 +114,5 @@ return {
-- Update this to ensure that you have the debuggers for the langs you want
},
},
-- mason-nvim-dap is loaded when nvim-dap loads
config = function() end,
},
}

View File

@ -1,10 +1,12 @@
local Config = require("lazyvim.config")
return {
desc = "Aerial Symbol Browser",
{
"stevearc/aerial.nvim",
event = "LazyFile",
opts = function()
local icons = vim.deepcopy(LazyVim.config.icons.kinds)
local icons = vim.deepcopy(Config.icons.kinds)
-- HACK: fix lua's weird choice for `Package` for control
-- structures like if/else/for/etc.
@ -12,8 +14,8 @@ return {
---@type table<string, string[]>|false
local filter_kind = false
if LazyVim.config.kind_filter then
filter_kind = assert(vim.deepcopy(LazyVim.config.kind_filter))
if Config.kind_filter then
filter_kind = assert(vim.deepcopy(Config.kind_filter))
filter_kind._ = filter_kind.default
filter_kind.default = nil
end

View File

@ -1,4 +1,6 @@
local M = {}
---@type table<string, table<string, string[]>>
M.dials_by_ft = {}
---@param increment boolean
---@param g? boolean
@ -7,7 +9,7 @@ function M.dial(increment, g)
-- Use visual commands for VISUAL 'v', VISUAL LINE 'V' and VISUAL BLOCK '\22'
local is_visual = mode == "v" or mode == "V" or mode == "\22"
local func = (increment and "inc" or "dec") .. (g and "_g" or "_") .. (is_visual and "visual" or "normal")
local group = vim.g.dials_by_ft[vim.bo.filetype] or "default"
local group = M.dials_by_ft[vim.bo.filetype] or "default"
return require("dial.map")[func](group)
end
@ -108,26 +110,21 @@ return {
scss = "css",
typescript = "typescript",
typescriptreact = "typescript",
yaml = "yaml",
},
groups = {
default = {
augend.integer.alias.decimal, -- nonnegative decimal number (0, 1, 2, 3, ...)
augend.integer.alias.hex, -- nonnegative hex number (0x01, 0x1a1f, etc.)
augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.)
ordinal_numbers,
weekdays,
months,
},
typescript = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
augend.constant.alias.bool, -- boolean value (true <-> false)
logical_alias,
augend.constant.new({ elements = { "let", "const" } }),
},
yaml = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
augend.constant.alias.bool, -- boolean value (true <-> false)
ordinal_numbers,
weekdays,
months,
},
css = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
@ -140,6 +137,9 @@ return {
},
markdown = {
augend.misc.alias.markdown_header,
ordinal_numbers,
weekdays,
months,
},
json = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
@ -153,17 +153,23 @@ return {
word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc.
cyclic = true, -- "or" is incremented into "and".
}),
ordinal_numbers,
weekdays,
months,
},
python = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
capitalized_boolean,
logical_alias,
ordinal_numbers,
weekdays,
months,
},
},
}
end,
config = function(_, opts)
require("dial.config").augends:register_group(opts.groups)
vim.g.dials_by_ft = opts.dials_by_ft
M.dials_by_ft = opts.dials_by_ft
end,
}

Some files were not shown because too many files have changed in this diff Show More