mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
Revert "nvim: mode aware CursorLineNr"
This is actually pretty annoying
This commit is contained in:
parent
15bf9075e7
commit
f708dc4908
1 changed files with 0 additions and 35 deletions
|
|
@ -42,38 +42,3 @@ vim.api.nvim_create_autocmd("LspProgress", {
|
||||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||||
callback = function() require("fidget").setup {} end,
|
callback = function() require("fidget").setup {} end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Little trick to set the CursorLineNr to colors I like
|
|
||||||
-- TODO: maybe upstream this to curry.nvim one day?
|
|
||||||
do
|
|
||||||
local cursorLineNr = nil
|
|
||||||
local group = vim.api.nvim_create_augroup("ModeAwareCursorLineNr", {})
|
|
||||||
vim.api.nvim_create_autocmd("Colorscheme", {
|
|
||||||
group = group,
|
|
||||||
callback = function() cursorLineNr = vim.api.nvim_get_hl(0, { name = "CursorLineNr" }) end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("ModeChanged", {
|
|
||||||
pattern = "*:n",
|
|
||||||
group = group,
|
|
||||||
callback = function() vim.api.nvim_set_hl(0, "CursorLineNr", cursorLineNr) end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("ModeChanged", {
|
|
||||||
pattern = "*:i",
|
|
||||||
group = group,
|
|
||||||
callback = function()
|
|
||||||
local function_ = vim.api.nvim_get_hl(0, { name = "Function" })
|
|
||||||
vim.api.nvim_set_hl(0, "CursorLineNr", vim.tbl_deep_extend("force", function_, { reverse = true }))
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("ModeChanged", {
|
|
||||||
pattern = "*:[Vv\22]*",
|
|
||||||
group = group,
|
|
||||||
callback = function()
|
|
||||||
local keyword = vim.api.nvim_get_hl(0, { name = "Keyword" })
|
|
||||||
vim.api.nvim_set_hl(0, "CursorLineNr", vim.tbl_deep_extend("force", keyword, { reverse = true }))
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue