Many fixes
This commit is contained in:
parent
f059534f62
commit
e7ca29410d
7 changed files with 60 additions and 24 deletions
|
@ -1,8 +1,8 @@
|
|||
function isEmpty()
|
||||
return vim.api.nvim_buf_get_name(0) == ""
|
||||
or vim.fn.filereadable(vim.api.nvim_buf_get_name(0)) == 0
|
||||
or vim.fn.line("$") == 1 and vim.fn.col("$") == 1
|
||||
end
|
||||
--function isEmpty()
|
||||
--return vim.api.nvim_buf_get_name(0) == ""
|
||||
--or vim.fn.filereadable(vim.api.nvim_buf_get_name(0)) == 0
|
||||
--or vim.fn.line("$") == 1 and vim.fn.col("$") == 1
|
||||
--end
|
||||
|
||||
--vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||
-- callback = function()
|
||||
|
@ -13,24 +13,32 @@ end
|
|||
--})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
pattern = ".env*",
|
||||
command = "set filetype=sh",
|
||||
pattern = ".env*",
|
||||
command = "set filetype=sh",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
pattern = ".*rc",
|
||||
command = "set filetype=sh",
|
||||
pattern = ".*rc",
|
||||
command = "set filetype=sh",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
pattern = "Dockerfile.*",
|
||||
command = "set filetype=dockerfile",
|
||||
pattern = "Dockerfile.*",
|
||||
command = "set filetype=dockerfile",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
callback = function()
|
||||
vim.cmd.CccHighlighterEnable()
|
||||
end,
|
||||
callback = function()
|
||||
vim.cmd.CccHighlighterEnable()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, {
|
||||
callback = function ()
|
||||
if vim.bo.filetype == 'neo-tree' then
|
||||
vim.api.nvim_command("stopinsert")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
--vim.api.nvim_create_autocmd('BufEnter', {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue