filetype configs with named files. has telescope
FT command does current file with no args now
1 file changed, +6 -2
+6-2lua/ftconfig/commands.lua
| @@ -1,7 +1,11 @@ | ||
| 1 | 1 | 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 | |
| 3 | 7 | end, { |
| 4 | - nargs = 1, | |
| 8 | + nargs = "*", | |
| 5 | 9 | desc = "Edit or create config for given filetype", |
| 6 | 10 | complete = function(lead, _, _) |
| 7 | 11 | local options = vim.fn.getcompletion("", "filetype") |