diff --git a/docs/configuration/filetypes.md b/docs/configuration/filetypes.md new file mode 100644 index 0000000000..4c02839945 --- /dev/null +++ b/docs/configuration/filetypes.md @@ -0,0 +1,26 @@ +--- +sidebar_position: 8 +--- + +# File Types + +Custom file types can be managed in a `$XDG_CONFIG_HOME/nvim/filetype.lua` file. +When the file exists, LazyVim will source it at startup. + +## Example + +```lua title=filetype.lua +vim.filetype.add({ + extension = { + tfstate = "json", + terraformrc = "hcl", + }, + filename = { + ["Jenkinsfile"] = "groovy", + ["terraform.rc"] = "hcl", + }, + pattern = { + [".*tfstate.backup"] = "json", + } +}) +```