mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-10-24 05:23:19 +00:00
feat(nvim): phase 1 — triage and abandoned-plugin cleanup
Fix keymap collision on <leader>j/<leader>k (now resize-only;
location-list moved to ]l/[l). Migrate diagnostic signs from
deprecated vim.fn.sign_define to vim.diagnostic.config. Drop
orphan after/nvim-tree.lua and the bogus require("../current-theme").
Add foundation snacks.nvim spec. Remove playground, vim-maximizer,
poet-v, git-blame, render-markdown, and all five AI plugin specs.
Enable gitsigns current_line_blame.
This commit is contained in:
@@ -6,6 +6,13 @@ local current_home = os.getenv("HOME")
|
||||
|
||||
vim.g.python3_host_prog = current_home .. "/.pyenv/versions/py3nvim/bin/python"
|
||||
|
||||
vim.opt.title = true
|
||||
|
||||
vim.opt.titlestring = "%{fnamemodify(getcwd(), ':t')}"
|
||||
|
||||
-- auto reload
|
||||
vim.o.autoread = true
|
||||
|
||||
-- disable nvim intro
|
||||
vim.opt.shortmess:append("sI")
|
||||
|
||||
@@ -74,4 +81,26 @@ vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("GitRootRun", function(opts)
|
||||
local cmd = opts.args
|
||||
local git_root = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
if git_root and git_root ~= "" then
|
||||
vim.cmd("!cd " .. git_root .. " && " .. cmd)
|
||||
else
|
||||
print("Not in a Git repository.")
|
||||
end
|
||||
end, { nargs = "+" })
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
opts.desc = "Run command in Git root"
|
||||
|
||||
vim.keymap.set("n", "<leader>gr", function()
|
||||
local command = vim.fn.input("$: ")
|
||||
if command ~= "" then
|
||||
vim.cmd("GitRootRun " .. command)
|
||||
else
|
||||
print("No command entered.")
|
||||
end
|
||||
end, opts)
|
||||
|
||||
-- Add similar autocommands for other modes as needed
|
||||
|
||||
Reference in New Issue
Block a user