added some more configurations

This commit is contained in:
ngorana 2024-10-18 14:40:39 +01:00
parent 41d6f87f64
commit 9ea714a879
9 changed files with 86 additions and 21 deletions

View file

@ -0,0 +1,17 @@
return {
'numToStr/Comment.nvim',
dependencies = { 'JoosepAlviste/nvim-ts-context-commentstring' },
config = function()
require('Comment').setup {
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
-- Ensure commentstring is set properly for TSX and JSX files
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'javascriptreact', 'typescriptreact' },
callback = function()
-- Use JSX-style comments in TSX/JSX files
vim.bo.commentstring = '{/* %s */}'
end,
}),
}
end,
}