Compare commits

...

4 commits

9 changed files with 87 additions and 15 deletions

View file

@ -51,6 +51,8 @@ with final.pkgs.lib; let
# Editor # Editor
neo-tree-nvim neo-tree-nvim
grug-far-nvim
flash-nvim
]; ];
extraPackages = with pkgs; [ extraPackages = with pkgs; [

View file

@ -1,11 +0,0 @@
local M = {}
---@param prefix string The string to prefix to all req calls.
function M.localRequire(prefix)
---@param mod string The module to require.
return function(mod)
return require(prefix .. '.' .. mod)
end
end
return M

View file

@ -1,4 +1,4 @@
local req = require('lib.marleyvim').localRequire('plugins.colorscheme') local req = MarleyVim.local_require('plugins.colorscheme')
return { return {
req('rose-pine'), req('rose-pine'),

View file

@ -0,0 +1,47 @@
return {
'flash.nvim',
event = 'DeferredUIEnter',
keys = {
{
's',
function()
require('flash').jump()
end,
mode = { 'n', 'x', 'o' },
desc = 'Flash',
},
{
'S',
function()
require('flash').treesitter()
end,
mode = { 'n', 'x', 'o' },
desc = 'Flash (treesitter)',
},
{
'r',
function()
require('flash').remote()
end,
desc = 'Remote flash',
},
{
'R',
function()
require('flash').treesitter_search()
end,
mode = { 'x', 'o' },
desc = 'Treesitter search',
},
{
'<C-s>',
function()
require('flash').toggle()
end,
'Toggle flash search',
},
},
after = function()
require('flash').setup({})
end,
}

View file

@ -0,0 +1,25 @@
return {
'grug-far.nvim',
cmd = 'GrugFar',
keys = {
{
'<LEADER>sr',
function()
local grug = require('grug-far')
local ext = vim.bo.buftype == '' and vim.fn.expand('%:e')
grug.open({
transient = true,
prefills = {
filesFilter = ext and ext ~= '' and '*.' .. ext or nil,
},
})
end,
mode = { 'n', 'v' },
desc = 'Search and replace',
},
},
after = function()
require('grug-far').setup({ headerMaxWidth = 80 })
end,
}

View file

@ -1,5 +1,7 @@
local req = require('lib.marleyvim').localRequire('plugins.editor') local req = MarleyVim.local_require('plugins.editor')
return { return {
req('flash-nvim'),
req('grug-far-nvim'),
req('neo-tree-nvim'), req('neo-tree-nvim'),
} }

View file

@ -1,4 +1,4 @@
local req = require('lib.marleyvim').localRequire('plugins.ui') local req = MarleyVim.local_require('plugins.ui')
return { return {
req('alpha-nvim'), req('alpha-nvim'),

View file

@ -1,4 +1,4 @@
local req = require('lib.marleyvim').localRequire('plugins.util') local req = MarleyVim.local_require('plugins.util')
return { return {
req('nui-nvim'), req('nui-nvim'),

View file

@ -0,0 +1,7 @@
;; extends
((identifier) @namespace.builtin
(#eq? @namespace.builtin "vim"))
((identifier) @namespace.builtin
(#eq? @namespace.builtin "MarleyVim"))