diff options
| author | Polesznyák Márk <contact@pml68.dev> | 2025-12-27 00:51:43 +0100 |
|---|---|---|
| committer | Polesznyák Márk <contact@pml68.dev> | 2025-12-27 00:51:43 +0100 |
| commit | 24d9f2dc81724ba9ebbe1b7f4847496ff7477671 (patch) | |
| tree | 267635408e9c2fd3a327e6d94a3b3d59761b438f | |
| parent | feat(vim-haredoc): switch to personal fork (diff) | |
| download | nvim-24d9f2dc81724ba9ebbe1b7f4847496ff7477671.tar.gz | |
chore(nvim-tressitter): update config for rewrite
| -rw-r--r-- | lua/pml68/plugins/telescope.lua | 5 | ||||
| -rw-r--r-- | lua/pml68/plugins/treesitter.lua | 100 |
2 files changed, 64 insertions, 41 deletions
diff --git a/lua/pml68/plugins/telescope.lua b/lua/pml68/plugins/telescope.lua index 59b6765..f721df3 100644 --- a/lua/pml68/plugins/telescope.lua +++ b/lua/pml68/plugins/telescope.lua @@ -1,9 +1,10 @@ return { "nvim-telescope/telescope.nvim", - tag = "0.1.6", + tag = "v0.2.0", cmd = "Telescope", dependencies = { - "nvim-lua/plenary.nvim" + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope-fzf-native.nvim", }, opts = { pickers = { diff --git a/lua/pml68/plugins/treesitter.lua b/lua/pml68/plugins/treesitter.lua index 3dcee99..6416f1f 100644 --- a/lua/pml68/plugins/treesitter.lua +++ b/lua/pml68/plugins/treesitter.lua @@ -1,46 +1,68 @@ return { "nvim-treesitter/nvim-treesitter", - event = { "BufReadPost", "BufNewFile" }, + lazy = false, build = ":TSUpdate", config = function() - require("nvim-treesitter.configs").setup({ - ensure_installed = { - "asm", - "c", - "cpp", - "c_sharp", - "lua", - "kotlin", - "java", - "bash", - "html", - "scss", - "css", - "typescript", - "javascript", - "svelte", - "python", - "rust", - "markdown", - "markdown_inline", - "yaml", - "json", - "glsl", - "make", - "gitignore", - "gitattributes", - "gitcommit", - "git_config", - "go", - "gosum", - "gomod", - "gotmpl", - "gowork", - "hare", - }, - highlight = { - enable = true - } + local ts = require("nvim-treesitter") + + local ensure_installed = { + "asm", + "bash", + "c", + "c_sharp", + "cpp", + "css", + "git_config", + "gitattributes", + "gitcommit", + "gitignore", + "glsl", + "go", + "gomod", + "gosum", + "gotmpl", + "gowork", + "hare", + "html", + "java", + "javascript", + "json", + "kotlin", + "lua", + "make", + "markdown", + "markdown_inline", + "python", + "rust", + "scss", + "svelte", + "typescript", + "vim", + "vimdoc", + "yaml", + } + + ts.install(ensure_installed, { + max_jobs = 12, + summary = false, + }) + + local ignore = { + "checkhealth", + "lazy", + "mason", + "TelescopePrompt", + } + + vim.api.nvim_create_autocmd("FileType", { + group = vim.api.nvim_create_augroup("EnableTreesitterHighlighting", { clear = true }), + callback = function(event) + if vim.tbl_contains(ignore, event.match) then + return + end + + pcall(function() vim.treesitter.start(event.buf) end) + end }) end } |
