diff --git a/.config/nvim/lua/plugins/extras/editor/outline.lua b/.config/nvim/lua/plugins/extras/editor/outline.lua index cfcd0d4f..37515b72 100644 --- a/.config/nvim/lua/plugins/extras/editor/outline.lua +++ b/.config/nvim/lua/plugins/extras/editor/outline.lua @@ -27,6 +27,7 @@ return { ft = "Outline", pinned = true, open = "OutlineOpen", + size = { width = 0.15 }, }) end, }, diff --git a/.config/nvim/lua/plugins/extras/editor/treesitter-playground.lua b/.config/nvim/lua/plugins/extras/editor/treesitter-playground.lua new file mode 100644 index 00000000..1300f4a5 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/editor/treesitter-playground.lua @@ -0,0 +1,41 @@ +if vim.fn.has("nvim-0.10") == 1 then + return { + { + "nvim-treesitter/nvim-treesitter", + dependencies = { + "nvim-treesitter/playground", + }, + build = ":TSInstall query", + opts = { + playground = { + enable = true, + }, + query_linter = { + enable = true, + use_virtual_text = true, + lint_events = { "BufWrite", "CursorHold" }, + }, + }, + keys = { + { "ciT", "TSHighlightCapturesUnderCursor", desc = "Treesitter Highlight Groups" }, + { "cit", "TSPlaygroundToggle", desc = "Treesitter Playground" }, + }, + }, + { + "folke/edgy.nvim", + optional = true, + opts = function(_, opts) + opts.right = opts.right or {} + table.insert(opts.right, { + title = "TS Playground", + ft = "tsplayground", + pinned = true, + open = "TSPlaygroundToggle", + size = { width = 0.3 }, + }) + end, + }, + } +else + vim.notify("Treesitter Playground only works with the nightly build") +end