irongit

filetype configs with named files. has telescope

fixed typing

huncholanehuncholaneauthored
parent 8c677c2commit 7fecad456e3b1bfcd459ab0a1137402c41bb6b22Browse files

1 file changed, +3 -6

+3-6lua/ftconfig/init.lua
@@ -10,7 +10,7 @@ local augroup = vim.api.nvim_create_augroup("ftconfig", { clear = true })
1010
1111 ---@class FTConformSpec
1212 ---@field use string[]
13----@field formatters? conform.FileFormatterConfig[]
13+---@field formatters? table<string, conform.FileFormatterConfig>
1414
1515 ---@class FTSpec
1616 ---@field indent? integer
@@ -23,11 +23,8 @@ function M.load_file(filename)
2323 local ft = vim.fn.fnamemodify(filename, ":r")
2424 table.insert(M.filetypes, ft)
2525 local mod = "ftconfig." .. ft
26- local ok, spec = pcall(require, mod)
27- if not ok then
28- return
29- end
30- ---@cast spec FTSpec?
26+ ---@type FTSpec?
27+ local spec = require(mod)
3128 if not spec then
3229 return
3330 end