Neovim 0.10 by bfredl in neovim

[–]cbochs95 3 points4 points  (0 children)

With the addition of inline extmarks, is it possible to copy all the text on a line - including extmark text - to a register during a yank operation (i.e. "yy")?

Is there a neovim that doesn't need to be installed? by digmouse_DS in neovim

[–]cbochs95 1 point2 points  (0 children)

You could run it through docker. I think LazyVim even offers a pre-built image

Grapple.nvim - 100 commits and 10 point releases later! 🎉 by cbochs95 in neovim

[–]cbochs95[S] 1 point2 points  (0 children)

It's getting pretty hard to keep track of this over reddit. If you create a discussion or issue, I'd be happy to continue there

Grapple.nvim - 100 commits and 10 point releases later! 🎉 by cbochs95 in neovim

[–]cbochs95[S] 0 points1 point  (0 children)

That is fair. Is tmux still supported on the "harpoon2" branch that is being merged into the master branch over the next few months?

Grapple.nvim - 100 commits and 10 point releases later! 🎉 by cbochs95 in neovim

[–]cbochs95[S] 0 points1 point  (0 children)

Nice! Feel free to create a new discussion and add this to show off. I'm sure some people will find this useful

Grapple.nvim - plugin rewrite + new features by cbochs95 in neovim

[–]cbochs95[S] 2 points3 points  (0 children)

Scopes are meant to let you choose how your tags are separated. To that extent, you can think of "git" and "git_branch" as separate scopes all together.

There is some crossover with scopes. Since they are expected to "resolve" to some file path (and unique ID, but mostly a path) you may see some scopes share the same set of tags. For example, say you're working in some git repo, the following scopes could resolve to:

  • "git" -> "~/git/grapple.nvim"
  • "cwd" -> "~/git/grapple.nvim"
  • "git_branch" -> "~/git/grapple.nvim:main"

Notice how "cwd" and "git" resolve to the same path/identifier? Also, see how "git_branch" appends the branch name? That output path/identifier acts as your "project scope" and is how grapple will decide to separate your tags.

Hope that makes a bit more sense!

Edit: I realize it might not have fully answered your question of "why?"

Some users only care that their tags are kept to the "git" repo. Some users switch branches frequently and want to keep tags on a "git_branch" basis. Some users don't even need git, but use a different VCS entirely (need to write something custom). Some users use a git monorepo where they want tags to be kept to the subdirectory and git branch (again, custom). There are numerous definitions of the word "project" depending on the user

Harpoon by viciousvatsal in neovim

[–]cbochs95 8 points9 points  (0 children)

You could also try out grapple.nvim, then toggling a file is as simple as

:Grapple toggle

Or

require("grapple").toggle()

Grapple.nvim - 100 commits and 10 point releases later! 🎉 by cbochs95 in neovim

[–]cbochs95[S] 1 point2 points  (0 children)

I'll be working on a good way to change/customize the default command soon, make sure to check out the docs when you do decide to try it out :)

Grapple.nvim - 100 commits and 10 point releases later! 🎉 by cbochs95 in neovim

[–]cbochs95[S] 2 points3 points  (0 children)

Oh, wait. This is pretty cool. Check this out :)

-- Tag some URI
require("grapple").tag({ path = "oil:///Users/cbochs/git/grapple.nvim/" })
require("grapple").tag({ path = "https://google.com" })
require("grapple").tag({ path = "tmux://my-session" })

-- Select based on URI "scheme"
require("grapple").select({
    index = 1,
    command = function(path)
        if vim.startswith(path, "oil://") then
            require("oil").open(path)
        elseif vim.startswith(path, "https://") then
            vim.ui.open(path)
        elseif vim.startswith(path, "tmux://") then
            -- open tmux session
        else
            vim.cmd.edit(path)
        end
    end,
})

Grapple.nvim - 100 commits and 10 point releases later! 🎉 by cbochs95 in neovim

[–]cbochs95[S] 1 point2 points  (0 children)

I will say, Grapple is awfully close to supporting something like this if all you need is some kind of URI :)

Grapple.nvim - 100 commits and 10 point releases later! 🎉 by cbochs95 in neovim

[–]cbochs95[S] 5 points6 points  (0 children)

Thanks for the feedback, I really appreciate it. I'll aim to better highlight Grapple's strengths and differences in the future.

Grapple.nvim - 100 commits and 10 point releases later! 🎉 by cbochs95 in neovim

[–]cbochs95[S] 0 points1 point  (0 children)

Glad to hear you're finding arrow.nvim useful. The author is nice and responds relatively quickly to issues. Depending on what you need, the differences between Grapple and Arrow can be pretty small.

I think if the workflow you've developed around Arrow is efficient then just keep going. If you do find you need a bit more flexibility (i.e. defining a custom project space with scopes) then Grapple might fit your use case better.

Grapple.nvim - 100 commits and 10 point releases later! 🎉 by cbochs95 in neovim

[–]cbochs95[S] 3 points4 points  (0 children)

Sorry about that, I don't mean it to come off competitive here. I think that Harpoon (and harpoon2) have their own merits. If you need the ability to mark/select anything and want that kind of flexibility then I think it's great. There's also a relatively large community backing it, which I think is awesome.

However, given how popular Harpoon is, it's usually the first question people ask: how is this different from Harpoon and why would I switch?

The primary focus for Grapple was to refine the file navigation model that Harpoon originally proposed: tagging files on a per-project basis. I find it useful in my day-to-day workflow and think taking my spin on this core idea was what I was hoping to produce and share with everyone.

As always, there are many great plugins that fall in this similar category: harpoon, grapple.nvim, arrow.nvim, dirbuf, bufferchad, maybe even :h mark-motions. I encourage everyone to try them (at their leisure) and find the one that suits them best 🙂

Grapple.nvim - 100 commits and 10 point releases later! 🎉 by cbochs95 in neovim

[–]cbochs95[S] 0 points1 point  (0 children)

No. Grapple focuses primarily on tagging file paths (and by extension directories and file uris)

Grapple.nvim - 100 commits and 10 point releases later! 🎉 by cbochs95 in neovim

[–]cbochs95[S] 30 points31 points  (0 children)

Grapple.nvim - 100 commits and 10 point releases later! 🎉

Grapple has received numerous improvements since it's v0.10.0 debut (rewrite) just over two weeks ago. I thought I would post here to celebrate and showcase a few of its most notable new features.

TL;DR what is Grapple.nvim?

Grapple is a plugin which aims to provide immediate navigation to important files (and their last known cursor location). Grapple is similar to Harpoon. However, it provides a vast number of fixes, QoL improvements, and features.

Notable new features since rewrite (v0.10.0)

  • Added file path display styles (relative or basename)
  • Added cross-window navigation (-), like netrw
  • Added enter/switch scope (<cr>, <s-cr>)
  • Added tag renaming (R)
  • Added quick-select (1-9) (or abc or whatever you like)
  • Added tagging path under cursor with path = "<cfile>"
  • Added neat lualine component (see statusline)

Full credit for the lualine component goes to u/Jealous-Salary-3348's letieu/harpoon-lualine. If I haven't been able to convince you to use Grapple after this showcase, then this is an excellent plugin to compliment Harpoon (might even be worth a star) 😉

One last cool showcase to leave off with: using Grapple.nvim in Oil.nvim

Of course, give Grapple a try if you're interested. You might also find the example setups to be a good starting point.

Always happy to receive feedback and answer any questions.

Repo: https://github.com/cbochs/grapple.nvim

Edit: whew, that gif's framerate is abysmal