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 e3d35b2 commit f4258f2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
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
28 changes: 24 additions & 4 deletions lua/nxvim/plugins/noice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,35 @@ require("noice").setup({

-- ]

-- [ == Highlights ============================================================
-- [ == 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 ===============================================================

nx.map({
{ "<C-j>", "<Tab>", "c", desc = "Next Entry" },
{ "<C-k>", "<S-Tab>", "c", desc = "Previous Entry" },
})
-- <== }
-- ]

-- [ == Highlights ============================================================

nx.hl({ { "NoiceCmdlinePopupBorder", "NoiceCmdlineIconCmdLine" }, link = "Operator" })
-- ]

0 comments on commit f4258f2

Please sign in to comment.