mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
tweaks including aerial, cd in mini.files
This commit is contained in:
parent
6d8480b8b5
commit
6831ace589
10 changed files with 48 additions and 113 deletions
34
flake.lock
generated
34
flake.lock
generated
|
|
@ -181,48 +181,14 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nvim-early-retirement": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1723897376,
|
|
||||||
"narHash": "sha256-+W3AG99nzgr36t9Sg192hb/MH8s0uGAPD0cLBnil+og=",
|
|
||||||
"owner": "chrisgrieser",
|
|
||||||
"repo": "nvim-early-retirement",
|
|
||||||
"rev": "2c36a5671b9d8f0d9e11b77c5a55de802bc45e34",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "chrisgrieser",
|
|
||||||
"repo": "nvim-early-retirement",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"gen-luarc": "gen-luarc",
|
"gen-luarc": "gen-luarc",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nvim-early-retirement": "nvim-early-retirement",
|
|
||||||
"snipe-nvim": "snipe-nvim",
|
|
||||||
"workspace-diagnostics-nvim": "workspace-diagnostics-nvim"
|
"workspace-diagnostics-nvim": "workspace-diagnostics-nvim"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"snipe-nvim": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1722790509,
|
|
||||||
"narHash": "sha256-DhJ2ss0p64mpaVo9rri72pEoaWbOOL05klM9AydnqJk=",
|
|
||||||
"owner": "leath-dub",
|
|
||||||
"repo": "snipe.nvim",
|
|
||||||
"rev": "854a47c970413405361487c13e2b1e9aa9a3696e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "leath-dub",
|
|
||||||
"repo": "snipe.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,6 @@
|
||||||
url = "github:mrcjkb/nix-gen-luarc-json";
|
url = "github:mrcjkb/nix-gen-luarc-json";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
snipe-nvim = {
|
|
||||||
url = "github:leath-dub/snipe.nvim";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
nvim-early-retirement = {
|
|
||||||
url = "github:chrisgrieser/nvim-early-retirement";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
workspace-diagnostics-nvim = {
|
workspace-diagnostics-nvim = {
|
||||||
url = "github:artemave/workspace-diagnostics.nvim";
|
url = "github:artemave/workspace-diagnostics.nvim";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,12 @@ with final.pkgs.lib; let
|
||||||
inherit pname src;
|
inherit pname src;
|
||||||
version = src.lastModifiedDate;
|
version = src.lastModifiedDate;
|
||||||
};
|
};
|
||||||
snipe-nvim = mkNvimPlugin inputs.snipe-nvim "snipe-nvim";
|
|
||||||
nvim-early-retirement = mkNvimPlugin inputs.nvim-early-retirement "nvim-early-retirement";
|
|
||||||
workspace-diagnostics-nvim = mkNvimPlugin inputs.workspace-diagnostics-nvim "workspace-diagnostics-nvim";
|
workspace-diagnostics-nvim = mkNvimPlugin inputs.workspace-diagnostics-nvim "workspace-diagnostics-nvim";
|
||||||
|
|
||||||
mkNeovim = pkgs.callPackage ./mkNeovim.nix { inherit pkgs-wrapNeovim; };
|
mkNeovim = pkgs.callPackage ./mkNeovim.nix { inherit pkgs-wrapNeovim; };
|
||||||
|
|
||||||
all-plugins = with pkgs.vimPlugins; [
|
all-plugins = with pkgs.vimPlugins; [
|
||||||
|
aerial-nvim
|
||||||
cmp-buffer
|
cmp-buffer
|
||||||
cmp-cmdline
|
cmp-cmdline
|
||||||
cmp-nvim-lsp
|
cmp-nvim-lsp
|
||||||
|
|
@ -40,7 +39,6 @@ with final.pkgs.lib; let
|
||||||
nvim-dap
|
nvim-dap
|
||||||
nvim-dap-go
|
nvim-dap-go
|
||||||
nvim-dap-ui
|
nvim-dap-ui
|
||||||
nvim-early-retirement
|
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
nvim-nio
|
nvim-nio
|
||||||
nvim-treesitter-context
|
nvim-treesitter-context
|
||||||
|
|
@ -72,9 +70,7 @@ with final.pkgs.lib; let
|
||||||
tree-sitter-typescript
|
tree-sitter-typescript
|
||||||
tree-sitter-yaml
|
tree-sitter-yaml
|
||||||
]))
|
]))
|
||||||
outline-nvim
|
|
||||||
scope-nvim
|
scope-nvim
|
||||||
snipe-nvim
|
|
||||||
telescope-fzf-native-nvim
|
telescope-fzf-native-nvim
|
||||||
telescope-nvim
|
telescope-nvim
|
||||||
toggleterm-nvim
|
toggleterm-nvim
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,21 @@
|
||||||
vim.opt.backspace = 'indent,eol,start'
|
vim.opt.backspace = 'indent,eol,start'
|
||||||
vim.opt.clipboard = 'unnamedplus'
|
vim.opt.clipboard = 'unnamedplus'
|
||||||
vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
|
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||||
vim.opt.expandtab = true -- insert tabs as spaces
|
vim.opt.expandtab = true -- insert tabs as spaces
|
||||||
vim.opt.inccommand = 'split' -- incremental live completion
|
vim.opt.inccommand = 'split' -- incremental live completion
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
vim.opt.nrformats:append('alpha') -- let Ctrl-a do letters as well
|
vim.opt.nrformats:append('alpha') -- let Ctrl-a do letters as well
|
||||||
vim.opt.path:append('**') -- enable fuzzy :find ing
|
vim.opt.path:append('**') -- enable fuzzy :find ing
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
vim.opt.shadafile = 'NONE' -- disable shada
|
vim.opt.shadafile = 'NONE' -- disable shada
|
||||||
vim.opt.shiftwidth = 0 -- >> shifts by tabstop
|
vim.opt.shiftwidth = 0 -- >> shifts by tabstop
|
||||||
vim.opt.showmatch = true -- highlight matching brackets
|
vim.opt.showmatch = true -- highlight matching brackets
|
||||||
vim.opt.showmode = false
|
|
||||||
vim.opt.signcolumn = 'no'
|
vim.opt.signcolumn = 'no'
|
||||||
vim.opt.spell = false
|
vim.opt.softtabstop = -1 -- backspace removes tabstop
|
||||||
vim.opt.softtabstop = -1 -- backspace removes tabstop
|
|
||||||
vim.opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
vim.opt.tabstop = 2 -- 2 space tabs are based
|
vim.opt.tabstop = 2 -- 2 space tabs are based
|
||||||
vim.opt.updatetime = 250 -- decrease update time
|
vim.opt.updatetime = 250 -- decrease update time
|
||||||
vim.opt.virtualedit = 'onemore'
|
vim.opt.virtualedit = 'onemore'
|
||||||
vim.opt.wrap = true
|
|
||||||
vim.g.fzf_layout = { window = { width = 0.9, height = 0.6 } }
|
|
||||||
|
|
||||||
-- Switch tab length on the fly
|
-- Switch tab length on the fly
|
||||||
vim.keymap.set('n', '\\t', function()
|
vim.keymap.set('n', '\\t', function()
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp', keyword_length = 1 },
|
{ name = 'nvim_lsp', keyword_length = 1 },
|
||||||
{ name = 'luasnip' },
|
{ name = 'luasnip' },
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ return {
|
||||||
ui.toggle()
|
ui.toggle()
|
||||||
end, { desc = 'toggle dapui' })
|
end, { desc = 'toggle dapui' })
|
||||||
vim.keymap.set('n', '<leader>zz', function()
|
vim.keymap.set('n', '<leader>zz', function()
|
||||||
scopes = w.sidebar(w.scopes, {}, 'split')
|
|
||||||
d.continue()
|
d.continue()
|
||||||
end, { desc = 'start debugger' })
|
end, { desc = 'start debugger' })
|
||||||
vim.keymap.set('n', '<leader>zn', function()
|
vim.keymap.set('n', '<leader>zn', function()
|
||||||
|
|
@ -53,9 +52,6 @@ return {
|
||||||
local widgets = require('dap.ui.widgets')
|
local widgets = require('dap.ui.widgets')
|
||||||
widgets.centered_float(widgets.frames)
|
widgets.centered_float(widgets.frames)
|
||||||
end, { desc = 'view frames' })
|
end, { desc = 'view frames' })
|
||||||
vim.keymap.set('n', '<leader>zs', function()
|
|
||||||
scopes.toggle()
|
|
||||||
end, { desc = 'toggle scope view' })
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ return {
|
||||||
event = 'VeryLazy',
|
event = 'VeryLazy',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'artemave/workspace-diagnostics.nvim',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
|
|
@ -133,12 +134,6 @@ return {
|
||||||
'<cmd>Telescope lsp_references<cr>',
|
'<cmd>Telescope lsp_references<cr>',
|
||||||
{ buffer = ev.buf, noremap = true, silent = true, desc = 'LSP references' }
|
{ buffer = ev.buf, noremap = true, silent = true, desc = 'LSP references' }
|
||||||
)
|
)
|
||||||
vim.keymap.set(
|
|
||||||
'n',
|
|
||||||
'<leader>dt',
|
|
||||||
'<cmd>Telescope lsp_type_definitions<cr>',
|
|
||||||
{ buffer = ev.buf, noremap = true, silent = true, desc = 'LSP type defs' }
|
|
||||||
)
|
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
'n',
|
'n',
|
||||||
'<leader>ds',
|
'<leader>ds',
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,9 @@ return {
|
||||||
{ mode = 'n', keys = '<C-w>' },
|
{ mode = 'n', keys = '<C-w>' },
|
||||||
{ mode = 'n', keys = 'z' },
|
{ mode = 'n', keys = 'z' },
|
||||||
},
|
},
|
||||||
|
window = {
|
||||||
|
config = { width = 'auto', },
|
||||||
|
},
|
||||||
clues = {
|
clues = {
|
||||||
miniclue.gen_clues.g(),
|
miniclue.gen_clues.g(),
|
||||||
miniclue.gen_clues.marks(),
|
miniclue.gen_clues.marks(),
|
||||||
|
|
@ -110,11 +112,11 @@ return {
|
||||||
local files = require("mini.files")
|
local files = require("mini.files")
|
||||||
files.setup {
|
files.setup {
|
||||||
mappings = {
|
mappings = {
|
||||||
synchronize = "w",
|
|
||||||
go_in_plus = "<CR>"
|
go_in_plus = "<CR>"
|
||||||
},
|
},
|
||||||
windows = {
|
windows = {
|
||||||
preview = true,
|
preview = true,
|
||||||
|
width_focus = 30,
|
||||||
width_preview = 50,
|
width_preview = 50,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -133,6 +135,21 @@ return {
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "MiniFilesBufferCreate",
|
||||||
|
callback = function(args)
|
||||||
|
vim.keymap.set(
|
||||||
|
"n",
|
||||||
|
"`",
|
||||||
|
function()
|
||||||
|
local cur_entry_path = MiniFiles.get_fs_entry().path
|
||||||
|
local cur_directory = vim.fs.dirname(cur_entry_path)
|
||||||
|
vim.fn.chdir(cur_directory)
|
||||||
|
end,
|
||||||
|
{ buffer = args.data.buf_id }
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
})
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ return {
|
||||||
'akinsho/toggleterm.nvim',
|
'akinsho/toggleterm.nvim',
|
||||||
event = 'VeryLazy',
|
event = 'VeryLazy',
|
||||||
opts = {
|
opts = {
|
||||||
open_mapping = [[<C-\>]],
|
|
||||||
direction = 'float',
|
direction = 'float',
|
||||||
close_on_exit = true,
|
close_on_exit = true,
|
||||||
autochdir = true,
|
autochdir = true,
|
||||||
|
|
@ -35,28 +34,6 @@ return {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 'tiagovla/scope.nvim', event = 'VeryLazy', config = true },
|
{ 'tiagovla/scope.nvim', event = 'VeryLazy', config = true },
|
||||||
{
|
|
||||||
'chrisgrieser/nvim-early-retirement',
|
|
||||||
event = 'VeryLazy',
|
|
||||||
opts = { minimumBufferNum = 10 },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'leath-dub/snipe.nvim',
|
|
||||||
event = 'VeryLazy',
|
|
||||||
opts = {
|
|
||||||
sort = 'last',
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
local snipe = require('snipe')
|
|
||||||
snipe.setup(opts)
|
|
||||||
vim.keymap.set(
|
|
||||||
'n',
|
|
||||||
'<leader>fb',
|
|
||||||
snipe.open_buffer_menu,
|
|
||||||
{ noremap = true, silent = true, desc = 'Pick buffers (snipe.nvim)' }
|
|
||||||
)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'sindrets/diffview.nvim',
|
'sindrets/diffview.nvim',
|
||||||
event = 'VeryLazy',
|
event = 'VeryLazy',
|
||||||
|
|
@ -149,6 +126,7 @@ return {
|
||||||
local gs = package.loaded.gitsigns
|
local gs = package.loaded.gitsigns
|
||||||
vim.keymap.set('n', '<leader>gg', gs.preview_hunk, { desc = 'git preview hunk' })
|
vim.keymap.set('n', '<leader>gg', gs.preview_hunk, { desc = 'git preview hunk' })
|
||||||
vim.keymap.set('n', '<leader>gr', gs.reset_hunk, { desc = 'git reset hunk' })
|
vim.keymap.set('n', '<leader>gr', gs.reset_hunk, { desc = 'git reset hunk' })
|
||||||
|
vim.keymap.set('n', '<leader>gs', gs.stage_hunk, { desc = 'git stage hunk' })
|
||||||
vim.keymap.set('n', '<leader>gd', gs.diffthis, { desc = 'git diff hunk' })
|
vim.keymap.set('n', '<leader>gd', gs.diffthis, { desc = 'git diff hunk' })
|
||||||
vim.keymap.set('n', '<leader>gb', function()
|
vim.keymap.set('n', '<leader>gb', function()
|
||||||
gs.blame_line { full = true }
|
gs.blame_line { full = true }
|
||||||
|
|
@ -164,7 +142,7 @@ return {
|
||||||
return ']c'
|
return ']c'
|
||||||
end
|
end
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
gs.next_hunk()
|
gs.next_hunk({ target = 'all' })
|
||||||
end)
|
end)
|
||||||
return '<Ignore>'
|
return '<Ignore>'
|
||||||
end, { expr = true })
|
end, { expr = true })
|
||||||
|
|
@ -174,7 +152,7 @@ return {
|
||||||
return '[c'
|
return '[c'
|
||||||
end
|
end
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
gs.prev_hunk()
|
gs.prev_hunk({ target = 'all' })
|
||||||
end)
|
end)
|
||||||
return '<Ignore>'
|
return '<Ignore>'
|
||||||
end, { expr = true })
|
end, { expr = true })
|
||||||
|
|
@ -182,17 +160,22 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'hedyhli/outline.nvim',
|
'stevearc/aerial.nvim',
|
||||||
cmd = { 'Outline', 'OutlineOpen' },
|
cmd = { 'AerialToggle' },
|
||||||
keys = {
|
keys = {
|
||||||
{ '<leader>no', '<cmd>Outline<CR>', desc = 'Toggle outline' },
|
{ '<leader>na', '<cmd>AerialToggle<CR>', desc = 'Toggle aerial' },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
outline_window = {
|
backends = {
|
||||||
position = 'left',
|
"lsp",
|
||||||
width = 30,
|
"treesitter",
|
||||||
auto_close = true,
|
"markdown"
|
||||||
},
|
},
|
||||||
|
filter_kind = false,
|
||||||
|
layout = {
|
||||||
|
default_direction = "left",
|
||||||
|
},
|
||||||
|
autojump = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ return {
|
||||||
storage = "memory",
|
storage = "memory",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.keymap.set({"n","x"}, "y", "<Plug>(YankyYank)")
|
vim.keymap.set({ "n", "x" }, "y", "<Plug>(YankyYank)")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -93,12 +93,6 @@ return {
|
||||||
b.find_files,
|
b.find_files,
|
||||||
{ noremap = true, silent = true, desc = 'Fuzzy find files' }
|
{ noremap = true, silent = true, desc = 'Fuzzy find files' }
|
||||||
)
|
)
|
||||||
vim.keymap.set(
|
|
||||||
'n',
|
|
||||||
'<leader>fc',
|
|
||||||
b.command_history,
|
|
||||||
{ noremap = true, silent = true, desc = 'Fuzzy find command_history' }
|
|
||||||
)
|
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
'n',
|
'n',
|
||||||
'<leader>fa',
|
'<leader>fa',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue