mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nvim: run stylua
This commit is contained in:
parent
3f5e236fe5
commit
e91471432f
7 changed files with 28 additions and 11 deletions
|
|
@ -47,7 +47,8 @@ ls.add_snippets("typst", {
|
|||
t("#entry("),
|
||||
f(show_date_typst_entry),
|
||||
t { ")[", "" },
|
||||
t(" "), i(0),
|
||||
t(" "),
|
||||
i(0),
|
||||
t { "", "]" },
|
||||
}),
|
||||
s("lang", {
|
||||
|
|
@ -62,7 +63,9 @@ local function get_cms()
|
|||
assert(vim.bo.commentstring ~= "", "comment string is not set")
|
||||
local left = vim.bo.commentstring:gsub("%s*%%s.*", "")
|
||||
local right = vim.bo.commentstring:gsub(".*%%s%s*", "")
|
||||
if right == "" then right = left end
|
||||
if right == "" then
|
||||
right = left
|
||||
end
|
||||
return { left = left, right = right }
|
||||
end
|
||||
local function horizon(args)
|
||||
|
|
@ -122,7 +125,9 @@ ls.add_snippets("go", {
|
|||
local of_filetype = function(fts)
|
||||
local ft = vim.bo.filetype
|
||||
for _, v in ipairs(fts) do
|
||||
if v == ft then return true end
|
||||
if v == ft then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue