added some more configurations
This commit is contained in:
parent
41d6f87f64
commit
9ea714a879
9 changed files with 86 additions and 21 deletions
17
lua/custom/plugins/comment.lua
Normal file
17
lua/custom/plugins/comment.lua
Normal 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,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue