-
Notifications
You must be signed in to change notification settings - Fork 196
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: folke/snacks.nvim
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.6.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: folke/snacks.nvim
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.7.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
6
contributors
Commits on Nov 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8e6d977 - Browse repository at this point
Copy the full SHA 8e6d977View commit details -
Configuration menu - View commit details
-
Copy full SHA for b813c33 - Browse repository at this point
Copy the full SHA b813c33View commit details -
Configuration menu - View commit details
-
Copy full SHA for d517b11 - Browse repository at this point
Copy the full SHA d517b11View commit details
Commits on Dec 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7c29848 - Browse repository at this point
Copy the full SHA 7c29848View commit details -
Configuration menu - View commit details
-
Copy full SHA for e6f6397 - Browse repository at this point
Copy the full SHA e6f6397View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1cec695 - Browse repository at this point
Copy the full SHA 1cec695View commit details -
Configuration menu - View commit details
-
Copy full SHA for c7802cc - Browse repository at this point
Copy the full SHA c7802ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2080d41 - Browse repository at this point
Copy the full SHA 2080d41View commit details -
Configuration menu - View commit details
-
Copy full SHA for 462e92d - Browse repository at this point
Copy the full SHA 462e92dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a68fad8 - Browse repository at this point
Copy the full SHA a68fad8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c63ba6 - Browse repository at this point
Copy the full SHA 0c63ba6View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb79551 - Browse repository at this point
Copy the full SHA cb79551View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a50738 - Browse repository at this point
Copy the full SHA 5a50738View commit details -
Configuration menu - View commit details
-
Copy full SHA for 353f069 - Browse repository at this point
Copy the full SHA 353f069View commit details -
feat(debug): added
Snacks.debug.run()
to execute the buffer or sele……ction with inlined print and errors
Configuration menu - View commit details
-
Copy full SHA for e1fe4f5 - Browse repository at this point
Copy the full SHA e1fe4f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7db0ed4 - Browse repository at this point
Copy the full SHA 7db0ed4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 32c46b4 - Browse repository at this point
Copy the full SHA 32c46b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f6719a - Browse repository at this point
Copy the full SHA 8f6719aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8088799 - Browse repository at this point
Copy the full SHA 8088799View commit details -
Configuration menu - View commit details
-
Copy full SHA for 999ae07 - Browse repository at this point
Copy the full SHA 999ae07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e9fdd4 - Browse repository at this point
Copy the full SHA 7e9fdd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b6be55 - Browse repository at this point
Copy the full SHA 0b6be55View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b75f0f - Browse repository at this point
Copy the full SHA 3b75f0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f68768f - Browse repository at this point
Copy the full SHA f68768fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 293bc4a - Browse repository at this point
Copy the full SHA 293bc4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d023bf7 - Browse repository at this point
Copy the full SHA d023bf7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0043fa9 - Browse repository at this point
Copy the full SHA 0043fa9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a47eb7 - Browse repository at this point
Copy the full SHA 7a47eb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90cfaa2 - Browse repository at this point
Copy the full SHA 90cfaa2View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca7188c - Browse repository at this point
Copy the full SHA ca7188cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ddaa2aa - Browse repository at this point
Copy the full SHA ddaa2aaView commit details -
feat(gitbrowse): allow custom branch (#172)
## Description Allow the user to be able to define custom branch with `Snacks.gitbrowse`. I also added `start_line` and `end_line` (default to `nil`), because from my testing when using a keymap such as the one in [my comment in the related issue](#170 (comment)) or this one which I came up later while implementing this ```lua vim.keymap.set({ "n", "x" }, "<leader>gY", function() local function system(cmd, err) local proc = vim.fn.system(cmd) if vim.v.shell_error ~= 0 then Snacks.notify.error({ err, proc }, { title = "Git Browse" }) error(err) end return vim.split(vim.trim(proc), "\n") end local branches = {} local start_line, end_line if vim.fn.mode() == "v" or vim.fn.mode() == "V" then start_line = vim.fn.line("v") end_line = vim.fn.line(".") if start_line > end_line then start_line, end_line = end_line, start_line end end for _, branch in ipairs(system({ "git", "branch" }, "Failed to get git branches")) do branch = branch:match("%s*[%*]?%s*(%S+)") table.insert(branches, branch) end vim.ui.select(branches, { prompt = "Select branch", }, function(choice) if choice then Snacks.gitbrowse({ start_line = start_line or nil, end_line = end_line or nil, branch = choice }) end end) end, { desc = "Git Browse ()" }) ``` Then the visual lines would not work. My guess is that in the first case the command line prompt and in the second case the `vim.ui.select` before calling `Snacks.gitbrowse` break the Visual mode state and any visual selection is not propagated to `Snacks.gitbrowse` to be properly evaluated by the internal code for visual lines selection, which works just fine when you just call directly `Snacks.gitbrowse()` via a function in a keymap (which I assume doesn't break Visual mode state). That's why I had to implement the visual selection again in the keymap as well and needed the extra parameters to pass the newly evaluated values. Please do correct me if I'm somehow wrong in my logical deduction (which is based mostly on observation and guessing) and maybe `start_line` and `end_line` are not needed. Except if the user passes the option directly in the keymap, but then he would have to create multiple keymaps for different branches, which in my personal opinion defeats the purpose of this feature. In both cases of the keymaps I mentioned the user can dynamically either type or choose the branch available to him. But maybe I'm missing something in both the keymaps implementations that I came up with. <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> ## Related Issue(s) Closes #170. <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> ## Screenshots <!-- Add screenshots of the changes if applicable. --> --------- Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e5bc11e - Browse repository at this point
Copy the full SHA e5bc11eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ef424b - Browse repository at this point
Copy the full SHA 9ef424bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 93b254d - Browse repository at this point
Copy the full SHA 93b254dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 85f5132 - Browse repository at this point
Copy the full SHA 85f5132View commit details -
Configuration menu - View commit details
-
Copy full SHA for 891648a - Browse repository at this point
Copy the full SHA 891648aView commit details -
feat(dashbard): explude files from stdpath data/cache/state in recent…
… files and projects
Configuration menu - View commit details
-
Copy full SHA for b99bc64 - Browse repository at this point
Copy the full SHA b99bc64View commit details -
Configuration menu - View commit details
-
Copy full SHA for f4e3198 - Browse repository at this point
Copy the full SHA f4e3198View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4bdf7da - Browse repository at this point
Copy the full SHA 4bdf7daView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f90e63 - Browse repository at this point
Copy the full SHA 4f90e63View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6db50cf - Browse repository at this point
Copy the full SHA 6db50cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f768f8 - Browse repository at this point
Copy the full SHA 5f768f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for d370be6 - Browse repository at this point
Copy the full SHA d370be6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30ae618 - Browse repository at this point
Copy the full SHA 30ae618View commit details -
docs: added a setup section to docgen, since some people didn't know …
…how to configure snacks...
Configuration menu - View commit details
-
Copy full SHA for 67894ee - Browse repository at this point
Copy the full SHA 67894eeView commit details
Commits on Dec 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for adf0433 - Browse repository at this point
Copy the full SHA adf0433View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ea57a2 - Browse repository at this point
Copy the full SHA 0ea57a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for f03727c - Browse repository at this point
Copy the full SHA f03727cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a48c2e - Browse repository at this point
Copy the full SHA 0a48c2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f894952 - Browse repository at this point
Copy the full SHA f894952View commit details
There are no files selected for viewing