this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

numToStr/Comment.nvim only works in Neovim v0.7+

+15 -13
+15 -13
lua/user/comment.lua
··· 7 7 extra = false, 8 8 extended = false, 9 9 }, 10 - pre_hook = function (ctx) 11 - local U = require "Comment.utils" 10 + pre_hook = function(ctx) 11 + if vim.bo.filetype == 'typescriptreact' then 12 + local U = require "Comment.utils" 12 13 13 - local location = nil 14 - if ctx.ctype == U.ctype.block then 15 - location = require("ts_context_commentstring.utils").get_cursor_location() 16 - elseif ctx.motion == U.cmotion.v or ctx.motion == U.cmotion.V then 17 - location = require("ts_context_commentstring.utils").get_visual_start_location() 18 - end 14 + local location = nil 15 + if ctx.ctype == U.ctype.block then 16 + location = require("ts_context_commentstring.utils").get_cursor_location() 17 + elseif ctx.motion == U.cmotion.v or ctx.motion == U.cmotion.V then 18 + location = require("ts_context_commentstring.utils").get_visual_start_location() 19 + end 19 20 20 - return require("ts_context_commentstring.internal").calculate_commentstring { 21 - -- Determine whether to use linewise or blockwise commentstring 22 - key = ctx.ctype == U.ctype.line and "__default" or "__multiline", 23 - location = location, 24 - } 21 + return require("ts_context_commentstring.internal").calculate_commentstring { 22 + -- Determine whether to use linewise or blockwise commentstring 23 + key = ctx.ctype == U.ctype.line and "__default" or "__multiline", 24 + location = location, 25 + } 26 + end 25 27 end 26 28 } 27 29