mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 08:53:31 +02:00
update config ts_comment_string
This commit is contained in:
parent
47c6632566
commit
ba6b07f90a
1 changed files with 19 additions and 19 deletions
|
@ -6,27 +6,27 @@ end
|
||||||
comment.setup({
|
comment.setup({
|
||||||
pre_hook = function(ctx)
|
pre_hook = function(ctx)
|
||||||
local U = require("Comment.utils")
|
local U = require("Comment.utils")
|
||||||
|
--
|
||||||
|
-- local status_utils_ok, utils = pcall(require, "ts_context_commentstring.utils")
|
||||||
|
-- if not status_utils_ok then
|
||||||
|
-- return
|
||||||
|
-- end
|
||||||
|
|
||||||
local status_utils_ok, utils = pcall(require, "ts_context_commentstring.utils")
|
-- local location = nil
|
||||||
if not status_utils_ok then
|
-- if ctx.ctype == U.ctype.block then
|
||||||
return
|
-- location = utils.get_cursor_location()
|
||||||
end
|
-- elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
|
||||||
|
-- location = utils.get_visual_start_location()
|
||||||
|
-- end
|
||||||
|
|
||||||
local location = nil
|
-- local status_internals_ok, internals = pcall(require, "ts_context_commentstring.internals")
|
||||||
if ctx.ctype == U.ctype.block then
|
-- if not status_internals_ok then
|
||||||
location = utils.get_cursor_location()
|
-- return
|
||||||
elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
|
-- end
|
||||||
location = utils.get_visual_start_location()
|
|
||||||
end
|
|
||||||
|
|
||||||
local status_internals_ok, internals = pcall(require, "ts_context_commentstring.internals")
|
-- return internals.calculate_commentstring({
|
||||||
if not status_internals_ok then
|
-- key = ctx.ctype == U.ctype.line and "__default" or "__multiline",
|
||||||
return
|
-- location = location,
|
||||||
end
|
-- })
|
||||||
|
|
||||||
return internals.calculate_commentstring({
|
|
||||||
key = ctx.ctype == U.ctype.line and "__default" or "__multiline",
|
|
||||||
location = location,
|
|
||||||
})
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue