try and make everything confined to 80chars
This commit is contained in:
@ -13,9 +13,8 @@ return { "ThePrimeagen/harpoon",
|
||||
|
||||
map("n", "<leader>a", function()
|
||||
harpoon:list():add()
|
||||
vim.notify("added "..vim.fn.expand("%:t").." to quickmarks", vim.log.levels.INFO, {
|
||||
title = misc.appid
|
||||
})
|
||||
vim.notify("added "..vim.fn.expand("%:t").." to quickmarks",
|
||||
vim.log.levels.INFO, { title = misc.appid })
|
||||
end, { desc = "add current file to quickmarks" })
|
||||
|
||||
map("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
|
@ -56,7 +56,8 @@ return { "L3MON4D3/LuaSnip",
|
||||
end)
|
||||
|
||||
-- load all snippets from snippet directory
|
||||
for _, file in ipairs(vim.api.nvim_get_runtime_file("lua/snippets/*.lua", true)) do
|
||||
for _, file in ipairs(vim.api.nvim_get_runtime_file("lua/snippets/*.lua",
|
||||
true)) do
|
||||
local fn = file:gsub("^.*/", ""):gsub("%.lua$", "")
|
||||
local ret = misc.include("snippets."..fn)
|
||||
if type(ret) ~= "boolean" then
|
||||
|
@ -6,7 +6,8 @@ local function parse_output(proc)
|
||||
local result = proc:wait()
|
||||
local ret = {}
|
||||
if result.code == 0 then
|
||||
for line in vim.gsplit(result.stdout, "\n", { plain = true, trimempty = true }) do
|
||||
for line in vim.gsplit(result.stdout, "\n", {
|
||||
plain = true, trimempty = true }) do
|
||||
-- Remove trailing slash
|
||||
line = line:gsub("/$", "")
|
||||
ret[line] = true
|
||||
@ -20,16 +21,20 @@ local function new_git_status()
|
||||
return setmetatable({}, {
|
||||
__index = function(self, key)
|
||||
local ignore_proc = vim.system(
|
||||
{ "git", "ls-files", "--ignored", "--exclude-standard", "--others", "--directory" },
|
||||
{ "git", "ls-files", "--ignored", "--exclude-standard", "--others",
|
||||
"--directory" },
|
||||
{
|
||||
cwd = key,
|
||||
text = true,
|
||||
}
|
||||
)
|
||||
local tracked_proc = vim.system({ "git", "ls-tree", "HEAD",
|
||||
"--name-only" },
|
||||
{
|
||||
cwd = key,
|
||||
text = true,
|
||||
}
|
||||
)
|
||||
local tracked_proc = vim.system({ "git", "ls-tree", "HEAD", "--name-only" }, {
|
||||
cwd = key,
|
||||
text = true,
|
||||
})
|
||||
local ret = {
|
||||
ignored = parse_output(ignore_proc),
|
||||
tracked = parse_output(tracked_proc),
|
||||
|
@ -48,7 +48,8 @@ return { "nvim-treesitter/nvim-treesitter",
|
||||
|
||||
-- disable in big files
|
||||
-- TODO: update before nvim 1.0 when vim.loop is removed
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
local ok, stats = pcall(vim.loop.fs_stat,
|
||||
vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > (1024 * 100 * 10) --[[1MB]] then
|
||||
return true
|
||||
end
|
||||
|
Reference in New Issue
Block a user