Skip to content

Commit

Permalink
docs: added vim.filetype.add pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
EkeMinusYou committed Jan 5, 2025
1 parent d6e0f22 commit 7af6147
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lua/lspconfig/configs/atlas.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ You may also need to configure the filetype for *.hcl files:
`autocmd BufNewFile,BufRead *.test.hcl set filetype=atlas-test`
`autocmd BufNewFile,BufRead *.plan.hcl set filetype=atlas-plan`
or
```lua
vim.filetype.add({
filename = {
['atlas.hcl'] = 'atlas-config',
},
pattern = {
['.*/*.my.hcl'] = 'atlas-schema-mysql',
['.*/*.pg.hcl'] = 'atlas-schema-postgresql',
['.*/*.lt.hcl'] = 'atlas-schema-sqlite',
['.*/*.ch.hcl'] = 'atlas-schema-clickhouse',
['.*/*.ms.hcl'] = 'atlas-schema-mssql',
['.*/*.rs.hcl'] = 'atlas-schema-redshift',
['.*/*.test.hcl'] = 'atlas-test',
['.*/*.plan.hcl'] = 'atlas-plan',
},
})
```
]],
},
}

0 comments on commit 7af6147

Please sign in to comment.