Giter Site home page Giter Site logo

bookmarks.nvim's People

Contributors

cybermelons avatar tomasky avatar ttytm 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bookmarks.nvim's Issues

Invalid 'line': out of range

image

Not sure what's going on, everytime I enter window i'm getting this error. Clearing all bookmarks and adding a new one gets rid of the error.

Icons redraw issue

The icons not update/refresh before terminal focus will lost.

OS: Linux, OsX
Terminal: Iterm2, alacritty

The icons isn't load when file is open.
The icons not change after was edited by "mi"
Add/Remove new mark is worked normally.

After file was opened, or icon was changed by "mi" @f
need to lost focus of terminal and return. For example Alt+Tab or mouse action.
After this action all icons is loaded and updated.

Save file e.t.c. doesn't help.

Telescope Picker Complains about opts = nil

Enjoying my emoji bookmarks ๐Ÿ’ฏ ๐Ÿš€

Also when I try to use the telescope picker, I see:

E5108: Error executing lua ...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:41: attempt to index local 'opts' (a nil value)
stack traceback:
...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:41: in function 'qflist_previewer'
...y/bookmarks.nvim/lua/telescope/_extensions/bookmarks.lua:68: in function 'list'
[string ":lua"]:1: in main chunk

Maybe there is something wrong with my mapping, or I am failing to pass in default opts somewhere? I'm in lazyvim btw, and fairly new to the plugin setup style
https://www.lazyvim.org/extras/util/project

Notably, telescope opts is set to nil (?), but I'm not seeing this issue with other plugins. Let me know if I should send this to Telescope or Lazyvim..

Thanks ๐Ÿค


-- Overriding editor.lua for better grep with telescope, fzf
local Util = require("lazyvim.util")

return {

  {
    "nvim-telescope/telescope.nvim",
    config = function()
      local actions = require("telescope.actions")
      require("telescope").setup({
      defaults = {
        mappings = {
          i = {
            ["<esc>"] = actions.close,
            ["<c-j>"] = actions.move_selection_next,
            ["<c-k>"] = actions.move_selection_previous,
          },
        },
      },
      })
    end,
    dependencies = {
...
      {
        "tomasky/bookmarks.nvim",
        config = function()
          require("bookmarks").setup({
            -- sign_priority = 8,  --set bookmark sign priority to cover other sign
            save_file = vim.fn.expand("$HOME/.bookmarks"), -- bookmarks save file path
            keywords = {
              -- You can just copy these from emoji keyboard in browser (since it's using same font)
              ["@t"] = "๐Ÿ”ฅ", -- mark annotation startswith @t ,signs this icon as `Todo`
              ["@w"] = "โš ๏ธ ", -- mark annotation startswith @w ,signs this icon as `Warn`
              ["@f"] = "โ› ", -- mark annotation startswith @f ,signs this icon as `Fix`
              ["@n"] = "๐Ÿง ", -- mark annotation startswith @n ,signs this icon as `Note`
            },
            on_attach = function(bufnr)
              local keymap = vim.keymap.set
              local bm = require("bookmarks")
              keymap("n", "<leader>mm", bm.bookmark_toggle, { desc = "# Toggle Emoji Bookmark" })
              keymap("n", "<leader>mi", bm.bookmark_ann, { desc = "# Change annotation" })
              keymap("n", "<leader>mc", bm.bookmark_clean, { desc = "# Clean all marks in buffer" })
              keymap("n", "<leader>mn", bm.bookmark_next, { desc = "# Jump to next mark in buffer" })
              keymap("n", "<leader>mp", bm.bookmark_prev, { desc = "# Jump to prev mark in buffer" })
              keymap("n", "<leader>mq", bm.bookmark_list, { desc = "# Show marked file list in quickfix window" })
              require("telescope").load_extension("bookmarks")
              keymap(
                "n",
                "<leader>ml",
                [[:lua require("telescope").extensions.bookmarks.list()<cr>]],
                { desc = "# Telescope bookmarks list" }
              )
            end,
          })
        end,
      },
    },
...

Bug: attempt to call global warn (a nil value)

Failed to run `config` for bookmarks.nvim

...l/share/nvim/lazy/bookmarks.nvim/lua/bookmarks/async.lua:45: The coroutine failed with this message: .../share/nvim/lazy/bookmarks.nvim/lua/bookmarks/config.lua:52: attempt to call global 'warn' (a nil value)
stack traceback:
	.../share/nvim/lazy/bookmarks.nvim/lua/bookmarks/config.lua: in function 'validate_config'
	.../share/nvim/lazy/bookmarks.nvim/lua/bookmarks/config.lua:73: in function 'build'
	.../.local/share/nvim/lazy/bookmarks.nvim/lua/bookmarks.lua:67: in function <.../.local/share/nvim/lazy/bookmarks.nvim/lua/bookmarks.lua:66>

Config

return {
  "tomasky/bookmarks.nvim",
  event = "VeryLazy",
  config = function()
    require("bookmarks").setup {
      on_attach = function(bufnr)
        local bm = require "bookmarks"
        local map = vim.keymap.set
        map("n", "mm", bm.bookmark_toggle) -- add or remove bookmark at current line
        map("n", "mi", bm.bookmark_ann) -- add or edit mark annotation at current line
        map("n", "mc", bm.bookmark_clean) -- clean all marks in local buffer
        map("n", "mn", bm.bookmark_next) -- jump to next mark in local buffer
        map("n", "mp", bm.bookmark_prev) -- jump to previous mark in local buffer
        map("n", "ml", bm.bookmark_list) -- show marked file list in quickfix window
      end,
      require("telescope").load_extension "bookmarks",
    }
  end,
}

Bug: signs aren't loaded on startup

Thanks for this plugin, wouldn't have found it if it wasn't just listed recently (#1).

I noticed that the signs (in the signcolumn) do not appear on initial startup. The bookmarks are there and work for going to the next bookmark, but the signs only appear after you switch to a different buffer and then switch back.

I have tried it without lazyloading, still the same issue. I also tried disabling other plugins that add things to the signcolumn (e.g. gitsigns) in case of conflicts there, but the issue persists even then

Underrated

I think that's some good work presented in this plugin.

If it's not to bothering for you i'd submit it to awsome neovim for you, to expose it to a larger user base.

Conflict with gitsigns plugin

When we are use gitsigns plugin the bookmarks isnt working.
But on the same time another plugin like

		"yaocccc/nvim-foldsign",

Work normaly
image

Feature Request: infer/default bookmark name

First of all, I love this plugin and use it daily for keeping track of and jumping around different large codebases.

I often create bookmarks for functions or structs, and if would as such be great if bookmarks could use treesitter or similar to look up the name of the current function/ident and prefill the popup for the bookmark name with the ident of it.

Thank you

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.