change api for new filetypes
This commit is contained in:
parent
9914c9bd88
commit
23dd1811ee
@ -7,37 +7,22 @@ api.nvim_create_autocmd('TextYankPost', {
|
|||||||
group = yankGrp,
|
group = yankGrp,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Filetypes
|
vim.filetype.add({
|
||||||
local fileGrp = api.nvim_create_augroup('file_type', { clear = true })
|
extension = {
|
||||||
api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
simvis = 'xml',
|
||||||
pattern = { '*.simvis', '*.manifest' },
|
manifest = 'xml',
|
||||||
callback = function() vim.bo.filetype = 'xml' end,
|
simcfg = 'xml',
|
||||||
group = fileGrp,
|
simcon = 'xml',
|
||||||
})
|
simudex = 'xml'
|
||||||
api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
},
|
||||||
pattern = { '*.simcfg', '*.simcon', '*.simudex' },
|
filename = {
|
||||||
callback = function() vim.bo.filetype = 'xml' end,
|
['JenkinsFile'] = 'groovy',
|
||||||
group = fileGrp,
|
['SConstruct'] = 'python',
|
||||||
})
|
['SConscript'] = 'python',
|
||||||
api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
['doskey'] = 'dosini',
|
||||||
pattern = { 'JenkinsFile*' },
|
['.clangd'] = 'yaml',
|
||||||
callback = function() vim.bo.filetype = 'groovy' end,
|
['.clang-tidy'] = 'yaml',
|
||||||
group = fileGrp,
|
},
|
||||||
})
|
|
||||||
api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
|
||||||
pattern = { 'SConstruct', 'SConscript' },
|
|
||||||
callback = function() vim.bo.filetype = 'python' end,
|
|
||||||
group = fileGrp,
|
|
||||||
})
|
|
||||||
api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
|
||||||
pattern = { 'doskey' },
|
|
||||||
callback = function() vim.bo.filetype = 'dosini' end,
|
|
||||||
group = fileGrp,
|
|
||||||
})
|
|
||||||
api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
|
||||||
pattern = { '.clangd', '.clang-tidy' },
|
|
||||||
callback = function() vim.bo.filetype = 'yaml' end,
|
|
||||||
group = fileGrp,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Read and write shada file
|
-- Read and write shada file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user