@@ -274,7 +274,7 @@ pilot.setup({
274274 placeholders = {
275275 vars = {
276276 -- example to add custom placeholders
277- hello_world = function () return " Hello, World! " end ,
277+ new_temp_file = function () return vim . fn . tempname () end ,
278278 template_path = function () return pilot .utils .interpolate (" {{pilot_data_path}}/templates" ) end ,
279279 },
280280 funcs = {},
@@ -376,21 +376,23 @@ Simple placeholders that expand to a string. Define them in
376376` placeholders.vars ` as functions that return a string, and use them as
377377` {{name}} ` in config paths or commands.
378378
379- | Placeholder | Resolved value |
380- | ---------------------------- | --------------------------------------------------- |
381- | ` {{file_path}} ` | Current buffer's absolute file path |
382- | ` {{file_path_relative}} ` | File path relative to current working directory |
383- | ` {{file_name}} ` | File name (with extension) |
384- | ` {{file_name_no_extension}} ` | File name without extension |
385- | ` {{file_type}} ` | Filetype of current buffer (` vim.bo.filetype ` ) |
386- | ` {{file_extension}} ` | File extension |
387- | ` {{dir_path}} ` | Directory containing the current buffer |
388- | ` {{dir_name}} ` | Name of the directory containing the current buffer |
389- | ` {{cwd_path}} ` | Absolute path of the current working directory |
390- | ` {{cwd_name}} ` | Name of the current working directory |
391- | ` {{pilot_data_path}} ` | Path to ` vim.fn.stdpath("data") .. "/pilot" ` |
392- | ` {{cword}} ` | Word under the cursor |
393- | ` {{cWORD}} ` | WORD under the cursor |
379+ | Placeholder | Resolved value |
380+ | ---------------------------- | ---------------------------------------------------------------------------- |
381+ | ` {{file_path}} ` | Current buffer's absolute file path |
382+ | ` {{file_path_relative}} ` | File path relative to current working directory |
383+ | ` {{file_name}} ` | File name (with extension) |
384+ | ` {{file_name_no_extension}} ` | File name without extension |
385+ | ` {{file_type}} ` | Filetype of current buffer (` vim.bo.filetype ` ) |
386+ | ` {{file_extension}} ` | File extension |
387+ | ` {{dir_path}} ` | Directory containing the current buffer |
388+ | ` {{dir_name}} ` | Name of the directory containing the current buffer |
389+ | ` {{cwd_path}} ` | Absolute path of the current working directory |
390+ | ` {{cwd_name}} ` | Name of the current working directory |
391+ | ` {{config_path}} ` | Absolute path to your Neovim configuration directory |
392+ | ` {{data_path}} ` | Absolute path to Neovim plugins data directory |
393+ | ` {{pilot_data_path}} ` | Absolute path to the pilot directory inside of Neovim plugins data directory |
394+ | ` {{cword}} ` | Word under the cursor |
395+ | ` {{cWORD}} ` | WORD under the cursor |
394396
395397** Modifier Functions**
396398
0 commit comments