Skip to content

Commit

Permalink
fix: nvim-ts-context-commentstring breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
aceforeverd committed Nov 20, 2023
1 parent 4c11208 commit 1eaf257
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
7 changes: 0 additions & 7 deletions lua/aceforeverd/config/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -191,20 +191,13 @@ function M.setup()
endwise = {
enable = true,
},
context_commentstring = { enable = true, enable_autocmd = false },
autotag = {
enable = true,
},
})

-- :set foldmethod=expr to enable fold with expr, default is manual
vim.cmd([[set foldexpr=nvim_treesitter#foldexpr()]])
require('aceforeverd.util.map').set_map(
'n',
'<leader>uc',
":lua require('ts_context_commentstring.internal').update_commentstring()<CR>",
{ silent = true, noremap = true }
)
end

return M
15 changes: 14 additions & 1 deletion lua/aceforeverd/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -448,14 +448,27 @@ M.plugin_list = {
'nvim-treesitter/nvim-treesitter-refactor',
'RRethy/nvim-treesitter-textsubjects',
'RRethy/nvim-treesitter-endwise',
'JoosepAlviste/nvim-ts-context-commentstring',
'windwp/nvim-ts-autotag',
},
build = ':TSUpdate',
config = function()
require('aceforeverd.config').treesitter()
end,
},
{
'JoosepAlviste/nvim-ts-context-commentstring',
config = function()
require('ts_context_commentstring').setup({
enable_autocmd = false,
})
vim.keymap.set(
'n',
'<leader>uc',
function() require('ts_context_commentstring.internal').update_commentstring() end,
{ silent = true, noremap = true, desc = 'update commentstring' }
)
end
},

{
'HiPhish/rainbow-delimiters.nvim',
Expand Down

0 comments on commit 1eaf257

Please sign in to comment.