diff options
Diffstat (limited to 'lua/conf/plugins')
-rw-r--r-- | lua/conf/plugins/harpoon.lua | 5 | ||||
-rw-r--r-- | lua/conf/plugins/luasnip.lua | 3 | ||||
-rw-r--r-- | lua/conf/plugins/oil.lua | 17 | ||||
-rw-r--r-- | lua/conf/plugins/treesitter.lua | 3 |
4 files changed, 17 insertions, 11 deletions
diff --git a/lua/conf/plugins/harpoon.lua b/lua/conf/plugins/harpoon.lua index b4b2330..5bb02d0 100644 --- a/lua/conf/plugins/harpoon.lua +++ b/lua/conf/plugins/harpoon.lua @@ -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) diff --git a/lua/conf/plugins/luasnip.lua b/lua/conf/plugins/luasnip.lua index 6a04ffd..7385af1 100644 --- a/lua/conf/plugins/luasnip.lua +++ b/lua/conf/plugins/luasnip.lua @@ -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 diff --git a/lua/conf/plugins/oil.lua b/lua/conf/plugins/oil.lua index d985105..62f452b 100644 --- a/lua/conf/plugins/oil.lua +++ b/lua/conf/plugins/oil.lua @@ -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), diff --git a/lua/conf/plugins/treesitter.lua b/lua/conf/plugins/treesitter.lua index e473de4..4354953 100644 --- a/lua/conf/plugins/treesitter.lua +++ b/lua/conf/plugins/treesitter.lua @@ -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 |