irongit

filetype configs with named files. has telescope

FT command does current file with no args now

huncholanehuncholaneauthored
parent f3cf3bacommit b4209f6b5a1a5587621866c811d88620837303baBrowse files

1 file changed, +6 -2

+6-2lua/ftconfig/commands.lua
@@ -1,7 +1,11 @@
11 vim.api.nvim_create_user_command("FT", function(args)
2- require("ftconfig").edit_filetype(args.fargs[1])
2+ if args.fargs[1] then
3+ require("ftconfig").edit_filetype(args.fargs[1])
4+ else
5+ require("ftconfig").edit_filetype(vim.bo.filetype)
6+ end
37 end, {
4- nargs = 1,
8+ nargs = "*",
59 desc = "Edit or create config for given filetype",
610 complete = function(lead, _, _)
711 local options = vim.fn.getcompletion("", "filetype")