From bad8d58693d52b270f1e75259523581cf1353b6e Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Mon, 10 Jun 2024 16:55:35 -0600 Subject: [PATCH] Remove TroubleV3 extra since it is no longer present in LazyExtras and is now rolled into the main branch. --- docs/extras/editor/trouble-v3.md | 261 ------------------------------- 1 file changed, 261 deletions(-) delete mode 100644 docs/extras/editor/trouble-v3.md diff --git a/docs/extras/editor/trouble-v3.md b/docs/extras/editor/trouble-v3.md deleted file mode 100644 index 222b8a213b..0000000000 --- a/docs/extras/editor/trouble-v3.md +++ /dev/null @@ -1,261 +0,0 @@ -# `Trouble-v3` - - - -:::info -You can enable the extra with the `:LazyExtras` command. -Plugins marked as optional will only be configured if they are installed. -::: - -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.trouble-v3" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. - -:::caution -You don't need to copy the default settings to your config. -They are only shown here for reference. -::: - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -## [trouble.nvim](https://github.com/folke/trouble.nvim) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "folke/trouble.nvim", - branch = "dev", - keys = { - { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)" }, - { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, - { "cs", "Trouble symbols toggle focus=false", desc = "Symbols (Trouble)" }, - { - "cS", - "Trouble lsp toggle focus=false win.position=right", - desc = "LSP references/definitions/... (Trouble)", - }, - { "xL", "Trouble loclist toggle", desc = "Location List (Trouble)" }, - { "xQ", "Trouble qflist toggle", desc = "Quickfix List (Trouble)" }, - { - "[q", - function() - if require("trouble").is_open() then - require("trouble").prev({ skip_groups = true, jump = true }) - else - local ok, err = pcall(vim.cmd.cprev) - if not ok then - vim.notify(err, vim.log.levels.ERROR) - end - end - end, - desc = "Previous Trouble/Quickfix Item", - }, - }, -} -``` - - - - - -## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) _(optional)_ - - lualine integration - - - - - - -```lua -opts = function(_, opts) - local trouble = require("trouble") - if not trouble.statusline then - LazyVim.error("You have enabled the **trouble-v3** extra,\nbut still need to update it with `:Lazy`") - return - end - - local symbols = trouble.statusline({ - mode = "symbols", - groups = {}, - title = false, - filter = { range = true }, - format = "{kind_icon}{symbol.name:Normal}", - hl_group = "lualine_c_normal", - }) - table.insert(opts.sections.lualine_c, { - symbols.get, - cond = symbols.has, - }) -end -``` - - - - - - -```lua -{ - "nvim-lualine/lualine.nvim", - optional = true, - opts = function(_, opts) - local trouble = require("trouble") - if not trouble.statusline then - LazyVim.error("You have enabled the **trouble-v3** extra,\nbut still need to update it with `:Lazy`") - return - end - - local symbols = trouble.statusline({ - mode = "symbols", - groups = {}, - title = false, - filter = { range = true }, - format = "{kind_icon}{symbol.name:Normal}", - hl_group = "lualine_c_normal", - }) - table.insert(opts.sections.lualine_c, { - symbols.get, - cond = symbols.has, - }) - end, -} -``` - - - - - -## [edgy.nvim](https://github.com/folke/edgy.nvim) _(optional)_ - - - - - -```lua -opts = function(_, opts) - for _, pos in ipairs({ "top", "bottom", "left", "right" }) do - opts[pos] = opts[pos] or {} - table.insert(opts[pos], { - ft = "trouble", - filter = function(_buf, win) - return vim.w[win].trouble - and vim.w[win].trouble.position == pos - and vim.w[win].trouble.type == "split" - and vim.w[win].trouble.relative == "editor" - and not vim.w[win].trouble_preview - end, - }) - end -end -``` - - - - - - -```lua -{ - "folke/edgy.nvim", - optional = true, - opts = function(_, opts) - for _, pos in ipairs({ "top", "bottom", "left", "right" }) do - opts[pos] = opts[pos] or {} - table.insert(opts[pos], { - ft = "trouble", - filter = function(_buf, win) - return vim.w[win].trouble - and vim.w[win].trouble.position == pos - and vim.w[win].trouble.type == "split" - and vim.w[win].trouble.relative == "editor" - and not vim.w[win].trouble_preview - end, - }) - end - end, -} -``` - - - - - -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ - - - - - -```lua -opts = function(_, opts) - local open_with_trouble = require("trouble.sources.telescope").open - return vim.tbl_deep_extend("force", opts, { - defaults = { - mappings = { - i = { - [""] = open_with_trouble, - [""] = open_with_trouble, - }, - }, - }, - }) -end -``` - - - - - - -```lua -{ - "nvim-telescope/telescope.nvim", - optional = true, - opts = function(_, opts) - local open_with_trouble = require("trouble.sources.telescope").open - return vim.tbl_deep_extend("force", opts, { - defaults = { - mappings = { - i = { - [""] = open_with_trouble, - [""] = open_with_trouble, - }, - }, - }, - }) - end, -} -``` - - - - - -