Compare commits

..

4 commits

Author SHA1 Message Date
github-actions[bot]
f6702ede21 chore: update flake.lock
Flake lock file updates:

• Updated input 'neovim-nightly-overlay':
    'github:nix-community/neovim-nightly-overlay/2c33f92a62588cd30dbba26fa39384e29229bc6f?narHash=sha256-h3c8Mcs4wI0U9JKzDyj1X%2BJUMc5KsfIXu2eyRE5ktAs%3D' (2025-11-09)
  → 'github:nix-community/neovim-nightly-overlay/994eb1828abe40f256e27ff38663b4f3f819d4cb?narHash=sha256-HDuT9S50/3%2B2blDIL4Y5qX8g5bA5FtpzP9lyagmyNq4%3D' (2025-11-14)
• Updated input 'neovim-nightly-overlay/flake-parts':
    'github:hercules-ci/flake-parts/26d05891e14c88eb4a5d5bee659c0db5afb609d8?narHash=sha256-xxdepIcb39UJ94%2BYydGP221rjnpkDZUlykKuF54PsqI%3D' (2025-11-06)
  → 'github:hercules-ci/flake-parts/52a2caecc898d0b46b2b905f058ccc5081f842da?narHash=sha256-8oNVE8TrD19ulHinjaqONf9QWCKK%2Bw4url56cdStMpM%3D' (2025-11-12)
• Updated input 'neovim-nightly-overlay/neovim-src':
    'github:neovim/neovim/ded578625219d5056fdacdba4b04f0d5bf4fbe9d?narHash=sha256-npSk%2BFSPkiaGwKTluegZ3tXqDpe3EFiRMQJ2Cc6rq4Y%3D' (2025-11-08)
  → 'github:neovim/neovim/d017f3c9a0b745e0c57feb8c92dcc852948f7301?narHash=sha256-oGwmSPl%2BFA0y2uPEGkkavr5sxLkpHR6%2BCio8eZ8OtPo%3D' (2025-11-13)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/cdfa60cc7448c7943dd3feb0ab18e342d569c7a4?narHash=sha256-kGEigbGxzpXpyeU9BtILXsMwTls5XcLyXEwYVfNjO4g%3D' (2025-11-09)
  → 'github:NixOS/nixpkgs/fa972b1d29bb165bebc538c227a6e57f33631789?narHash=sha256-48vHwFWqC7oUMJqcq3xCB84FBHHjvO3rNL18si1IRvo%3D' (2025-11-14)
2025-11-14 10:20:40 +00:00
8fc4e6a407 flake.lock: Update
Some checks failed
build / build (nvim) (push) Has been cancelled
Flake lock file updates:

• Updated input 'dart':
    'github:iofq/dart.nvim/71421e7ef5aee8267e24dc562fdd07a83bda192e?narHash=sha256-ULrZW4b8SKRvPpJPt8/jkqqc/blQiIWUriNWVXA33so%3D' (2025-10-23)
  → 'github:iofq/dart.nvim/8822aabbfef95eda2b22a8f7ee08912c762ef941?narHash=sha256-ADZ2b2Oz%2BMOSjdKKCcQX9KmlhtmvVlZFEJr0HigWsOY%3D' (2025-11-01)
• Updated input 'neovim-nightly-overlay':
    'github:nix-community/neovim-nightly-overlay/21595d9f79b5da0eef177dcfdd84ca981ac253a9?narHash=sha256-X4SNeOXdFkE7Gt%2BwaO5ck3TqfqWskqJHxt1WIu3nnUQ%3D' (2025-10-26)
  → 'github:nix-community/neovim-nightly-overlay/2c33f92a62588cd30dbba26fa39384e29229bc6f?narHash=sha256-h3c8Mcs4wI0U9JKzDyj1X%2BJUMc5KsfIXu2eyRE5ktAs%3D' (2025-11-09)
• Removed input 'neovim-nightly-overlay/flake-compat'
• Updated input 'neovim-nightly-overlay/flake-parts':
    'github:hercules-ci/flake-parts/864599284fc7c0ba6357ed89ed5e2cd5040f0c04?narHash=sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4%3D' (2025-10-20)
  → 'github:hercules-ci/flake-parts/26d05891e14c88eb4a5d5bee659c0db5afb609d8?narHash=sha256-xxdepIcb39UJ94%2BYydGP221rjnpkDZUlykKuF54PsqI%3D' (2025-11-06)
