Giter Club home page Giter Club logo

listish.nvim's People

Contributors

arsham avatar

Stargazers

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

Watchers

 avatar  avatar

listish.nvim's Issues

Getting an error after adding new item to quicklist and then opening another item

Hi! I'm getting the following error after I add an item to the quicklist using the default <leader>qq mapping. Afterwards, if I navigate to the quicklist and hit on another item I get this error:

Error detected while processing BufEnter Autocommands for "<buffer=14>":
Error executing lua callback: ...ocal/share/nvim/lazy/listish.nvim/lua/listish/visual.lua:63: Invalid 'line': out of range
stack traceback:
        [C]: in function 'nvim_buf_set_extmark'
        ...ocal/share/nvim/lazy/listish.nvim/lua/listish/visual.lua:63: in function 'insert_extmarks'
        ...ocal/share/nvim/lazy/listish.nvim/lua/listish/visual.lua:113: in function 'update_extmarks'
        ...ocal/share/nvim/lazy/listish.nvim/lua/listish/visual.lua:217: in function <...ocal/share/nvim/lazy/listish.nvim/lua/listish/visual.lua:213>

If I navigate to another quicklist item using :cnext or :cprevious I get another error

E5108: Error executing lua: vim/_editor.lua:0: nvim_exec2()..BufEnter Autocommands for "<buffer=14>": Vim(append):Error executing lua callback: ...ocal/share/nvim/lazy
/listish.nvim/lua/listish/visual.lua:63: Invalid 'line': out of range
stack traceback:
        [C]: in function 'nvim_buf_set_extmark'
        ...ocal/share/nvim/lazy/listish.nvim/lua/listish/visual.lua:63: in function 'insert_extmarks'
        ...ocal/share/nvim/lazy/listish.nvim/lua/listish/visual.lua:113: in function 'update_extmarks'
        ...ocal/share/nvim/lazy/listish.nvim/lua/listish/visual.lua:217: in function <...ocal/share/nvim/lazy/listish.nvim/lua/listish/visual.lua:213>
        [C]: in function 'nvim_exec2'
        vim/_editor.lua: in function 'cmd'
        ...local/share/nvim/lazy/arshlib.nvim/lua/arshlib/quick.lua:32: in function 'cmd_and_centre'
        ....local/share/nvim/lazy/listish.nvim/lua/listish/init.lua:228: in function <....local/share/nvim/lazy/listish.nvim/lua/listish/init.lua:227>
stack traceback:
        [C]: in function 'nvim_exec2'
        vim/_editor.lua: in function 'cmd'
        ...local/share/nvim/lazy/arshlib.nvim/lua/arshlib/quick.lua:32: in function 'cmd_and_centre'
        ....local/share/nvim/lazy/listish.nvim/lua/listish/init.lua:228: in function <....local/share/nvim/lazy/listish.nvim/lua/listish/init.lua:227>

I'm also getting a glitched looking buffer of the file afterwards, with "Quickfix Note" appended to the lines that were previously in the quickfix list but not added through this plugin
image

So I think it's getting confused with items that were already there

[Feature Request]: Modify code in quickfix, write it to file

I don't know if it would be possible to add something that is similar to the functionality of stefandtw/quickfix-reflector.vim. Where a command like :vimgrep could populate the quickfix list, and then a %s/<search>/<replace> command could be ran on the quickfix list, causing each change to be written to the corresponding file.

This would need to involve checking whether or not the item in the quickfix list is a note or an actual line in a file.

Just as a note, an issue I had with the plugin mentioned above is that it does not always work very well with nvim-bqf. The preview window from bqf will not always close, and your plugin seems to work wonderfully with bqf.

quickfix theme not applied until list is opened again or an item is added

Hi, nice plugin!

When I first open the quickfix window after populating it with some items, the styling and the column alignments aren't there. But after I close it and re-open it, or if I add an item to the list, the style and lining up gets applied.

I'm using telescope's live grep to add items to quickfix btw.

This is my config using lazy.nvim

  {
    "arsham/listish.nvim",
    dependencies = {
      "arsham/arshlib.nvim",
    },
    ft = "qf",
    config = true,
    keys = {
      { "<leader>qq", desc = "Add current position to quicklist" },
      { "<leader>qn", desc = "Add current position with note to quicklist" },
      { "<leader>qo", desc = "Open quicklist" },
      { "<leader>ww", desc = "Add current position to location list" },
      { "<leader>wn", desc = "Add current position with note to location list" },
      { "<leader>wo", desc = "Open location list" },
      { "<leader>qd", desc = "Clear quicklist" },
      { "<leader>qc", desc = "Close quicklist" },
      { "<leader>wd", desc = "Clear location list" },
      { "<leader>wc", desc = "Close location list" },
      { "<leader>cc", desc = "Close both quicklist and location list" },
    },
  },

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.