Skip to content
Discussion options

You must be logged in to vote

Yes - the selection marker is baked into the built-in icon component (when a node is selected it returns { marker, icon }), so you need to split it into two custom components and then order them however you like in the renderer.

Custom components go in the source's components table and override built-ins of the same name, so you can wrap the stock icon and strip the marker, and add a separate selected component:

local common = require("neo-tree.sources.common.components")

local function is_selected(node, state)
  return state.selected and state.selected[node.id]
end

require("neo-tree").setup({
  filesystem = {
    components = {
      -- the built-in icon, without the selection marker
 …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Tcholly
Comment options

Answer selected by Tcholly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants