initial commit: moved out of nix repository
This commit is contained in:
commit
f4ea68f9fa
19 changed files with 804 additions and 0 deletions
82
config/telescope.nix
Normal file
82
config/telescope.nix
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
extensions.file-browser = {
|
||||
enable = true;
|
||||
# explanation: see :help expand
|
||||
# % is current file path, :p is full, :h is head (last component removed)
|
||||
settings.cwd.__raw = "'%:p:h'";
|
||||
};
|
||||
settings.defaults.mappings = {
|
||||
i = {
|
||||
# close telescope when escape pressed in insert mode
|
||||
"<esc>" = "close";
|
||||
};
|
||||
};
|
||||
keymaps = {
|
||||
# files
|
||||
"<leader><space>" = {
|
||||
action = "find_files";
|
||||
options = {
|
||||
desc = "Find files in current directory";
|
||||
};
|
||||
};
|
||||
"<leader>ff" = {
|
||||
action = "file_browser";
|
||||
options = {
|
||||
desc = "Find files in current directory";
|
||||
};
|
||||
};
|
||||
"<leader>fr" = {
|
||||
action = "oldfiles";
|
||||
options = {
|
||||
desc = "Recent files";
|
||||
};
|
||||
};
|
||||
|
||||
# search
|
||||
"<leader>/" = {
|
||||
action = "live_grep";
|
||||
options = {
|
||||
desc = "Grep (root dir)";
|
||||
};
|
||||
};
|
||||
|
||||
# buffers
|
||||
"<leader>b" = {
|
||||
action = "buffers";
|
||||
options = {
|
||||
desc = "Buffer list";
|
||||
};
|
||||
};
|
||||
|
||||
# lsp
|
||||
"<leader>sD" = {
|
||||
action = "diagnostics";
|
||||
options = {
|
||||
desc = "Workspace diagnostics";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
extraPlugins = [
|
||||
# frecency ranking
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "telescope-all-recent";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "prochri";
|
||||
repo = "telescope-all-recent.nvim";
|
||||
rev = "267e9e5fd13a6e9a4cc6ffe00452d446d040401d";
|
||||
hash = "sha256-EYU7HazKcABAGnJ3iqGqM2n+XTo64L1uqoopL/XuLFg=";
|
||||
};
|
||||
})
|
||||
# dependency for telescope-all-recent: sqlite
|
||||
pkgs.vimPlugins.sqlite-lua
|
||||
];
|
||||
extraConfigLua = (builtins.readFile ./extra_config.lua);
|
||||
# use telescope in more places
|
||||
plugins.dressing = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue