Coder Social home page Coder Social logo

neo-tree-diagnostics.nvim's People

Contributors

cseickel avatar kalmenn avatar mrbjarksen avatar pdelacroix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

neo-tree-diagnostics.nvim's Issues

Error arised when move focus from neo-tree-diagnostics window to a normal window

Every time I move the focus from the diagnostics window to a non-neo-tree window, this error message will show:
"[Neo-tree ERROR] debounce neo-tree-diagnostics-follow error: .../packer/start/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:554: attempt to index local 'tree' (a nil value)"

My neovim version is 0.8.2
neo-tree is the latest version on the branch v2.x
neo-tree-diagnostics is the latest version

The highlight of keyword from `'preview'` cannot be cleared with `:noh`

This continued #14.

@mrbjarksen Yes, I just tried the mapping ['<cr>'] = 'preview' and it works like my no_open above. Could you elaborate more on how to make this "preview" mode behavior enabled by default, so I don't have to use a mapping to enable it? (link to it)

Now I can preview entries from the diagnostics list with <CR>, but a new problem appeared: the word (ex. the NOREF_NOERR in the image below) still got highlighted after calling :noh, which I consider as a bug. What's the problem in this case?

Alternate renderer for diagnostics.. WIki?

I made a customized renderer for myself that I wanted to share. I was wondering if you wanted to use the wiki for this sort of thing or if you had any other plans.

Here's a screenshot:
image

and here's the code:

  require("neo-tree").setup({
    sources = {
      "filesystem",
      "buffers",
      "git_status",
      "diagnostics",
    },
    diagnostics = {
      components = {
        linenr = function(config, node)
          local lnum = tostring(node.extra.diag_struct.lnum + 1)
          local pad = string.rep(" ", 4 - #lnum)
          return {
            {
              text = pad .. lnum,
              highlight = "LineNr",
            },
            {
              text = "",
              highlight = "NeoTreeDimText",
            }
          }
        end
      },
      renderers = {
        diagnostic = {
          { "indent" },
          { "icon" },
          { "linenr" },
          { "name" },
          --{ "source" },
          --{ "code" },
        },
      },
    },
  })

Warning Invalid mapping for

I have the following warning from neo-tree every time I open diagnostics:
изображение
It doesn't happen when I open other sources, like filesystem.

Minimal config to reproduce:

local config = {
  sources = {
    'filesystem',
    'diagnostics',
  },
  filesystem = {
    commands = {
      copy_file_name = function(state)
        local node = state.tree:get_node()
        vim.fn.setreg('+', node.name, 'c')
      end,
    },
  },
  window = {
    mappings = {
      ['Y'] = 'copy_file_name',
    },
  },
}

require('neo-tree').setup(config)

Support for TODO comments

Recently came across your plugin, and neo-tree as a whole, and am really thinking of making the switch. One thing that is kind of holding me back though is the lack of TODO comment support compared to Trouble with folke/todo-comments.nvim.
image

While that plugin does both highlighting and aggregation of todos, the aggregation is what I really use. That being said, I could totally understand if that isn't within the scope of this project.

Either way, I am looing forward to probably including this plugin and neo-tree in my config rewrite.

`reveal` does not respect `follow_behavior`

Using :Neotree diagnostics reveal always focuses the file, for example, even if follow_behavior.always_follow_file is false. This should be a simple fix, but maybe reveal behavior should be separate from follow behavior?

Status of "preview" code?

I noticed you have a branch with a preview command. This has been requested many times for Neo-tree but I never gave it a high priority because I didn't need it. Well, just now I had a situation where I wanted to quickly scan the contents off all of my config files and I realized a preview command would be awesome for that!

So the question is, does your preview code work? If not, what is needed to bring it over the finish line? Can we add it directly to Neo-tree?

main...preview

Error in event handler for event neo_tree_buffer_enter[diagnostics.neo_tree_buffer_enter]: .../lua/nui/tree/init.lua:254: Expected Lua number

The commit seems to cause an error. The error is shown on both diagnostics list and neotree filesystem filetree.

 Error in event handler for event neo_tree_buffer_enter[diagnostics.neo_tree_buffer_enter]: >  ...im/site/pack/packer/start/nui.nvim/lua/nui/tree/init.lua:254: Expected Lua number

Originally posted by @nyngwang in #14 (comment)

I just tested and found that either true or false on the option autopreview = ..., the same error was shown.

The `follow_current_file = true` doesn't seem to work

As title. Is this because I have some customization on the config of neo-tree plugin? Now I use an alternative as follow (with this, I still need to press <CR>, while what I expect from "follow" is that the function will be executed on cursor hold.)

commands = {
  no_open = function (...)
    local cur_win = vim.api.nvim_get_current_win()
    require('neo-tree.sources.diagnostics.commands').open(...)
    vim.api.nvim_set_current_win(cur_win)
  end,
},

Control auto-refresh with config option

I have had some issues with neovim freezing when I do something to produce a lot of errors while the diagnostics source is open. I think I can fix that by adjusting the debounce time, or even just disabling the auto refresh completely.

I can submit a PR if that sounds like a good idea to you. I'm not sure yet what the option would be called, maybe one of:

  1. debounce_interval
  2. max_refresh_interval ( or is it min? )
  3. refresh_interval
  4. refresh_delay

That option can either be set to false or -1 to disable it entirely, or there can be another option to auto_refresh which can default to true.

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.