feat: tried configuring fzf-lua
This commit is contained in:
parent
93caf0c971
commit
df5e333e31
|
@ -6,6 +6,12 @@ function M.map(mode, lhs, rhs, opts)
|
||||||
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.mapSilent(mode, lhs, rhs, opts)
|
||||||
|
local options = {silent = true}
|
||||||
|
if opts then options = vim.tbl_extend('force', options, opts) end
|
||||||
|
M.map(mode, lhs, rhs, opts)
|
||||||
|
end
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
M.map("i", "jj", "<Esc>") -- Remap Esc to
|
M.map("i", "jj", "<Esc>") -- Remap Esc to
|
||||||
end
|
end
|
||||||
|
|
10
dotfiles/neovim/lua/my/plugins/fzf-lua.lua
Normal file
10
dotfiles/neovim/lua/my/plugins/fzf-lua.lua
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
local mapSilent = require("my.keymaps").mapSilent
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.setup()
|
||||||
|
-- Open files with control + P
|
||||||
|
mapSilent('n', '<c-P>', "<cmd>lua require('fzf-lua').files()<CR>")
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
|
@ -2,6 +2,7 @@ local M = {}
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
require("my.plugins.lspconfig").setup()
|
require("my.plugins.lspconfig").setup()
|
||||||
|
require("my.plugins.fzf-lua").setup()
|
||||||
|
|
||||||
-- Other unconfigured plugins
|
-- Other unconfigured plugins
|
||||||
require('nvim-autopairs').setup()
|
require('nvim-autopairs').setup()
|
||||||
|
|
|
@ -2,7 +2,7 @@ local M = {}
|
||||||
|
|
||||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- map buffer local keybindings when the language server attaches
|
||||||
local servers = { "tsserver" "purescriptls" }
|
local servers = { "tsserver", "purescriptls" }
|
||||||
|
|
||||||
function M.map(buf, mode, lhs, rhs, opts)
|
function M.map(buf, mode, lhs, rhs, opts)
|
||||||
local options = { noremap=true, silent=true }
|
local options = { noremap=true, silent=true }
|
||||||
|
|
|
@ -15,8 +15,12 @@ in {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraPackages = [
|
extraPackages = [
|
||||||
|
pkgs.fzf # Required by lua-fzf
|
||||||
|
|
||||||
|
# Language servers
|
||||||
pkgs.nodePackages.typescript
|
pkgs.nodePackages.typescript
|
||||||
pkgs.easy-purescript-nix.purescript-language-server
|
pkgs.easy-purescript-nix.purescript-language-server
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins;
|
plugins = with pkgs.vimPlugins;
|
||||||
|
@ -25,6 +29,7 @@ in {
|
||||||
github-nvim-theme # github theme for neovim
|
github-nvim-theme # github theme for neovim
|
||||||
nvim-lspconfig # configures lsps for me
|
nvim-lspconfig # configures lsps for me
|
||||||
nvim-autopairs # close pairs for me
|
nvim-autopairs # close pairs for me
|
||||||
|
fzf-lua # fuzzy search for say opening files
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue