nvim: run stylua

This commit is contained in:
Primrose 2025-07-08 13:39:02 +02:00
parent 3f5e236fe5
commit e91471432f
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
7 changed files with 28 additions and 11 deletions

View file

@ -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

View file

@ -175,7 +175,9 @@ require("lspconfig")["ltex_plus"].setup {
local ltex_dict = {}
if vim.uv.fs_stat(ltex_dict_path) then
for line in io.lines(ltex_dict_path) do
if not string.startswith(line, "#") and line ~= "" then table.insert(ltex_dict, line) end
if not string.startswith(line, "#") and line ~= "" then
table.insert(ltex_dict, line)
end
end
end
client.config.settings.ltex.dictionary = {

View file

@ -9,7 +9,7 @@ local state = require("telescope.state")
local vimgrep_arguments = { unpack(config.values.vimgrep_arguments) }
table.insert(vimgrep_arguments, "--hidden") -- search hidden
table.insert(vimgrep_arguments, "--glob") -- ignore git
table.insert(vimgrep_arguments, "--glob") -- ignore git
table.insert(vimgrep_arguments, "!**/.git/*")
telescope.setup {

View file

@ -22,7 +22,9 @@ require("nvim-treesitter.configs").setup {
disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.uv.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then return true end
if ok and stats and stats.size > max_filesize then
return true
end
end,
indent = true,