• Removed input 'neovim-nightly-overlay/git-hooks'
• Removed input 'neovim-nightly-overlay/git-hooks/flake-compat'
• Removed input 'neovim-nightly-overlay/git-hooks/gitignore'
• Removed input 'neovim-nightly-overlay/git-hooks/gitignore/nixpkgs'
• Removed input 'neovim-nightly-overlay/git-hooks/nixpkgs'
• Removed input 'neovim-nightly-overlay/hercules-ci-effects'
• Removed input 'neovim-nightly-overlay/hercules-ci-effects/flake-parts'
• Removed input 'neovim-nightly-overlay/hercules-ci-effects/nixpkgs'
• Updated input 'neovim-nightly-overlay/neovim-src':
    'github:neovim/neovim/a121ede1bfee2704c26159124f8f61f96c6aa136?narHash=sha256-S%2BYmbP/bPETjKk6B/tlh%2BjwIH7K7iPoXyHLLwTqVOhk%3D' (2025-10-25)
  → 'github:neovim/neovim/ded578625219d5056fdacdba4b04f0d5bf4fbe9d?narHash=sha256-npSk%2BFSPkiaGwKTluegZ3tXqDpe3EFiRMQJ2Cc6rq4Y%3D' (2025-11-08)
• Removed input 'neovim-nightly-overlay/treefmt-nix'
• Removed input 'neovim-nightly-overlay/treefmt-nix/nixpkgs'
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/887b4accbb94043a752c086c2aae6c6b365f7b3f?narHash=sha256-aK%2BBZgnXKktKD1DFAJoB%2B8KD9L8sf/dmiOa2bShlhlk%3D' (2025-10-26)
  → 'github:NixOS/nixpkgs/cdfa60cc7448c7943dd3feb0ab18e342d569c7a4?narHash=sha256-kGEigbGxzpXpyeU9BtILXsMwTls5XcLyXEwYVfNjO4g%3D' (2025-11-09)
• Updated input 'nvim-treesitter-main':
    'github:iofq/nvim-treesitter-main/834d66648bb7a96a2ad11d53a33f2d9b13766447?narHash=sha256-xTQUiJu0jJNSEHEv4La1HbaFokup0eWr67Kqf/wDENA%3D' (2025-10-26)
  → 'github:iofq/nvim-treesitter-main/69e9583fe72fa2dbffcb740563a9cc48396e3f75?narHash=sha256-hRGD%2BCE04Z1qAJAaiJs6o%2BblS0WUEqfVS/5cqA0NcDI%3D' (2025-11-09)
• Updated input 'nvim-treesitter-main/nixpkgs':
    'github:nixos/nixpkgs/01f116e4df6a15f4ccdffb1bcd41096869fb385c?narHash=sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d%2BdAiC3H%2BCDle4%3D' (2025-10-22)
  → 'github:nixos/nixpkgs/ae814fd3904b621d8ab97418f1d0f2eb0d3716f4?narHash=sha256-YRqMDEtSMbitIMj%2BJLpheSz0pwEr0Rmy5mC7myl17xs%3D' (2025-11-05)
• Updated input 'nvim-treesitter-main/nvim-treesitter':
    'github:nvim-treesitter/nvim-treesitter/98fe644cb3b5ba390d1bc3f89299f93c70020803?narHash=sha256-/SGikTPEMxI7rcfGvuJlNZs73/wZiQx14QX9xlfsTv0%3D' (2025-10-25)
  → 'github:nvim-treesitter/nvim-treesitter/d97d226cfd4c00af000b3b8529261352677fc6a8?narHash=sha256-hXs9TdytYtBeXW6nx9QZiQcqsuj1uLuZMf8kclaScQ8%3D' (2025-11-08)
