From 73dfaec988f8c985be5ac7b0f592659086bb1536 Mon Sep 17 00:00:00 2001 From: poslop Date: Mon, 9 Feb 2026 10:49:50 -0600 Subject: [PATCH] clip and ts --- lua/config/opts.lua | 2 ++ lua/plugins/syntax.lua | 52 +++++++++++++++++++++++++----------------- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/lua/config/opts.lua b/lua/config/opts.lua index a76c6c4..31487ef 100644 --- a/lua/config/opts.lua +++ b/lua/config/opts.lua @@ -1,3 +1,5 @@ +vim.opt.clipboard = "unnamedplus" + vim.opt.termguicolors = true vim.opt.expandtab = true diff --git a/lua/plugins/syntax.lua b/lua/plugins/syntax.lua index a00d33e..9840f9f 100644 --- a/lua/plugins/syntax.lua +++ b/lua/plugins/syntax.lua @@ -1,27 +1,37 @@ return { { "nvim-treesitter/nvim-treesitter", - indent = { enable = true }, - highlight = { enable = true }, - folds = { enable = true }, - ensure_installed = { - "bash", - "diff", - "html", - "json", - "jsonc", - "lua", - "luadoc", - "luap", - "markdown", - "markdown_inline", - "printf", - "regex", - "toml", - "vim", - "vimdoc", - "xml", - "yaml", + lazy = false, + build = ":TSUpdate", + opts = { + indent = { enable = true }, + highlight = { enable = true }, + folds = { enable = true }, + ensure_installed = { + "bash", + "diff", + "html", + "json", + "lua", + "luadoc", + "luap", + "markdown", + "markdown_inline", + "printf", + "regex", + "toml", + "vim", + "vimdoc", + "xml", + "yaml", + }, }, + config = function(_, opts) + local ts = require "nvim-treesitter" + + if type(opts.ensure_installed) == "table" and #opts.ensure_installed > 0 then + ts.install(opts.ensure_installed) + end + end, }, }