cleanup nvim autocmds
This commit is contained in:
parent
44ff37ce34
commit
6f12e93999
|
@ -13,50 +13,6 @@ local autocmds = {
|
|||
command = "if &nu | set nornu | endif"
|
||||
}
|
||||
},
|
||||
{
|
||||
"BufWritePost",
|
||||
{
|
||||
pattern = { "*/bookmarks/files", "*/bookmarks/directories" },
|
||||
command = "!shortcuts"
|
||||
}
|
||||
},
|
||||
{
|
||||
{ "BufRead", "BufNewFile" },
|
||||
{
|
||||
pattern = { "Xresources", "Xdefaults", "xresources", "xdefaults" },
|
||||
command = "set filetype=xdefaults"
|
||||
}
|
||||
},
|
||||
{
|
||||
"BufWritePost",
|
||||
{
|
||||
pattern = { "Xresources", "Xdefaults", "xresources", "xdefaults" },
|
||||
command = "!xrdb %"
|
||||
}
|
||||
},
|
||||
{
|
||||
"BufWritePost",
|
||||
{
|
||||
pattern = "*/dwmblocks/config.h",
|
||||
command = "!cd ~/.local/src/dwmblocks/; sudo make install && { killall -q dwmblocks;setsid -f dwmblocks }"
|
||||
}
|
||||
},
|
||||
{
|
||||
"BufWritePost",
|
||||
{
|
||||
pattern = "*.java",
|
||||
callback = function()
|
||||
vim.lsp.codelens.refresh()
|
||||
end
|
||||
}
|
||||
},
|
||||
-- {
|
||||
-- { "BufDelete", "VimLeave" },
|
||||
-- {
|
||||
-- pattern = "*.tex",
|
||||
-- command = "!texclear \"%:p\""
|
||||
-- }
|
||||
-- },
|
||||
{ -- Use 'q' to quit from common plugins
|
||||
'FileType',
|
||||
{
|
||||
|
@ -74,7 +30,6 @@ local autocmds = {
|
|||
{
|
||||
pattern = { "gitcommit", "markdown" },
|
||||
callback = function()
|
||||
vim.opt_local.wrap = true
|
||||
vim.opt_local.spell = true
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -7,15 +7,18 @@ local ansible_test = function(path, bufnr)
|
|||
return 'yaml'
|
||||
end
|
||||
end
|
||||
|
||||
local filetypes = {
|
||||
{
|
||||
extension = {
|
||||
yml = ansible_test,
|
||||
yaml = ansible_test
|
||||
}
|
||||
}
|
||||
extension = {
|
||||
yml = ansible_test,
|
||||
yaml = ansible_test,
|
||||
},
|
||||
filename = {
|
||||
["Xresources"] = "xdefaults",
|
||||
["Xdefaults"] = "xdefaults",
|
||||
["xresources"] = "xdefaults",
|
||||
["xdefaults"] = "xdefaults",
|
||||
},
|
||||
}
|
||||
|
||||
for _, entry in pairs(filetypes) do
|
||||
vim.filetype.add(entry)
|
||||
end
|
||||
vim.filetype.add(filetypes)
|
||||
|
|
Loading…
Reference in New Issue