home: vim: replace 'fzf' with 'telescope'
I like the fact that it uses built-in buffers to preview files. It also has more inertia behind it, tighter integrations in the ecosystem.
This commit is contained in:
parent
bf7184c260
commit
16fc677509
|
@ -1,13 +0,0 @@
|
||||||
lua << EOF
|
|
||||||
local wk = require("which-key")
|
|
||||||
|
|
||||||
local keys = {
|
|
||||||
f = {
|
|
||||||
name = "Fuzzy finder",
|
|
||||||
b = { "<cmd>Buffers<CR>", "Open buffers" },
|
|
||||||
f = { "<cmd>GFiles<CR>", "Git tracked files" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
wk.register(keys, { prefix = "<leader>" })
|
|
||||||
EOF
|
|
16
home/vim/after/plugin/mappings/telescope.vim
Normal file
16
home/vim/after/plugin/mappings/telescope.vim
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
lua << EOF
|
||||||
|
local wk = require("which-key")
|
||||||
|
local telescope_builtin = require("telescope.builtin")
|
||||||
|
|
||||||
|
local keys = {
|
||||||
|
f = {
|
||||||
|
name = "Fuzzy finder",
|
||||||
|
b = { telescope_builtin.buffers, "Open buffers" },
|
||||||
|
f = { telescope_builtin.git_files, "Git tracked files" },
|
||||||
|
F = { telescope_builtin.find_files, "Files" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
wk.register(keys, { prefix = "<leader>" })
|
||||||
|
EOF
|
||||||
|
|
|
@ -59,8 +59,6 @@ in
|
||||||
vim-qf # Better quick-fix list
|
vim-qf # Better quick-fix list
|
||||||
|
|
||||||
# Other wrappers
|
# Other wrappers
|
||||||
fzfWrapper # The vim plugin inside the 'fzf' package
|
|
||||||
fzf-vim # Fuzzy commands
|
|
||||||
git-messenger-vim # A simple blame window
|
git-messenger-vim # A simple blame window
|
||||||
|
|
||||||
# LSP and linting
|
# LSP and linting
|
||||||
|
@ -68,7 +66,7 @@ in
|
||||||
null-ls-nvim # LSP integration for linters and formatters
|
null-ls-nvim # LSP integration for linters and formatters
|
||||||
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) # Better highlighting
|
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) # Better highlighting
|
||||||
nvim-treesitter-textobjects # More textobjects
|
nvim-treesitter-textobjects # More textobjects
|
||||||
plenary-nvim # 'null-ls' dependency
|
plenary-nvim # 'null-ls', 'telescope' dependency
|
||||||
|
|
||||||
# Completion
|
# Completion
|
||||||
nvim-cmp # Completion engine
|
nvim-cmp # Completion engine
|
||||||
|
@ -80,6 +78,7 @@ in
|
||||||
# UX improvements
|
# UX improvements
|
||||||
gitsigns-nvim # Fast git UI integration
|
gitsigns-nvim # Fast git UI integration
|
||||||
which-key-nvim # Show available mappings
|
which-key-nvim # Show available mappings
|
||||||
|
telescope-nvim # Fuzzy finder interface
|
||||||
];
|
];
|
||||||
|
|
||||||
extraConfig = builtins.readFile ./init.vim;
|
extraConfig = builtins.readFile ./init.vim;
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
" Use a floating window when availble
|
|
||||||
if has('nvim-0.4.0') || has("patch-8.2.0191")
|
|
||||||
let g:fzf_layout = { 'window': {
|
|
||||||
\ 'width': 0.9,
|
|
||||||
\ 'height': 0.7,
|
|
||||||
\ 'highlight': 'Comment',
|
|
||||||
\ 'rounded': v:false } }
|
|
||||||
endif
|
|
Loading…
Reference in a new issue