Skip to content

Commit

Permalink
Clean lualine, remove nvim-various-textobjs, targets, `vim-illu…
Browse files Browse the repository at this point in the history
…minate` (#114)
  • Loading branch information
dycw authored Apr 16, 2024
1 parent 4f5e500 commit f4cc9ba
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[bumpversion]
current_version = 0.1.112
current_version = 0.1.113
12 changes: 0 additions & 12 deletions nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@
"branch": "main",
"commit": "531f48334c422222aebc888fd36e7d109cb354cd"
},
"nvim-various-textobjs": {
"branch": "main",
"commit": "6597cda458f67da2cec7ae7d43d7abb11d54be82"
},
"nvim-web-devicons": {
"branch": "master",
"commit": "b3468391470034353f0e5110c70babb5c62967d3"
Expand All @@ -223,10 +219,6 @@
"branch": "master",
"commit": "564ee65dfc9024bdde73a6621820866987cbb256"
},
"targets.vim": {
"branch": "master",
"commit": "642d3a4ce306264b05ea3219920b13ea80931767"
},
"telescope-file-browser.nvim": {
"branch": "master",
"commit": "5ee5002373655fd684a4ad0d47a3de876ceacf9a"
Expand Down Expand Up @@ -259,10 +251,6 @@
"branch": "master",
"commit": "662e7b11064cbeedad17c45d2fe926e78d3cd0b6"
},
"vim-illuminate": {
"branch": "master",
"commit": "305bf07b919ac526deb5193280379e2f8b599926"
},
"vim-just": {
"branch": "main",
"commit": "a2777b4b113dafc639f541ad4f0f7da0adc640f4"
Expand Down
33 changes: 1 addition & 32 deletions nvim/lua/custom/plugins/lualine.lua
Original file line number Diff line number Diff line change
@@ -1,38 +1,7 @@
return {
"nvim-lualine/lualine.nvim",
config = function()
local function git_relative_path()
local handle = io.popen("git rev-parse --show-toplevel 2>/dev/null")
if handle == nil then
return "[Unable to get repo root]"
end
local git_root = handle:read("*a")
handle:close()
git_root = string.gsub(git_root, "\n$", "")

if git_root == "" then
return "[Not in repo]"
end

-- luacheck: push ignore
local fn = vim.fn
-- luacheck: pop

local file_path = fn.expand("%:p")
if fn.stridx(file_path, git_root) == 0 then
return file_path:sub(#git_root + 2)
else
return "[Outside repo]"
end
end

require("lualine").setup({
sections = {
lualine_c = {
git_relative_path,
},
},
})
require("lualine").setup({})
end,
dependencies = { "nvim-tree/nvim-web-devicons" },
}
6 changes: 0 additions & 6 deletions nvim/lua/custom/plugins/nvim-various-textobjs.lua

This file was deleted.

3 changes: 0 additions & 3 deletions nvim/lua/custom/plugins/targets.lua

This file was deleted.

6 changes: 0 additions & 6 deletions nvim/lua/custom/plugins/vim-illuminate.lua

This file was deleted.

0 comments on commit f4cc9ba

Please sign in to comment.