telescope, no more ctrl-p
This commit is contained in:
parent
6cc9be20ff
commit
4611552b15
4 changed files with 74 additions and 37 deletions
12
nix/home-manager/flake.lock
generated
12
nix/home-manager/flake.lock
generated
|
@ -118,11 +118,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1692131549,
|
||||
"narHash": "sha256-MFjI8NL63/6HjMZpvJgnB/Pgg2dht22t45jOYtipZig=",
|
||||
"lastModified": 1692260837,
|
||||
"narHash": "sha256-2FpkX1zl+7ni7djK7NeE1ZGupRUwZgjW+RPCSBgDf4k=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "75cfe974e2ca05a61b66768674032b4c079e55d4",
|
||||
"rev": "6a94c1a59737783c282c4031555a289c28b961e4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -333,11 +333,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1692084312,
|
||||
"narHash": "sha256-Za++qKVK6ovjNL9poQZtLKRM/re663pxzbJ+9M4Pgwg=",
|
||||
"lastModified": 1692174805,
|
||||
"narHash": "sha256-xmNPFDi/AUMIxwgOH/IVom55Dks34u1g7sFKKebxUm0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8353344d3236d3fda429bb471c1ee008857d3b7c",
|
||||
"rev": "caac0eb6bdcad0b32cb2522e03e4002c8975c62e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
onedark.enable = true;
|
||||
};
|
||||
plugins = {
|
||||
fugitive = {
|
||||
enable = true;
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
|
@ -26,6 +29,33 @@
|
|||
rust-analyzer.enable = true;
|
||||
};
|
||||
};
|
||||
mini = {
|
||||
enable = true;
|
||||
ai.enable = true;
|
||||
align.enable = true;
|
||||
animate.enable = true;
|
||||
comment.enable = true;
|
||||
completion.enable = true;
|
||||
indentscope.enable = true;
|
||||
jump.enable = true;
|
||||
jump2d = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
mappings.start_jumping = "<leader>a";
|
||||
};
|
||||
};
|
||||
splitjoin.enable = true;
|
||||
surround.enable = true;
|
||||
};
|
||||
project-nvim = {
|
||||
enable = true;
|
||||
};
|
||||
telescope = {
|
||||
enable = true;
|
||||
extraLua = {
|
||||
post = builtins.readFile ./neovim/telescope.lua;
|
||||
};
|
||||
};
|
||||
treesitter = {
|
||||
enable = true;
|
||||
indent = true;
|
||||
|
@ -34,46 +64,32 @@
|
|||
enable = true;
|
||||
};
|
||||
};
|
||||
mini = {
|
||||
enable = true;
|
||||
ai.enable = true;
|
||||
align.enable = true;
|
||||
animate.enable = true;
|
||||
comment.enable = true;
|
||||
jump.enable = true;
|
||||
jump2d = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
mappings.start_jumping = "<leader>a";
|
||||
};
|
||||
};
|
||||
surround.enable = true;
|
||||
};
|
||||
fugitive = {
|
||||
enable = true;
|
||||
};
|
||||
undotree = {
|
||||
enable = true;
|
||||
};
|
||||
which-key = {
|
||||
enable = true;
|
||||
groups = {
|
||||
normal = {
|
||||
"<leader>f" = "Telescope - Find";
|
||||
"<leader>r" = "View registers";
|
||||
"<leader>p" = "Telescope - LSP";
|
||||
};
|
||||
};
|
||||
project-nvim = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
extraPlugins =
|
||||
(
|
||||
with pkgs.vimPlugins; [
|
||||
vim-ReplaceWithRegister
|
||||
ctrlp-vim
|
||||
vim-dispatch-neovim
|
||||
vim-bbye
|
||||
editorconfig-nvim
|
||||
leap-nvim
|
||||
telescope-zf-native-nvim
|
||||
vim-ReplaceWithRegister
|
||||
vim-bbye
|
||||
vim-dispatch-neovim
|
||||
vim-expand-region
|
||||
vim-signify
|
||||
vim-terraform
|
||||
leap-nvim
|
||||
]
|
||||
)
|
||||
++ (with pkgs.vimExtraPlugins; [
|
||||
|
@ -83,18 +99,23 @@
|
|||
normal = {
|
||||
"<leader>u" = {
|
||||
action = "vim.cmd.UndotreeToggle";
|
||||
desc = "Toggle undotree";
|
||||
};
|
||||
"<leader>h" = {
|
||||
action = "function() vim.api.nvim_command('wincmd h') end";
|
||||
desc = "Cursor - Window left";
|
||||
};
|
||||
"<leader>j" = {
|
||||
action = "function() vim.api.nvim_command('wincmd j') end";
|
||||
desc = "Cursor - Window down";
|
||||
};
|
||||
"<leader>k" = {
|
||||
action = "function() vim.api.nvim_command('wincmd k') end";
|
||||
desc = "Cursor - Window up";
|
||||
};
|
||||
"<leader>l" = {
|
||||
action = "function() vim.api.nvim_command('wincmd l') end";
|
||||
desc = "Cursor - Window right";
|
||||
};
|
||||
"<c-k>" = {
|
||||
action = "'<c-u>'";
|
||||
|
@ -104,6 +125,7 @@
|
|||
};
|
||||
"<leader>n" = {
|
||||
action = "function() vim.api.nvim_command('nohl') end";
|
||||
desc = "nohl";
|
||||
};
|
||||
};
|
||||
visual = {
|
||||
|
|
|
@ -27,8 +27,3 @@ vim.o.wildmode = "list:longest,full"
|
|||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
callback = function() vim.highlight.on_yank() end
|
||||
})
|
||||
|
||||
-- Ctrlp
|
||||
vim.g.ctrlp_map = "<leader>p"
|
||||
vim.g.ctrlp_cmd = "CtrlPMixed"
|
||||
vim.g.ctrlp_user_command = "rg --files %s"
|
||||
|
|
20
nix/home-manager/modules/packages/neovim/telescope.lua
Normal file
20
nix/home-manager/modules/packages/neovim/telescope.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
require("telescope").load_extension("zf-native")
|
||||
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
-- greps
|
||||
vim.keymap.set("n", '<leader>ff', builtin.find_files, {desc = 'Find Files'})
|
||||
vim.keymap.set("n", '<leader>fg', builtin.live_grep, {desc = 'Live Grep'})
|
||||
vim.keymap.set("n", '<leader>fb', builtin.buffers, {desc = 'Buffers'})
|
||||
|
||||
-- register reading
|
||||
vim.keymap.set("n", '<leader>r', builtin.registers, {desc = 'View registers'})
|
||||
|
||||
-- lsp stuff
|
||||
vim.keymap.set('n', '<leader>pr', builtin.lsp_references, {desc = 'References'})
|
||||
vim.keymap.set('n', '<leader>pi', builtin.lsp_implementations, {desc = 'Implementations'})
|
||||
vim.keymap.set('n', '<leader>pd', builtin.lsp_definitions, {desc = 'Definitions'})
|
||||
vim.keymap.set('n', '<leader>ps', builtin.lsp_document_symbols, {desc = 'Document Symbols'})
|
||||
vim.keymap.set('n', '<leader>pws', builtin.lsp_workspace_symbols, {desc = 'Workspace Symbols'})
|
||||
vim.keymap.set('n', '<leader>pwd', builtin.lsp_dynamic_workspace_symbols, {desc = 'Dynamic Workspace Symbols'})
|
||||
|
Loading…
Add table
Reference in a new issue