Skip to content

Commit

Permalink
tree(hl): hide gui cursor, only use cursorline for indicating node po…
Browse files Browse the repository at this point in the history
…sition in tree
  • Loading branch information
ttytm committed Aug 19, 2024
1 parent 07ccd25 commit 6493cbc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions lua/nxvim/plugins/neo-tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ nx.au({
pattern = "neo-tree-popup",
callback = function()
vim.schedule(function()
vim.cmd("set gcr=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20")
nx.map({
-- Allow to escape into normal mode in fuzzy finder input popup.
{ "<Esc>", "<Esc>", "i" },
Expand Down
16 changes: 15 additions & 1 deletion lua/nxvim/plugins/noice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,21 @@ require("noice").setup({

-- == [ Events ================================================================

nx.hl({ { "NoiceCmdlinePopupBorder", "NoiceCmdlineIconCmdLine" }, link = "Operator" })
local hacks = require("noice.util.hacks")

nx.au({
{ "WinEnter", "FocusGained" },
callback = function(ev)
-- if vim.bo[ev.buf].filetype ~= "neo-tree" then vim.cmd("set gcr=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20") end
if not ev.buf then return end
if vim.bo[ev.buf].filetype == "neo-tree" then
hacks.hide_cursor()
else
-- hacks.show_cursor()
vim.cmd("set gcr=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20")
end
end,
})
-- ]

-- == [ Keymaps ===============================================================
Expand Down

0 comments on commit 6493cbc

Please sign in to comment.