Skip to content

Commit

Permalink
refactor(treesitter): move modules files in treesitter.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane Pluchart committed Jul 24, 2024
1 parent ac7fe7f commit 9ded801
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 27 deletions.
8 changes: 0 additions & 8 deletions lua/plugins/rainbow_delimiters.lua

This file was deleted.

16 changes: 16 additions & 0 deletions lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ return {
build = ':TSUpdate',
event = { 'BufReadPost', 'BufNewFile' },
dependencies = {
{
'JoosepAlviste/nvim-ts-context-commentstring',
config = function()
require('ts_context_commentstring').setup()
end,
},
{
'nvim-treesitter/nvim-treesitter-context',
},
{
'nvim-treesitter/nvim-treesitter-textobjects',
config = function()
Expand Down Expand Up @@ -34,6 +43,9 @@ return {
{
'nvim-treesitter/nvim-treesitter-refactor',
},
{
'HiPhish/rainbow-delimiters.nvim',
},
},
cmd = { 'TSUpdateSync', 'TSUpdate', 'TSInstall' },
---@type TSConfig
Expand Down Expand Up @@ -168,6 +180,10 @@ return {
end, opts.ensure_installed)
end
require('nvim-treesitter.configs').setup(opts)

vim.keymap.set('n', ']c', function()
require('treesitter-context').go_to_context(vim.v.count1)
end, { silent = true })
end,
},
{
Expand Down
6 changes: 0 additions & 6 deletions lua/plugins/ts_commentstring.lua

This file was deleted.

13 changes: 0 additions & 13 deletions lua/plugins/ts_context.lua

This file was deleted.

0 comments on commit 9ded801

Please sign in to comment.