Add telescope nvim plugin

This commit is contained in:
Johannes Rothe 2024-12-21 15:08:54 +01:00
parent 082240c343
commit 446e93f23f
3 changed files with 40 additions and 9 deletions

View File

@ -26,6 +26,7 @@
python311 python311
python311Packages.flake8 python311Packages.flake8
python311Packages.ipython python311Packages.ipython
ripgrep
rusti-cal rusti-cal
roboto-mono roboto-mono
silver-searcher silver-searcher

View File

@ -6,14 +6,20 @@
# Autocomplete # Autocomplete
# Missing plugins # Missing plugins
# Telescope and fuzzy finder # Telescope and fuzzy finder
# Ruff linter for python and black # Ruff linter for python and black formatting on save
# Language support for python, go, tofu, terraform, yaml
# Format on exit # Format on exit
# Trailing spaces in statusline
# Good example: https://github.com/fred-drake/neovim/blob/master/config/python/language.nix # Good example: https://github.com/fred-drake/neovim/blob/master/config/python/language.nix
imports = [
./telescope.nix
];
programs.nixvim = { programs.nixvim = {
colorscheme = "sonokai"; colorscheme = "sonokai";
enable = true; enable = true;
extraPlugins = [ extraPlugins = [
pkgs.vimPlugins.indentLine pkgs.vimPlugins.indentLine
pkgs.vimPlugins.polyglot pkgs.vimPlugins.polyglot
pkgs.vimPlugins.sonokai pkgs.vimPlugins.sonokai
@ -23,12 +29,7 @@
sonokai_style = "atlantis"; sonokai_style = "atlantis";
sonokai_disable_italic_comment = 1; sonokai_disable_italic_comment = 1;
}; };
keymaps = [ keymaps = [];
{
key = "<leader>t";
action = "<cmd>Neotree toggle<CR>";
}
];
opts = { opts = {
colorcolumn = "88"; colorcolumn = "88";
cursorline = true; cursorline = true;
@ -67,7 +68,7 @@
}; };
}; };
lualine.enable = true; lualine.enable = true;
neo-tree.enable = true; treesitter.enable = true;
web-devicons.enable = true; web-devicons.enable = true;
}; };
}; };

View File

@ -0,0 +1,29 @@
{ config, pkgs, lib, ...}:
{
programs.nixvim = {
plugins.telescope = {
enable = true;
extensions = {
file-browser.enable = true;
frecency.enable = true;
fzf-native.enable = true;
};
keymaps = {
# https://github.com/nvim-telescope/telescope.nvim?tab=readme-ov-file#pickers
# File pickers
"<leader>t" = "file_browser";
"<leader>ff" = "find_files";
"<leader>fg" = "live_grep";
# Vim pickers
"<leader>r" = "command_history";
"<leader>fo" = "oldfiles";
"<leader>fs" = "spell_suggest";
# Treesitter pickers
"<leader>ft" = "treesitter";
# Git pickers
"<leader>fgs" = "git_status";
# lsp
};
};
};
}