Skip to content

Commit

Permalink
fix all snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
TwIStOy committed Dec 14, 2023
1 parent 66f58cb commit 29021ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/ht/snippets/all.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ local todo_comment = function(keyword)
f(function()
local CommentFt = require("Comment.ft")
local CommentU = require("Comment.utils")
local current_file = vim.fn.expand("%:p")
local pattern = CommentFt.get(current_file, CommentU.ctype.linewise)
local ft = vim.api.nvim_get_option_value("filetype", {
buf = 0,
})
local pattern = CommentFt.get(ft, CommentU.ctype.linewise)
if pattern == nil then
-- keep the input
pattern = "%s"
Expand Down

0 comments on commit 29021ba

Please sign in to comment.