Code Monkey home page Code Monkey logo

Comments (11)

pysan3 avatar pysan3 commented on June 12, 2024 1

I don't quite understand what you want but I think this will help you.

Could you give me your nvim-tree example (as you said you liked the nvim-tree api)?
I don't fully understand what your goal looks like.

        {
          text = function(buffer)
            local mgr = require("neo-tree.sources.manager")
            if not vim.api.nvim_buf_is_valid(buffer.number) then
              return "File Explorer"
            end
            local winid = vim.b[buffer.number].neo_tree_winid
            local state = mgr.get_state_for_window(winid)
            if not state then
              return "File Explorer"
            end
            return state.path
          end,
          style = "bold",
        },

from neo-tree.nvim.

pysan3 avatar pysan3 commented on June 12, 2024 1

Mate, you might be interested in config.source_selector.show_scrolled_off_parent_node with a combination of this trick.

Idk if cokeline has a raw field that can be passed, but I think it is worth a Feature request on their side as I said in the issue for bufferline.

from neo-tree.nvim.

pysan3 avatar pysan3 commented on June 12, 2024

These lines might be useful for you.

add_blank_line_at_top = false, -- Add a blank line at the top of the tree.

hide_root_node = false, -- Hide the root node.
retain_hidden_root_indent = false, -- IF the root node is hidden, keep the indentation anyhow.
-- This is needed if you use expanders because they render in the indent.

Regarding cokeline, may I ask what you've got so far? There are various degrees that needs to be explained so I'd like to know that you don't understand.

Have you read the sidebar section?

from neo-tree.nvim.

cuattoo avatar cuattoo commented on June 12, 2024

yes, I had read many pages of code and issues to find that, what I need. So that was my first question/comment on github.

I have a sidebar for coke but only a normal text and I wish so cool functions.

    sidebar = {
        filetype = {'NvimTree', "neo-tree"},
        components = {
            {
                text = 'File Explorer',
                fg = title,
                bg = bg,
                style = 'bold',
            },
        },
    },

Idk, I would like to add some code for the empty line so that if I want a new file or something with a keybind to write in the blank line instead of a popup, for a new file. That would be nice.
and then add an integration for cokeline.

I find my idea useful
pls give feedback.

from neo-tree.nvim.

pysan3 avatar pysan3 commented on June 12, 2024

If you are satisfied, plz close this issue @cuattoo

from neo-tree.nvim.

cuattoo avatar cuattoo commented on June 12, 2024

Ik, can I edit the gui like this?
preview

I find this important because otherwise my GUI doesn't match up.

from neo-tree.nvim.

pysan3 avatar pysan3 commented on June 12, 2024

I don't understand what you mean.

from neo-tree.nvim.

cuattoo avatar cuattoo commented on June 12, 2024

The borders
here

from neo-tree.nvim.

pysan3 avatar pysan3 commented on June 12, 2024

Did you check the config.source_selector.show_scrolled_off_parent_node option?

I don't think it has any borders at all, so I don't know what you are talking about.

If you want to modify the borders in the winbar selector, please read the help file. You've got options like config.source_selector.separator / separator_active / highlight_tab etc

Do you know how to decorate tabline without any plugin? As you can see in #1368 (comment), you can decorate the raw field as muchas you like.

          raw = "<decorate-here>%{%v:lua.__get_selector()%}<and-here>",

from neo-tree.nvim.

cuattoo avatar cuattoo commented on June 12, 2024

I don't quite understand how it works,
I am using cokeline and I am trying to implement this.
Idk how. My brain is dead now ^ ^

from neo-tree.nvim.

cseickel avatar cseickel commented on June 12, 2024

Just to clarify, the "scrolled off parent node" stuff only applies when the window is scrolled down. In that situation, it proves the parent path of the node which is at the top of the visible screen. It really only makes sense to place this in the winbar of neo-tree.

If you haven't changed any of the default settings regarding paths, the root path of neo-tree is just going to be the current working directory of the neovim tab. That means all you need to do is to use a generic "current working directory" component, which is a question for the cokeline project. If you want a raw statusline code, I use this:

%#StatusLineCwd#  %{fnamemodify(getcwd(), ":~")}/%*

There is a config option in neo-tree to hide the root folder, just set hide_root_node = true in your config.

from neo-tree.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.