Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 committed Jan 7, 2025
1 parent fe42d65 commit cb9580d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 0 additions & 1 deletion lua/builtin/others.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ vim.api.nvim_create_autocmd("BufReadPre", {
callback = function(event)
local f = vim.fn.expand("<afile>")
if vim.fn.getfsize(f) > constants.perf.maxfilesize then
-- vim.b.file_size_is_too_big = true
vim.cmd([[
syntax clear
setlocal eventignore+=FileType
Expand Down
15 changes: 15 additions & 0 deletions lua/configs/andymass/vim-matchup/config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
local constants = require("builtin.constants")

local matchup_augroup = vim.api.nvim_create_augroup("matchup_augroup", { clear = true })
vim.api.nvim_create_autocmd("BufReadPre", {
group = matchup_augroup,
callback = function(event)
vim.cmd([[NoMatchParen]])
if type(event) == "table" and type(event.buf) == "number" then
local f = vim.api.nvim_buf_get_name(event.buf)
if vim.fn.getfsize(f) <= constants.perf.maxfilesize then
vim.cmd([[DoMatchParen]])
end
end
end,
})
1 change: 1 addition & 0 deletions lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ local M = {
"andymass/vim-matchup",
event = { VeryLazy },
init = lua_init("andymass/vim-matchup"),
config = lua_config("andymass/vim-matchup"),
},
-- Range/substitude
{
Expand Down

0 comments on commit cb9580d

Please sign in to comment.