signify cmds for git
This commit is contained in:
@ -2,15 +2,26 @@ return {
|
||||
"LunarVim/bigfile.nvim",
|
||||
opts = {
|
||||
filesize = 2, -- size of the file in MiB, the plugin round file sizes to the closest MiB
|
||||
pattern = { "*" }, -- autocmd pattern or function see <### Overriding the detection of big files>
|
||||
pattern = function(bufnr, filesize_mib)
|
||||
vim.cmd(":NoAutoFormatBuffer")
|
||||
vim.cmd(":FormatDisable")
|
||||
-- you can't use `nvim_buf_line_count` because this runs on BufReadPre
|
||||
local file_contents = vim.fn.readfile(vim.api.nvim_buf_get_name(bufnr))
|
||||
local file_lines = #file_contents
|
||||
local filetype = vim.filetype.match({ buf = bufnr })
|
||||
if file_lines > 1000 and (filetype == "c" or filetype == "cpp") then
|
||||
return true
|
||||
end
|
||||
return filesize_mib > 1
|
||||
end,
|
||||
features = { -- features to disable
|
||||
"indent_blankline",
|
||||
"illuminate",
|
||||
-- "illuminate",
|
||||
"lsp",
|
||||
"treesitter",
|
||||
"syntax",
|
||||
"matchparen",
|
||||
"vimopts",
|
||||
-- "syntax",
|
||||
-- "matchparen",
|
||||
-- "vimopts",
|
||||
"filetype",
|
||||
},
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
local use_google = require("utils").use_google
|
||||
|
||||
local function setup_mercurial(hg_revision)
|
||||
local git_cmd = "git diff --no-color --no-ext-diff -U0 -- %f"
|
||||
local function change_diffbase(hg_revision, git_revision)
|
||||
local git_cmd = "git diff --no-color --no-ext-diff -U0" .. git_revision .. " -- %f"
|
||||
local rcs_cmd = "rcsdiff -U0 %f 2>%n"
|
||||
local svn_cmd = "svn diff --diff-cmd %d -x -U0 -- %f"
|
||||
local hg_diff = hg_revision .. " --color=never config aliases.diff= --nodates -U0 -- %f"
|
||||
@ -28,25 +28,25 @@ let g:signify_vcs_cmds_diffmode = {
|
||||
end
|
||||
|
||||
_G.signify_dtup = function()
|
||||
setup_mercurial('-r ".^"')
|
||||
change_diffbase('-r ".^"', 'HEAD^')
|
||||
vim.cmd([[:SignifyEnable]])
|
||||
vim.cmd([[:SignifyRefresh]])
|
||||
end
|
||||
|
||||
_G.signify_normal = function()
|
||||
setup_mercurial("-r .")
|
||||
change_diffbase("-r .", "")
|
||||
vim.cmd([[:SignifyEnable]])
|
||||
vim.cmd([[:SignifyRefresh]])
|
||||
end
|
||||
|
||||
_G.signify_dtp4 = function()
|
||||
setup_mercurial("-r p4head")
|
||||
change_diffbase("-r p4head", "HEAD^")
|
||||
vim.cmd([[:SignifyEnable]])
|
||||
vim.cmd([[:SignifyRefresh]])
|
||||
end
|
||||
|
||||
_G.signify_dtex = function()
|
||||
setup_mercurial("-r exported(.)")
|
||||
change_diffbase("-r exported(.)", "origin/main")
|
||||
vim.cmd([[:SignifyEnable]])
|
||||
vim.cmd([[:SignifyRefresh]])
|
||||
end
|
||||
|
Reference in New Issue
Block a user