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)
|
||||
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()
|
||||
M.map("i", "jj", "<Esc>") -- Remap Esc to
|
||||
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()
|
||||
require("my.plugins.lspconfig").setup()
|
||||
require("my.plugins.fzf-lua").setup()
|
||||
|
||||
-- Other unconfigured plugins
|
||||
require('nvim-autopairs').setup()
|
||||
|
|
|
@ -2,7 +2,7 @@ local M = {}
|
|||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- 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)
|
||||
local options = { noremap=true, silent=true }
|
||||
|
|
|
@ -15,8 +15,12 @@ in {
|
|||
'';
|
||||
|
||||
extraPackages = [
|
||||
pkgs.fzf # Required by lua-fzf
|
||||
|
||||
# Language servers
|
||||
pkgs.nodePackages.typescript
|
||||
pkgs.easy-purescript-nix.purescript-language-server
|
||||
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins;
|
||||
|
@ -25,6 +29,7 @@ in {
|
|||
github-nvim-theme # github theme for neovim
|
||||
nvim-lspconfig # configures lsps for me
|
||||
nvim-autopairs # close pairs for me
|
||||
fzf-lua # fuzzy search for say opening files
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue