-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe42d65
commit cb9580d
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters