07-Telescope
christianchiarulli 3 years ago
parent 94f160d1bd
commit 4b0d085006

@ -5,3 +5,4 @@ require "user.colorscheme"
require "user.cmp"
require "user.lsp"
require "user.telescope"

@ -68,3 +68,8 @@ keymap("t", "<C-h>", "<C-\\><C-N><C-w>h", term_opts)
keymap("t", "<C-j>", "<C-\\><C-N><C-w>j", term_opts)
keymap("t", "<C-k>", "<C-\\><C-N><C-w>k", term_opts)
keymap("t", "<C-l>", "<C-\\><C-N><C-w>l", term_opts)
-- keymap("n", "<leader>f", "<cmd>Telescope find_files<cr>", opts)
keymap("n", "<leader>f", "<cmd>lua require'telescope.builtin'.find_files(require('telescope.themes').get_dropdown({ previewer = false }))<cr>", opts)
keymap("n", "<c-t>", "<cmd>Telescope live_grep<cr>", opts)

@ -1,9 +1,3 @@
local default_schemas = nil
local status_ok, jsonls_settings = pcall(require, "nlspsettings.jsonls")
if status_ok then
default_schemas = jsonls_settings.get_default_schemas()
end
local schemas = {
{
description = "TypeScript compiler configuration file",
@ -168,19 +162,10 @@ local schemas = {
},
}
local function extend(tab1, tab2)
for _, value in ipairs(tab2) do
table.insert(tab1, value)
end
return tab1
end
local extended_schemas = extend(schemas, default_schemas)
local opts = {
settings = {
json = {
schemas = extended_schemas,
schemas = schemas,
},
},
setup = {

@ -64,10 +64,10 @@ return packer.startup(function(use)
-- LSP
use "neovim/nvim-lspconfig" -- enable LSP
use "williamboman/nvim-lsp-installer" -- simple to use language server installer
use "tamago324/nlsp-settings.nvim" -- language server settings defined in json for
-- Telescope
use "nvim-telescope/telescope.nvim"
use 'nvim-telescope/telescope-media-files.nvim'
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins

@ -3,6 +3,8 @@ if not status_ok then
return
end
telescope.load_extension('media_files')
local actions = require "telescope.actions"
telescope.setup {
@ -87,6 +89,12 @@ telescope.setup {
-- builtin picker
},
extensions = {
media_files = {
-- filetypes whitelist
-- defaults to {"png", "jpg", "mp4", "webm", "pdf"}
filetypes = {"png", "webp", "jpg", "jpeg"},
find_cmd = "rg" -- find command (defaults to `fd`)
}
-- Your extension configuration goes here:
-- extension_name = {
-- extension_config_key = value,

Loading…
Cancel
Save