• Updated input 'nvim-treesitter-main/nvim-treesitter-textobjects':
    'github:nvim-treesitter/nvim-treesitter-textobjects/1b2d85d3de6114c4bcea89ffb2cd1ce9e3a19931?narHash=sha256-%2BKmOpRi4JAqm6UqYdtk80jwFrJhLCs0lZM/Liofq0R4%3D' (2025-08-28)
  → 'github:nvim-treesitter/nvim-treesitter-textobjects/7024f8687b060dd9a425bde1fa8621c896a38138?narHash=sha256-gzeT2gtmFaXhRSC13mijH6tlk/eWRZaUrGiEpKoAorA%3D' (2025-11-08)
2025-11-09 10:13:55 -06:00
c8d9279372 combine diffs 2025-11-09 10:13:05 -06:00
a004f24728 jj file hist 2025-10-23 03:10:31 -05:00
10 changed files with 160 additions and 76 deletions

View file

@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
package_name: ["nvim-min"] package_name: ["nvim"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/nix-installer-action@main

View file

@ -5,7 +5,7 @@
## Usage ## Usage
Try it out! Try it out!
```bash ```bash
nix run "github:iofq/nvim.nix" #nvim-min nix run "github:iofq/nvim.nix" #nvim
``` ```
Or use in a flake: Or use in a flake:

54
flake.lock generated
View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1761202123, "lastModified": 1762016984,
"narHash": "sha256-ULrZW4b8SKRvPpJPt8/jkqqc/blQiIWUriNWVXA33so=", "narHash": "sha256-ADZ2b2Oz+MOSjdKKCcQX9KmlhtmvVlZFEJr0HigWsOY=",
"owner": "iofq", "owner": "iofq",
"repo": "dart.nvim", "repo": "dart.nvim",
"rev": "71421e7ef5aee8267e24dc562fdd07a83bda192e", "rev": "8822aabbfef95eda2b22a8f7ee08912c762ef941",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -61,11 +61,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1760948891, "lastModified": 1762980239,
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", "narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", "rev": "52a2caecc898d0b46b2b905f058ccc5081f842da",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -203,11 +203,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761955453, "lastModified": 1763078664,
"narHash": "sha256-hQomzSbBiFsDXDMCjHmWXrAMgFlQlCiy7T37Eq7RvT4=", "narHash": "sha256-HDuT9S50/3+2blDIL4Y5qX8g5bA5FtpzP9lyagmyNq4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "c58076a0d9b24bf77fef4fa2e7c43950914edf71", "rev": "994eb1828abe40f256e27ff38663b4f3f819d4cb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -219,11 +219,11 @@
"neovim-src": { "neovim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1761949631, "lastModified": 1763078375,
"narHash": "sha256-YgMQaFD4L9+PEYSkUlBkqaKt+ALPHiVgzgRbjOSW4tE=", "narHash": "sha256-oGwmSPl+FA0y2uPEGkkavr5sxLkpHR6+Cio8eZ8OtPo=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "1fddd74da7428e38b79ccb817dbd6952ff1d8ac6", "rev": "d017f3c9a0b745e0c57feb8c92dcc852948f7301",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -277,11 +277,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1761991861, "lastModified": 1763114379,
"narHash": "sha256-rccG7eGGelDsu4eXPi2vdBR1pddZFZAd/JlB3NLjgy4=", "narHash": "sha256-48vHwFWqC7oUMJqcq3xCB84FBHHjvO3rNL18si1IRvo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0e65d6bc462e57fe6a76a49d4eea909ba08b1dc1", "rev": "fa972b1d29bb165bebc538c227a6e57f33631789",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -293,11 +293,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1761114652, "lastModified": 1762363567,
"narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=", "narHash": "sha256-YRqMDEtSMbitIMj+JLpheSz0pwEr0Rmy5mC7myl17xs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c", "rev": "ae814fd3904b621d8ab97418f1d0f2eb0d3716f4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -310,11 +310,11 @@
"nvim-treesitter": { "nvim-treesitter": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1761385693, "lastModified": 1762599340,
"narHash": "sha256-/SGikTPEMxI7rcfGvuJlNZs73/wZiQx14QX9xlfsTv0=", "narHash": "sha256-hXs9TdytYtBeXW6nx9QZiQcqsuj1uLuZMf8kclaScQ8=",
"owner": "nvim-treesitter", "owner": "nvim-treesitter",
"repo": "nvim-treesitter", "repo": "nvim-treesitter",
"rev": "98fe644cb3b5ba390d1bc3f89299f93c70020803", "rev": "d97d226cfd4c00af000b3b8529261352677fc6a8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -331,11 +331,11 @@
"nvim-treesitter-textobjects": "nvim-treesitter-textobjects" "nvim-treesitter-textobjects": "nvim-treesitter-textobjects"
}, },
"locked": { "locked": {
"lastModified": 1761496664, "lastModified": 1762704339,
"narHash": "sha256-xTQUiJu0jJNSEHEv4La1HbaFokup0eWr67Kqf/wDENA=", "narHash": "sha256-hRGD+CE04Z1qAJAaiJs6o+blS0WUEqfVS/5cqA0NcDI=",
"owner": "iofq", "owner": "iofq",
"repo": "nvim-treesitter-main", "repo": "nvim-treesitter-main",
"rev": "834d66648bb7a96a2ad11d53a33f2d9b13766447", "rev": "69e9583fe72fa2dbffcb740563a9cc48396e3f75",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -347,11 +347,11 @@
"nvim-treesitter-textobjects": { "nvim-treesitter-textobjects": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1756368113, "lastModified": 1762622273,
"narHash": "sha256-+KmOpRi4JAqm6UqYdtk80jwFrJhLCs0lZM/Liofq0R4=", "narHash": "sha256-gzeT2gtmFaXhRSC13mijH6tlk/eWRZaUrGiEpKoAorA=",
"owner": "nvim-treesitter", "owner": "nvim-treesitter",
"repo": "nvim-treesitter-textobjects", "repo": "nvim-treesitter-textobjects",
"rev": "1b2d85d3de6114c4bcea89ffb2cd1ce9e3a19931", "rev": "7024f8687b060dd9a425bde1fa8621c896a38138",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -73,7 +73,6 @@
packages = rec { packages = rec {
default = nvim; default = nvim;
nvim = pkgs.nvim-pkg; nvim = pkgs.nvim-pkg;
nvim-min = pkgs.nvim-min-pkg;
}; };
devShells = { devShells = {
default = shell; default = shell;

1
new Normal file
View file

@ -0,0 +1 @@
print('kjsnadf')

View file

@ -17,41 +17,18 @@ let
nvim-treesitter nvim-treesitter
nvim-treesitter-textobjects nvim-treesitter-textobjects
quicker-nvim quicker-nvim
refactoring-nvim
render-markdown-nvim render-markdown-nvim
snacks-nvim snacks-nvim
]; ];
basePackages = with prev; [ packages = with prev; [
ripgrep ripgrep
fd fd
]; ];
# Extra packages that should be included on nixos but don't need to be bundled
extraPackages = with prev; [
# linters
yamllint
jq
hadolint
nixfmt
shellcheck
golangci-lint
# LSPs
gopls
lua-language-server
nixd
basedpyright
];
in in
{ {
nvim-pkg = mkNeovim { nvim-pkg = mkNeovim {
inherit plugins; inherit plugins packages;
packages = basePackages ++ extraPackages;
};
nvim-min-pkg = mkNeovim {
inherit plugins;
packages = basePackages;
}; };
nvim-luarc-json = final.mk-luarc-json { nvim-luarc-json = final.mk-luarc-json {

View file

@ -49,4 +49,58 @@ function M.status()
} }
end end
function M.file_history(filename)
local function preview(ctx)
if ctx.item.rev then
Snacks.picker.preview.cmd(
{ 'jj', 'log', '--ignore-working-copy', '--git', '-r', ctx.item.rev, '-p', filename },
ctx
)
else
ctx.preview:reset()
return 'No preview available.'
end
end
local function confirm(picker, item)
picker:close()
local cmd = string.format('jj show --git -r %s', item.rev)
local out = vim.fn.systemlist(cmd)
local bufnr = vim.api.nvim_create_buf(false, true)
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, out)
vim.bo[bufnr].bufhidden = 'wipe'
vim.bo[bufnr].buftype = 'nofile'
vim.bo[bufnr].filetype = 'diff'
vim.keymap.set('n', 'q', vim.cmd.bdelete, { buffer = bufnr, noremap = true })
vim.api.nvim_set_current_buf(bufnr)
end
local function get_history(f)
local status_raw = vim.fn.system(
'jj log --ignore-working-copy --no-graph'
.. ' --template \'if(root, format_root_commit(self), label(if(current_working_copy, "working_copy"), concat(separate(" ", self.change_id().shortest(8), self.bookmarks()), " | ", if(empty, label("empty", "(empty)")), if(description, description.first_line(), label(if(empty, "empty"), description_placeholder),),) ++ "\n",),)\''
.. ' -- '
.. f
)
local lines = {}
for line in status_raw:gmatch('[^\r\n]+') do
local rev = string.match(line, '(%w+)%s.*')
table.insert(lines, {
text = line,
rev = rev,
})
end
return lines
end
Snacks.picker.pick {
format = 'text',
title = 'jj file history for ' .. filename,
items = get_history(filename),
preview = preview,
confirm = confirm,
}
end
return M return M

View file

@ -30,7 +30,7 @@ cmd({ 'FocusGained', 'TermClose', 'TermLeave' }, {
}) })
-- Configure difftool buffers -- Configure difftool buffers
vim.api.nvim_create_autocmd('FileType', { cmd('FileType', {
pattern = 'qf', pattern = 'qf',
group = vim.api.nvim_create_augroup('difftool', { clear = true }), group = vim.api.nvim_create_augroup('difftool', { clear = true }),
callback = function(event) callback = function(event)
@ -41,14 +41,14 @@ vim.api.nvim_create_autocmd('FileType', {
local qf = vim.fn.getqflist() local qf = vim.fn.getqflist()
local entry = qf[1] local entry = qf[1]
if not entry or not entry.user_data.diff then if not entry or not entry.user_data or not entry.user_data.diff then
return nil return nil
end end
local ns = vim.api.nvim_create_namespace('nvim.difftool.hl') local ns = vim.api.nvim_create_namespace('nvim.difftool.hl')
vim.api.nvim_buf_clear_namespace(event.buf, ns, 0, -1) vim.api.nvim_buf_clear_namespace(event.buf, ns, 0, -1)
for i, item in ipairs(qf) do for i, item in ipairs(qf) do
local path = vim.fn.fnamemodify(item.user_data.right, ':t') local path = vim.fn.fnamemodify(item.user_data.right, ':.')
local hl = 'Added' local hl = 'Added'
if if
exec('git diff --quiet -- %s', path) ~= 0 exec('git diff --quiet -- %s', path) ~= 0
@ -75,6 +75,71 @@ vim.api.nvim_create_autocmd('FileType', {
end, end,
}) })
-- open conflicts in qflist
cmd('BufWinEnter', {
callback = function(event)
if not vim.wo.diff then
return
end
local items = {}
while true do
local found = vim.fn.search('^<<<<<<<', 'W')
if found == 0 then
break
end
local line = vim.api.nvim_buf_get_lines(event.buf, found - 1, found, false)[1]
table.insert(items, { bufnr = event.buf, lnum = found, text = line })
end
if #items > 1 then
vim.fn.setqflist(items, 'r')
vim.schedule(function()
vim.cmd(string.format('%dcopen', math.min(10, #items)))
end)
end
local function get_hunks(bufnr)
local conf_start = vim.fn.search('^<<<<<<<', 'bc')
local base_start = vim.fn.search('^|||||||', 'W')
local base_end = vim.fn.search('^=======', 'W')
local conf_end = vim.fn.search('^>>>>>>>', 'W')
local left = vim.api.nvim_buf_get_lines(bufnr, conf_start, base_start - 1, false)
local right = vim.api.nvim_buf_get_lines(bufnr, base_end, conf_end - 1, false)
return {
start = conf_start,
stop = conf_end,
left = left,
right = right,
}
end
local function apply_hunk(hunks, first)
local result = {}
if first == -1 then -- left first
vim.list_extend(result, hunks.left)
vim.list_extend(result, hunks.right)
else
vim.list_extend(result, hunks.right)
vim.list_extend(result, hunks.left)
end
-- apply hunk in place
vim.api.nvim_buf_set_lines(0, hunks.start - 1, hunks.stop, false, result)
end
-- "combine" mappings ala vscode's merge editor
vim.keymap.set('n', '<leader>dl', function()
apply_hunk(get_hunks(event.buf), -1)
end, { buffer = event.buf })
vim.keymap.set('n', '<leader>dr', function()
apply_hunk(get_hunks(event.buf), 1)
end, { buffer = event.buf })
end,
})
-- Init treesitter -- Init treesitter
cmd('FileType', { cmd('FileType', {
group = vim.api.nvim_create_augroup('treesitter', { clear = true }), group = vim.api.nvim_create_augroup('treesitter', { clear = true }),

View file

@ -18,9 +18,7 @@ vim.schedule(function()
require('mini.git').setup() require('mini.git').setup()
map('n', '<leader>gb', '<Cmd>Git blame -- %<CR>') map('n', '<leader>gb', '<Cmd>Git blame -- %<CR>')
map('n', '<leader>go', function() map('n', '<leader>go', MiniGit.show_at_cursor)
return MiniGit.show_at_cursor()
end)
local jump = require('mini.jump2d') local jump = require('mini.jump2d')
jump.setup { jump.setup {

View file

@ -3,12 +3,7 @@ local map = vim.keymap.set
require('mini.basics').setup { mappings = { windows = true } } require('mini.basics').setup { mappings = { windows = true } }
require('mini.icons').setup() require('mini.icons').setup()
require('dart').setup { require('dart').setup {}
tabline = {
icons = false,
label_marked_fg = 'cyan',
},
}
require('snacks').setup { require('snacks').setup {
bigfile = { enabled = true }, bigfile = { enabled = true },
@ -56,19 +51,15 @@ map('n', '<leader>f.', Snacks.picker.resume)
map('n', '<leader>fb', Snacks.picker.buffers) map('n', '<leader>fb', Snacks.picker.buffers)
map('n', '<leader>fq', Snacks.picker.qflist) map('n', '<leader>fq', Snacks.picker.qflist)
map('n', '<leader>jf', require('iofq.snacks_jj').status) map('n', '<leader>jf', require('iofq.snacks_jj').status)
map('n', '<leader>jh', function()
require('iofq.snacks_jj').file_history(vim.api.nvim_buf_get_name(0))
end)
vim.schedule(function() vim.schedule(function()
require('nvim-treesitter').setup() require('nvim-treesitter').setup()
require('nvim-treesitter-textobjects').setup() require('nvim-treesitter-textobjects').setup()
require('render-markdown').setup()
require('nvim-autopairs').setup() require('nvim-autopairs').setup()
require('refactoring').setup()
map('n', '<leader>rr', require('refactoring').select_refactor)
map('n', '<leader>rv', function()
require('refactoring').refactor('Inline Variable')
end)
require('quicker').setup() require('quicker').setup()
map('n', '<leader>qf', function() map('n', '<leader>qf', function()
require('quicker').toggle { max_height = 20 } require('quicker').toggle { max_height = 20 }
@ -80,7 +71,6 @@ vim.schedule(function()
json = { 'jq' }, json = { 'jq' },
lua = { 'stylua' }, lua = { 'stylua' },
python = { 'ruff' }, python = { 'ruff' },
nix = { 'nixfmt' },
fish = { 'fish_indent' }, fish = { 'fish_indent' },
['*'] = { 'trim_whitespace' }, ['*'] = { 'trim_whitespace' },
}, },
@ -126,7 +116,7 @@ vim.schedule(function()
sources = { sources = {
default = { 'lsp', 'path', 'snippets', 'ripgrep', 'buffer' }, default = { 'lsp', 'path', 'snippets', 'ripgrep', 'buffer' },
providers = { providers = {
lsp = { fallbacks = {} }, -- include buffer even when LSP is active lsp = { fallbacks = {}, async = true }, -- include buffer even when LSP is active
path = { opts = { get_cwd = vim.fn.getcwd } }, -- use nvim pwd instead of current file pwd path = { opts = { get_cwd = vim.fn.getcwd } }, -- use nvim pwd instead of current file pwd
ripgrep = { ripgrep = {
module = 'blink-ripgrep', module = 'blink-ripgrep',