Nvim: More configs
This commit is contained in:
parent
7ffee1baa6
commit
06722274f9
3 changed files with 42 additions and 45 deletions
24
modules/hm/nvim/telescope-config.lua
Normal file
24
modules/hm/nvim/telescope-config.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
local telescope = require("telescope")
|
||||||
|
local actions = require("telescope.actions")
|
||||||
|
|
||||||
|
telescope.setup({
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<C-k>"] = actions.move_selection_previous, -- move to prev result
|
||||||
|
["<C-j>"] = actions.move_selection_next, -- move to next result
|
||||||
|
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
telescope.load_extension("fzf");
|
||||||
|
|
||||||
|
local keymap = vim.keymap
|
||||||
|
|
||||||
|
keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Fuzzy find files in cwd" })
|
||||||
|
keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Fuzzy find recent files" })
|
||||||
|
keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Find string in cwd" })
|
||||||
|
keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Fuzzy string under cursor in cwd" })
|
||||||
|
|
||||||
|
|
@ -22,40 +22,25 @@ let vp = pkgs.vimPlugins; in {
|
||||||
{
|
{
|
||||||
plugin = vp.telescope-nvim;
|
plugin = vp.telescope-nvim;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = ''
|
config = builtins.readFile ./nvim/telescope-config.lua;
|
||||||
local telescope = require("telescope")
|
|
||||||
local actions = require("telescope.actions")
|
|
||||||
|
|
||||||
telescope.setup({
|
|
||||||
defaults = {
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<C-k>"] = actions.move_selection_previous, -- move to prev result
|
|
||||||
["<C-j>"] = actions.move_selection_next, -- move to next result
|
|
||||||
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
telescope.load_extension("fzf");
|
|
||||||
|
|
||||||
local keymap = vim.keymap
|
|
||||||
|
|
||||||
keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Fuzzy find files in cwd" })
|
|
||||||
keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Fuzzy find recent files" })
|
|
||||||
keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Find string in cwd" })
|
|
||||||
keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Fuzzy string under cursor in cwd" })
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vp.dressing-nvim # Better UI for input and selection
|
# Better UI for input and selection
|
||||||
|
vp.dressing-nvim
|
||||||
|
|
||||||
# Tree view
|
# Tree view
|
||||||
# vp.nerdtree-git-plugin
|
{
|
||||||
# vp.vim-devicons
|
plugin = vp.chadtree;
|
||||||
# vp.nerdtree
|
type = "lua";
|
||||||
# vp.chadtree
|
config = ''
|
||||||
|
local chadtree = require("chadtree")
|
||||||
|
|
||||||
|
local chadtree_settings = { }
|
||||||
|
vim.api.nvim_set_var("chadtree_settings", chadtree_settings)
|
||||||
|
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>v", "<cmd>CHADopen<CR>", { desc = "Toggle file tree" })
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
vp.cmp-buffer # source for text in buffer
|
vp.cmp-buffer # source for text in buffer
|
||||||
vp.cmp-path # source for file system path
|
vp.cmp-path # source for file system path
|
||||||
|
|
@ -71,30 +56,18 @@ let vp = pkgs.vimPlugins; in {
|
||||||
# # Detect tabstop and shiftwidth automatically
|
# # Detect tabstop and shiftwidth automatically
|
||||||
# vp.sleuth
|
# vp.sleuth
|
||||||
|
|
||||||
# {
|
# LSP
|
||||||
# plugin = vp.nvim-cmp;
|
|
||||||
# type = "lua";
|
|
||||||
# config = ''
|
|
||||||
# require()
|
|
||||||
# '';
|
|
||||||
# }
|
|
||||||
|
|
||||||
# # LSP
|
|
||||||
# fidget moving while LSP is working
|
# fidget moving while LSP is working
|
||||||
{
|
{
|
||||||
plugin = vp.fidget-nvim;
|
plugin = vp.fidget-nvim;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = ''
|
config = ''require("fidget").setup({})'';
|
||||||
require("fidget").setup({})
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
# vp.neodev-nvim
|
|
||||||
# # vp.nvim-lspconfig
|
|
||||||
vp.cmp-nvim-lsp
|
vp.cmp-nvim-lsp
|
||||||
{
|
{
|
||||||
plugin = vp.nvim-lspconfig;
|
plugin = vp.nvim-lspconfig;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = builtins.readFile ./nvim/nvim-lspconfig.lua;
|
config = builtins.readFile ./nvim/nvim-lspconfig-config.lua;
|
||||||
}
|
}
|
||||||
|
|
||||||
# # Autocompletion
|
# # Autocompletion
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue