1
Fork 0

feat: tried configuring fzf-lua

This commit is contained in:
Matei Adriel 2022-01-31 22:54:22 +02:00
parent 93caf0c971
commit df5e333e31
5 changed files with 23 additions and 1 deletions

View file

@ -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

View 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

View file

@ -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()

View file

@ -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 }

View file

@ -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
];
};
}